Hackday London

Its the end of the Yahoo/BBC hackday weekend. The atmosphere at the beginning of the first day was really good and the weekend looked promising. But I left that day early and frustrated. I wanted to try out some of the cool tools being talked about but I couldnt get started because the network was too unreliable. It was a shame. I did meet some interesting people and I saw a great talk on machine tags by Aaron Straup Cope and Dan Catt though. I hope they got the network stabilised later on for the die hards and I’m intrigued to find out more about the final submitted hacks. It was always going to be difficult for me to attend the second day, due to family commitments, and I suppose this means I didnt fully prepare or get into the spirit of things. Looking at the blogs, the vast majority of the attendees got a lot out of it, and only a few lightweights who left early, like me, felt let down. If there is a next time I will both prepare more in advance and ensure I can attend the whole event. Oh, and come with a 3G card in my back pocket.

You lied to me when you said this was a program

A Dutch colleague introduced me to plasmasturm.org a while ago – an excellent software engineering resource. I hadnt noticed it before* but today I was most tickled by a quote he has on his code page:

A friend of mine in a compiler writing class produced a compiler with one error message ‘you lied to me when you told me this was a program’

see plasmasturm.org/code.

* Maybe I did notice it before and didnt get it. Since I first looked at that site I’ve done some work with the RACC, JACC and JavaCC compiler compilers (of the two Java compiler compilers, I prefer JavaCC).

WordPress theme

I fell in love with this styleshout web template and decided to hack it into a WordPress theme. Someone else had done it before, but their license was a little too restrictive for my liking. It took a few hours but was well worth it. It’s not widget friendly yet, but it will do for now.

This was almost my first encounter with PHP and definately my first encounter with the WordPress codebase but the task turned out to be fairly straightforward. The files in the WordPress themes were intuitively named and the code was easy to read. The only problem I had was tracing the location of some of the core functions that are used in the theme, but this is quite normal for this sort of application I feel.

Java status bar

This might save someone else a little bother. I’ve been building Java Swing demo’s in the last few months and one thing that has slowed me down is building a status bar. A status bar is the strip at the bottom of a window that contains useful information about the status of an application. As an example, here is the status bar for my skype client:

skype status bar

There is no standard swing control (container) to do this so you must roll your own. Searching for “java status bar” didnt get me very far. Initially I just used a JLabel, but this is too simple. I really wanted something with multiple recessed panels (as in the skype example). I considered using an unfloatable JToolBar but I dropped this idea because a toolbar’s default background doesnt look like a status bar and because its not easy to make the recessed panels this way. Finally I realised that the best way to build my status bar is to nest JPanels. Continue reading