Friday 26 January 2007

What makes a lecturer happy

I know, I know... it was only a few moments since the last post but I am in the mood of writing things down. I guess I am a bit emotional right now.

I hold lectures in a course concerning Introduction to Computer Science, this mostly involves general programming practice but also some algorithms. I hold practice lectures for smaller groups around ten people. I now have about four months of experience and I hope that I am getting better and better by the day.

This term I have been forced to move my group from the morning to the afternoon. I have lectures an Algorithms Data structures and Complexity, *sigh* if only it wouldn't have been a lecture I would have skipped it. Along with this a few other lecturers have quit for this term, since they didn't have time to teach. This lead to two small groups splitting up and having to spread out among the other groups and my old group having to switch to my new afternoon group. A bit chaotic yes, and a bit hard to see my point but we'll get there.

A lot of the members of my old group was not happy about me leaving, they seemed to like me. Although, in my view I am confused, has a terrible handwriting, sometimes has a hard time to get to the point, gets lost in my own sentences, etc etc. That made me happy, but I expected most of them to still take the morning lecture to avoid having a two hour schedule gap. Seven of them still attended this Thursday... that really touched my heart. It makes you feel all warm inside and motivates you even more to see if you might even be able to make further improvements. They are a nice bunch, really good CS students over all.

Now, as if this wasn't enough later that evening I was asked if I could take in even more members. I had one of the groups that lost their lecturer for one lesson back in October. And now about six of them wanted to join my group... MY group?! I couldn't believe this at first, I mean... I deeply respect the other lecturers and consider most of them to be far better than me... and they asked ME?! My world spun once or twice. They even told me why they prefer me, I was shocked to say the least. I will not mention why and who they prefer me to... but I just couldn't believe it and I still can't quite grip it. This is a great responsibility, I know that I can improve and perhaps I then can teach them even more. I truly am one happy lecturer at this point, perhaps I have found something that I am good at... maybe *smiles*.

Discrete math

This term I have a course in Discrete mathematics, I don't know why but I somehow feel all exited about it. The first lectures has really been a lot of fun, a part from some proofs which can sometimes be horrible (when it comes to graphs). Somehow I like graphs...

Last Friday I hacked together a small program for graphs, this was quite amusing. I implemented some algorithms and played around. I did have comments regarding my mental health how ever, since I spent Friday night with an open math book next to me. Perhaps I can actually be good at this field of mathematics... or is it yet another field where I find a lot of fascination but still can't really grasp the whole thing? As it was with logic. One thing is for sure though, the old math fear from high school is gone since I started at KTH. At least that is a good thing ^^

Sunday 14 January 2007

njorak

I have been a Dvorak (http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard) user for almost two years now. Since I am a Swede and I also require some Swedish special characters in order to write proper Swedish, such as å, ä and ö. At the time I started using Dvorak I typed 90%+ English, so I didn't really consider it a problem to not have these characters.

How ever, things change. When I started at KTH I began writing a lot more in Swedish. Nowadays I'd say I write about 50% Swedish and people started complaining about me lacking certain characters =( Well, one person in particular. I had plans on somehow integrating Swedish special characters into the Dvorak layout, but unlike Svorak (www.aoeu.info) I didn't want to change anything to the default layout. Now, XKB isn't really the nicest and most intuitive thing to play with. So my attempts mostly ended in a lot of frustration and nothing done.

Today, I started out looking at XKB again. It all ended with me not being able to understand why it did what it did. And for the first time ever I tried xmodmap instead. Now, xmodmap was entirely different. I quickly managed to get it the way I wanted to but now I faced another issue. My EZ-Reach 2030 keyboard (http://www.typematrix.com/ezr2030/) lacks an altgr key. Which I needed to place the Swedish characters where I wanted to. I asked a couple of friends to run xev and hand me which keycode altgr was using, I got ISO_Level3_Shift from both of them. Happily I entered it as the key for a spare key on my keyboard, but, nothing happened. This of course, being unwanted and unexpected was soon cast aside by some web browsing. I found that I should use Mode_switch. The result can be found below. This is just a first draft, but should make "someone" ;) happy.

The name njorak derives from the Swedish sound "njo", which is a sound you make when you somehow agree and disagree at the same time. Since I probably would answer the question "Is this really Dvorak?" with "njo".

! njorak, not-quite-dvorak.
! By Pontus Stenetorp kth se>
! Derived from us dvorak, includes Swedish characters
! altgr combos.
! Apply it to an ordinary dvorak keymap using xmodmap.
! EZ-Reach 2030 version
! dedicated to spatrik

keycode 29 = f F aring
keycode 30 = g G adiaeresis
keycode 31 = c C odiaeresis
keycode 32 = r R Aring
keycode 33 = l L Adiaeresis
keycode 34 = slash question Odiaeresis
! Start button on EZ-reach 2030
keycode 115 = Mode_switch
! App button on EZ-reach 2030
keycode 117 = Mode_switch

Thursday 11 January 2007

Enforcing the use of more secure passwords under FreeBSD

Usually I am a very nice guy when it comes to handing out shell accounts, but when it comes to users using dictionary words as passwords I draw a line. In order to at least force them to do some thinking before choosing "password" as a password I do the following.

Add these two lines to your /etc/login.conf

:mixpasswordcase:\
:minpasswordlen=8:\

This will enforce a minimum length of eight characters and force them to mix case. And don't forget to rebuild the database, in case you didn't notice the comment in login.conf.

# cap_mkdb /etc/login.conf

Now, you have a standard for passwords. Even though it's fairly weak, it's better than nothing.

Friday 5 January 2007

Mounting remote directories using sshfs under FreeBSD

Another tutorial, this time on the usage of sshfs. cjg (http://cjg.mine.nu/) told me about it a few weeks ago and it really is one neat way to mount directories remotely.

As usual it's optimized for 80 char width so here is the link.

http://www.d.kth.se/~ninjin/texts/cs/sshfsfreebsd.txt

Wednesday 3 January 2007

Setting up a OpenVPN client with bridging using OpenBSD

Here's my first try at writing a how-to, I set up OpenVPN under OpenBSD recently and it was quite a challenge since there were close to no guides on the subject. Therefore I decided to write my own, since it's optimized for 80 chars width I will post a link to the file.

I hope it helps you in some way.

http://www.d.kth.se/~ninjin/texts/cs/obsdvpntut.txt