Kristian Kristensen’s Blog


Thesis Exam and Graduation

Posted in Misc, Ruby, University by Kristian Kristensen on the June 30th, 2007

On Thursday the 28th I had my thesis exam. We started with a short presentation of selected parts of our work, which was followed by an individual examination. Our censor was Michael Schwartzbach, who contributed to the development of the Cartesian Product Algorithm, the scientific center piece of our thesis. Anyway, the exam went well, and we all got the grade 11! Super cool! Especially because our censor really knew the subject, which made the grade so much more meaningful.
With this exam my studies at Aalborg University are complete, which is kind of strange. But still a happy day. The last thing to attend was the graduation ceremony (dimission), which was held yesterday.

There was a bunch of speakers at the ceremony including a representative for the local companies. Grimur Lund from Logimatc talked about the transition from being a student to being an employee, and praised some of our qualities as graduates from AAU. It’s kind of funny that he spoke at the ceremony because when I attended FutureCamp Nordjylland back in 2001 I was in the same group as him, namely the Digital Business.
We got our exam papers, and there were a lot of graduates (in excess of 200) so it took a while. Afterwards there was a small reception and then I rode my bike home.

A couple of pictures from the ceremony below; the rest are in the gallery.

IMG_3841.JPG

Tinus looks at me with admiration :-)

IMG_3844.JPG

Grimur Lund speaks

IMG_3848.JPG

My friend Tais gets his diploma

IMG_3855.JPG

Happy graduated Software Engineers. From the left: Kristian, Brian, Me, Martin, Tinus, Eckhart and Dan

IMG_3857.JPG

Group photo of the first Software Engineers from AAU. From the top left: Phillip, Martin, Dan, Peter, Brian. Bottom left: Morten, Lasse, Søren, Me, Tinus, Thomas, Kristian

IMG_3859.JPG

My group aka The Ecstatic Boys. Martin, Me and Peter.

My Thesis: Type Inference for Ruby

Posted in Code, Ruby, University by Kristian Kristensen on the June 19th, 2007

So I’m just going to post the abstract for the thesis I handed in last Thursday. I worked with Martin Madsen and Peter Sørensen. The title is: Ecstatic – Type Inference for Ruby Using the Cartesian Product Algorithm

This master’s thesis documents Ecstatic – a type inference tool for the Ruby programming language. Ecstatic is based on the Cartesian Product Algorithm (CPA), which was originally developed for use in the Self language.

The major contributions of this thesis are: the Ecstatic tool that can infer precise and accurate types of arbitrary Ruby programs. By implementing CPA we confirm that the algorithm can be retrofitted for a new language. Utilizing RDoc we devise a method for handling Ruby core and foreign code both implemented in C. Using Ecstatic a number of experiments were performed that gained insights into the degree of polymorphism employed in Ruby programs. We present an approach for unit testing a type inference system. We compare Ruby to Smalltalk and Self, and conclude that their semantics are similar.

I think I’m going to talk more about my thesis in later posts. But we’ll see how it goes :)

Getting Nagios to do SMS Notifications

Posted in Misc, Operations by Kristian Kristensen on the June 17th, 2007

A couple of weeks ago I discovered that I wasn’t getting any notifications from Nagios. Turned out there was a problem with Postfix running on my server, which meant that mails weren’t delivered only queued. Since I only use emails as notification mechanism in Nagios it was pretty obvious that I was never gonna know about it. So something had to be done.
I’ve also had a plan to include SMS (text notification using mobile phones) as a notification method, but I never got around to configuring it. Know I had a pretty good reason to get it going. So I’ve spend a couple of hours today getting it done. I’ll explain how I got it working in this post.

First I needed a way to send SMS messages. The easiest way is to get a provider that allows you to interface via HTTP. This allows you to do a simple HTTP GET or POST and thereby send a message. I found these guys CPSMS. They have an HTTP gateway, and are pretty cheap. No setup fee, no monhtly fee, totally pay as you go. You buy messges in portions. Minimum is 1000 which yields a cost of 0,30 DKR per message.
Second I needed a script that nagios could execute. I found this on NagiosExchange and modified it. It’s pretty easy, you just replace the line that executes curl with this:

`curl -s -d username=$username -d password=$password -d from=$sender -d recipient=$number

-d message="$message" -k https://www.cpsms.dk/sms/`

Third configure Nagios to use this new command. I used this blog post from Barry O’Donnovan. Very easy. I modified the templates a bit. In misccommands.cfg I used:

# 'host-notify-by-sms' command definitiondefine command{

command_name    host-notify-by-sms

command_line    /root/bin/notify_sms -n $CONTACTPAGER$

-m "$HOSTNAME$ is $HOSTSTATE$: $HOSTOUTPUT$"

}#'notify-by-sms' command definition

define command{

command_name    notify-by-sms

command_line    /root/bin/notify_sms $CONTACTPAGER$

-m "$NOTIFICATIONTYPE$: $SERVICEDESC$@$HOSTNAME$: $SERVICESTATE$ ($SERVICEOUTPUT$)"

}

I added a new contact in contacts for me with my mobile phone number. Primarily I did this to control the level of notifications I want to receive. I have a normal email contact for me that delivers all notifications, and my new mobile phone contact only receives critical and recovery notifications.

A quick Nagios reload and you’re laughing. Now I’m just hoping I won’t be flooding my phone with messages :-) And I better go buy some more messages at CPSMS to be on the safe side. Their 10 free demo messages probably won’t last for long.

Thesis Done, but Wrong Major?

Posted in Misc, University by Kristian Kristensen on the June 15th, 2007

Your Scholastic Strength Is Deep Thinking


You aren’t afraid to delve head first into a difficult subject, with mastery as your goal.You are talented at adapting, motivating others, managing resources, and analyzing risk.You should major in:

Philosophy

Music

Theology

Art

History

Foreign language

What Should You Major In?

Kind of makes you thinking. I just handed in my thesis yesterday – in Software Engineering. I worked with two other guys in developed a type infernce tool for Ruby. The title of the thesis is: Ecstatic – Type Inference on Ruby Using the Cartesian Product Algorithm.
The exam is on the 28th, so we’ll see how that goes.

Thins have been quiet around here for a while, maybe it’ll change now that I got the thesis out of the door. Maybe I should even write abit about it here on the blog.