Culture, Informatics, Uncategorized

The ‘Oldehove’

The ‘Oldehove’ is an unfinished church tower in the centre of my hometown Leeuwarden. It leans even more than the tower of Pisa and is a must see for anyone visiting Leeuwarden. It’s open to the public from May to September.

Tresoar, the Frisian Historical and Literary Centre has a webcam on its roof that allows one to see the Oldehove in real time via this link. By grabbing and saving an image of the tower every 10 seconds for 24 hours, I was able to create the following video.

You need to a flashplayer enabled browser to view this YouTube video

I first made a simple shell script to download the latest webcam image every ten seconds. The script looks like this.

#!/bin/bash
let c=1000000;
while [ 1 ];
do
        let c = $c + 1;
        wget http://83.136.192.185/record/current.jpg?rand=$c;
        sleep 10;
done

I got the URL by looking at the image source on the tresoar page. I let this script run for 24 hours starting at midnight. After the script finished I renamed all files using the following command:

rename 's/current\.jpg\?rand=(\d{7})$/current$1.jpg/' \
current.jpg\?rand\=*

The image files are then combined into the final movie by issuing the following command:

mencoder "mf://*.jpg" -mf fps=10 -o oldehove.avi -ovc \
lavc -lavcopts vcodec=msmpeg4v2:vbitrate=800

Of course you should have the required binaries installed.

Informatics, Study, Uncategorized

Functioneel programmeren

Just finished another course, namely functional programming. The programming was done in Haskell and to pass the course one had to do a couple of assignments. Personally, I really like the whole functional programming paradigm a lot, and find it a pity that it’s not used very much in the industry.

Informatics, Study, Uncategorized

ICT-architectuur

I just finished I think the least interesting course for my MSc in Computer Science… You would expect something cool and technical from a course called ICT-architecture, but it was mainly about enterprise architectures… boring stuff…

Humor, Uncategorized

This should clear things up

Mathematics, Uncategorized

John von Neumann on life

If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.

John von Neumann

Informatics, Mathematics, Uncategorized

Queen’s Day

The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture any other using the standard chess queen’s moves. This puzzle can be generalized to the problem of placing n queens on a nxn chessboard. This c++ program finds solutions to this problem using a recursive backtracking algorithm.

Informatics, Study, Uncategorized

Software Architecture

And I’m one step closer to my MSc in Computer Science. Although it took a while to find the motivation to finish this Software Architecture course; it was pretty interesting. I think that the most important thing I realized from doing the course was how important it is that when you write a software architecture document (SAD) to explain and rationalize your architectural decisions. This is something quite a few SADs I encountered at previous jobs completely lacked.

Humor, Mathematics, Uncategorized

Happy Valentine’s Day

Informatics, Uncategorized

Chip-8 emulator

I’ve always been interested in emulators and just finished my Chip-8/SCHIP emulator. Chip-8 is an interpreted programming language that was first used on some early homecomputers and later on the HP48 calculator. The emulator allows you to play some retro games like pong and invaders.

The emulator is written in C++ and is available for download here. Besides the program and source code I’ve also included some games that seem to work ok. The original machines that ran a chip-8 interpreter had a 16 key hex-keypad that looked like this:

1 2 3 C
4 5 6 D
7 8 9 E
A 0 B F

This keypad is emulated on the PC keyboard like this:

1 2 3 4
Q W E R
A S D F
Z X C V

Happy gaming!

Humor, Informatics, Mathematics, Uncategorized

Another neat example of the Droste effect

I recently got the book “Linux Programming bible” from the local library, and noticed another neat example of the Droste effect on it’s cover. Click the image and see what Tux (the pinguin) is reading.