Sep 19th 2008
Ridiculously overengineered hi-fi project
Since I moved to Bristol I haven't listened to most of my music collection, which remained packed away on a hard drive for several months. I have now addressed this state of affairs in a characteristically ludicrous and impractical manner.
My friend Wayne was kind enough to donate me his surplus Linksys NSLU2, which I've installed the fabulous OpenWrt on. The prebuilt image I tried didn't seem to play nicely with bluetooth so I built my own version out of svn. I installed mpd and connected my USB hard drive and speakers.
Recklessly disregarding this wise admonishment, I decided to knock together my own solution to controlling the music player from my bluetooth phone. There are various solutions already, but they all seemed a little on the heavy/byzantine side for me and my slug. So, I threw together a small C program to relay messages from my bluetooth phone to mpd. Actually it just relays messages sent via bluetooth to any host/port, so there might plausibly be some other use for it. Don't know what though.
This just left the app to run on my phone. The phone's a nokia 6021 and runs J2ME/MIDP2.0. I'm not much of a java programmer but I managed to create a somewhat working app (source here). To describe it as basic is understating the case, but hopefully at some point I'll get round to turning it into something more complete.
Jul 1st 2008
Yet another pollen widget
My esteemed friend and ex-colleague Dave has written a Dashboard widget that shows you pollen forecasts for your area in the UK. Get it here.
Jun 29th 2008
Pollen forecast Firefox extension
I thought my UK pollen forecast gnome applet might be useful to more people if I made it available as a Firefox extension. If I'd realised how much faffing about was going to be involved I might not have bothered, but anyway it's done now.
It has a page here at the official Mozilla addons site, but you need to be registered with the site to get it there until somebody reviews it and judges it fit for public consumption. So for the time being you can get it from my website.
Jun 26th 2008
Pollen index feed / gnome applet
Zirtek, the manufacturers of anti-allergy medicines, provide a free (as in beer) desktop app that tells you the pollen forecast for your area. It's Windows-only, but with a small amount of cunning we can work out what it's doing and make our own version. Wireshark reveals that the app is downloading data from an XML feed here. Zirtek don't seem to publicise that url but it's on the public internet so I guess there's no legal issues with using it.
I made a gnome applet, which you can install as follows:
$ svn co https://tubbs.trition.org.uk/pollencount/gnome_applet pollencount_gnome_applet $ cd pollencount_gnome_applet $ sudo make install
Then right click on your panel, click Add to Panel and select 'PollenCount'. Right-click the applet to set your region.
Jun 18th 2008
XHTML vs HTML rendering speed test
At the time of writing the web is in the midst of a strange situation with respect to XHTML rendering. Modern websites often identify themselves in their head sections as being coded in XHTML, but identify themselves in their HTTP headers as being coded in HTML. This is because Internet Explorer, the crappest but most prevalent web browser, fails to render XHTML code that correctly identifies itself with the application/xhtml+xml mimetype. To work around this authors send their pages with the wrong mimetype, which causes all browsers to fall back to rendering the code as if it were HTML. This is just one of many ways IE makes the web a more broken place than it ought to be. But I digress.
Various arguments have been advanced as to why XHTML might be preferable to HTML, or vice versa. One of those arguments concerns rendering speed. I've seen people argue this as an advantage of both XHTML-style rendering and HTML-style rendering.
Out of interest I hacked together a (fairly unscientific) speed test of Firefox 3's rendering of a page served as text/html vs the same page served as application/xhtml+xml. The page chosen was my own homepage (with a couple of minor modifications). I served it locally via a slightly modified version of nweb, an extremely simple and lightweight webserver. The render time was discerned using javascript, by taking the time in the head of the page and again in an onload handler, and subtracting one from the other. Not sure if that's the best metric but I can't think of a better one.
And the results are... I bet you're really excited now... over 40 page refreshes, the text/html version averaged a time of 385ms, while the application/xhtml+xml version averaged 367ms. Making the XHTML version ~5% faster. Not dramatic or particularly scientific, but kind of interesting.
