Charles is getting together a bunch of T-shirt slogans for Java nerds. Here's what I'd put on mine:
dup iadd iconst_0 iorGroovy
That'll ramp up the nerd quotient of just about any gathering on the face of the Earth.
Apparently, we’ve had a lot of rain lately. The water board reckon that it hasn’t made much difference:
Warragamba Dam had received just 30 millimetres of rain since Friday, a spokeswoman for the Sydney Catchment Authority said. “The rainfall we’ve had so far hasn’t been enough to make a significant impact [on dam levels].”
They also have a neat page detailing Sydney’s dam levels over the last few years, and showing the positive effects of the water restrictions. Without the restrictions, Sydney would have run out of water in early 2007.
I recently downloaded the game Phase for my shiny new iPod Nano and immediately hit a bug synchronizing the Phase playlist. If you just want to know how to solve the bug, skip down two paragraphs while I tell everyone else about Phase.
Phase is one of those games like Guitar Hero: you press keys matching the coloured dots falling down the screen in time to the music. The twist is, you get to use your own music. When you first sync the game to your iPod, it creates a playlist named “Phase Music”. You load up the Phase Music playlist with your songs, sync to your iPod, and ta-da, you can play with your own songs. Woohoo! The coloured dots are backed by The Living End! All good, except…
The Bug: you have songs on your iPod, in the Phase Music playlist, but Phase can’t see those songs and says that your Phase Music playlist is empty.
The Workaround: Back in iTunes, you need to drag a song to the Phase Music playlist that isn’t already in there. If you add songs to the playlist using “Add To Playlist” on the option menu, it won’t work. After you have dragged a song, you can then resync your iPod and it will happily play all the songs on the playlist.
It took me two hours of searching, fiddling and resetting my iPod to find this workaround. Grrr.
The Cause: it seems that Phase requires some sort of pre-processing to be done in iTunes before it can be played in Phase. This pre-processing is only triggered when a song is dragged to the playlist, not when a song is added by other means. I’m not sure whether this is dodgy programming on Harmonix’ part, or iTunes not providing a rich enough set of events for game plugins. Either way, for people that tend to use menus instead of dragging, the out-of-the-box experience is terrible, and this reflects both on Harmonix and Apple.
Apple/Harmonix: It’s disappointing this bug wasn’t caught and fixed in testing. I’m sure your developers are fixing it now, but, in the meantime, could you please mention drag-not-menus right up front in the help, the faq AND the support article? Three short sentences would save hundreds of hours of frustration from iPod fans all over the world.
PS: It turns out that you can put any song you want on Guitar Hero – it just takes a bit of hacking.
After taking a much-needed break, I’m back programming Java. Much to my surprise, I’m enjoying it. However, there is still one wound that time hasn’t healed: JAR files without source.
Oh, the hair I’ve pulled out, staring at Javadoc, trying to divine whether a function returns
null or empty array to indicate no-result! The co-workers I’ve disturbed swearing at RuntimeExceptions thrown from ten layers beneath the API! The unwarranted pride I’ve felt correctly guessing a working sequence of method calls!
Fortunately, I have found a partial relief in JadClipse, a Java decompiler for Eclipse. JadClipse not only does a reasonable job of recovering source, it also attempts to match up the line numbers in the generated code with the line numbers in the
.class file so I can trace execution in the debugger. JadClipse is much happy-making.
A few notes: