Timetable Dashboard Widget

Since my brain hardly remembers in what lectures and in what rooms to go next during the days of studying I decided to write a handy widget for Apple's Dashboard. It may keeps me off from running around ;)
However, I started hacking on Monday and the first working widget was kinda printscreen of the timetable we got from the university. It's been pretty clumsy because of the fact that it needed a single picture for every day. After some good talks with Philip I decided to make it more customisable.
First idea was to connect somehow to the server and fetch somehow the timetable.. but somehow it didn't work.
Ok, second idea: on the university's webserver every student can access his timetable. I had a look at the HTML source and discovered that the part where the timetable is situated starts as follows :
<?xml version="1.0" encoding="utf-8"?>
Gotcha! The hole timetable code is a valid XML doc inside the page. For now, I'm up to parse this document inside the widget.
Stay tuned.
Posted at 01.11.2006 00:24 CET | 0 comment(s)

Züri Oktoberfest


Posted at 14.10.2006 12:50 CET | 0 comment(s)

Guestbook Plugin for Fluxcms

I'm actually too tired to write much about it.. Short story therefore. I started to write a guestbook plugin for the fluxcms about half a year ago because a lot of people asked for it on the tarheels.ch site. I had some problems at first to understand the hole plugin thing and how each part of the cms works.
Anyway, there's the first buggy draft. Feel free to complain or suggest some features.

Good night, good fight.
Posted at 12.10.2006 00:01 CET | 0 comment(s)

Amazing Java reflection

Although I have heard of Java's reflection package once in a while I never really saw it in action. It's like the CORBA thing: you know it exists but you don't have a clue what's it for.
However, I took a closer look at the code changes today Boy van der Werf emailed me in May this year.. and what I've found was just amazing:
Method method = this.getClass().getDeclaredMethod(
commands[0],
new Class[] {String.class, String[].class});

String[] args = new String[commands.length - 1];

for (int i = 1; i < commands.length; i++) {
args[i-1] = commands[i];
}

method.invoke(this, new Object[] {sender, args});
This snippet calls the method which name is stored in commands[0] . It doesn't seem to be very exciting but if you take a look at how the class used to be designed at how it is now, you'll for sure be astonished.

Thanks Boy!
Posted at 01.10.2006 19:17 CET | 0 comment(s)

Spiel und Spass mit JUnit, Ant & Eclipse

Nach gut einem Jahr habe ich mich wieder einmal dazu entschieden mein kleines HattrickIRC Programm viel besser, viel schöner und sowieso viel anwenderfreundlicher zu schreiben. Denn zu meinem grossen Erstaunen wird es auch tatsächlich runtergeladen und benutzt.

Die ersten Probleme traten dann allerdings schon nach kurzem auf: Das Ant-Script wollte einfach nicht meinen junit-Task ausführen (kleine Anmerkung: vor einem Jahr ging es noch wie geschmiert).
Ursache des Problemes war zuerst einmal, dass ich die ANT_HOME Variable nicht gesetzt hatte.
Der zweite Grund war ein bisschen komplexer: Da für den junit-Task neben dem ant-junit.jar File in $ANT_HOME/lib/ auch das Jar-File von JUnit selbst im Classpath benötigt wird, muss folgendes gemacht werden.



In Eclipse unter Window -> Preferences Ant auswählen und da bei Global Entries das gewünschte JUnit Jar-File hinzufügen.
Posted at 01.10.2006 12:31 CET | 0 comment(s)