Last.FM: Recently listened

Sunday, May 27, 2007

Cup finals

Although my favourite team already had been kicked out in round one, I was keen to watch yesterday's cup finals between Stuttgart and Nurnberg. The two most impressing teams of the recent league season faced each other for the third time.

Stuttgart has impressed me by becoming German champions against all odds and by playing intelligent and beautiful football throughout the year. I'm happy for their win, because I count this as an advantage of German football in comparison to the big European Leagues where you only have two or three teams to win at all.

Nurnberg was mainly of interest for me because they bought Dynamo's top striker Joshua Kennedy last summer. Unfortunately, after playing some minutes for Australias national team in the World Cup, Kennedy got injured in the training camp and never played for his team this season. However, Nurnberg suprised everyone by reaching a place qualifying them for next year's UEFA cup. One of the impressing facts about them was their ability to beat German champions Stuttgart in both of their matches.

So yesterday both teams faced each other for the third time. Like many others I watched the game on TV and agree with people who found it one of the most entertaining football matches of the last years. Both teams did a great job and even though Nurnberg won it by 3-2 in the extra time, Stuttgart also would have deserved it. After Cacau was sent off in minute 30, they played 90 minutes with only 10 players. Even reaching extra time was a great accomplishment for them.

Friday, May 25, 2007

National Security (2)

Someone recently attacked Kai Diekmann's car. Diekmann is the head of Germany's most controverse boulevard magazine - BILD. Unfortunately, I cannot feel sorry for him and tend to think that this serves him quite well, since he is responsible for a magazine that is keeping German masses undereducated and wrong-informed.

However, what gives me a bad feeling about this, is that the Red Army Fraction also started their terrorism by attacking things like warehouses. Just when they noticed that this didn't work they started killing people. We should not get back to these things again.

National Security (1)

German conservative politician Roland Pofalla has accused Wolfang Thiers of not being a serious president of the German Bundestag anymore. The reason for that has been Thierse's criticism of the methods German police is using to track down potential participants of protests against next week's G8 meeting (which in fact was shared by justice secretary Brigitte Zypries).

I'm convinced that Wolfgang Thierse was right. Taking smell probes of innocent people is definitely a sign of the state misusing its power, even if this is covered by laws. Reading people's mail is a sign of misuse. Preventing people from making use of their civil right to stand up when things go wrong, is also a sign of misuse. This was fortunately relaxed by a court today. All this is definitely near to the methods used by dictators and authoritarian states.

I definitely do not agree with all the criticism and the points that are made by G8 opponents. But in a democratic society we should respect their rights and not criminalize them for having a different opinion.

Friday, May 11, 2007

Splinter

I was experimenting with SPLint yesterday. It is a tool for statically analysing C source code and is able to find errors regarding uninitialized variables, memory allocation errors and such things. Source code can further be annotated to get even more information out of the checker.

What annoyed me when I used SPLint was the amount of output. For my local L4 files it gave lots of errors and warnings. I decided, that colored output might ease the task of reading the interesting parts of it and so I put together a small Python script, called Splinter, which takes SPLint's output and colorizes it, so you can easily find warnings, their explainations, the corresponding function names etc.

It's probably quite hacky, because I wrote it in about an hour, but it works for me and if you intend to use SPLint, you should definitely give it a try. Version 0.1 uses my own private colors. Future versions might get more configurable.

Thursday, May 10, 2007

Whose bread I eat...

There's this German saying about people typically tending to take the opinion of their superiors. It translates to something like "Whose bread I eat, whose song I sing."

Alan Posener earned some fame today for posting an opinion about the boss of Bild, a German yellow press paper, because he did exactly the opposite. He works for the same publishing company. Posener became even more famous, when his bosses tried to censor him and removed his article from his newspaper's weblog. The text already had been spread.

SCons and vim

I recently played around with SCons, a build system alternative to GNU/Make. It is quite handy and relieves programmers from a lot of work. Building a program from two C files is as easy as putting

Program(['foo.c', 'bar.c'])

into a SConstruct file and running scons which will compile object files from foo.c and bar.c and link them to program foo. Cleaning up everything is easy, too. scons -c will do the trick. Apart from being easy for daily use, SCons is quite powerful. SConstruct files are Python scripts and so you get the whole power of a programming language for creating your builds.

As I revealed in an earlier post, I like the vim editor very much. When I started editing SConstruct files, I also wanted to use vim's beautiful syntax highlighting abilities with it. In command mode, you can type set filetype=python and syntax coloring works. But in real life, you don't want to type this every time you edit a file, so it would be nice, if vim detects the file type for you. It does this automatically for .c, .cpp, .sh and many more file types, but up to now it does not know about SConstruct and SConscript.

However, extending vim to recognize these is very easy using vim's autocmd features. These
let you specify actions that will be taken upon certain events, for instance when a new buffer is opened. I added two lines to my .vimrc in order to get SCons files highlighted as Python code:

autocmd BufReadPre SConstruct set filetype=python
autocmd BufReadPre SConscript set filetype=python

The syntax for autocmds is easy: After the autocmd keyword you specify the event for which you want to register this command. In our case it is before a new buffer (=file) is read. Thereafter you specify a pattern for which this applies. In our case SConstruct and SConscript files are handled, it is also possible to use regexes here. In the last part we specify the command that is executed upon the event. Here we set the file type to be Python and voila, syntax coloring works.