Archive for March, 2006

Big Canberra Bicycle Ride 2005

Thursday, March 23rd, 2006

Continuing what has become a tradition for me, I went in the Big Canberra Bike Ride again this week.

This is a great event they hold each year, on the Canberra Day long weekend. It consists of a 25 km ride (not a race!) around Canberra, with a stop-off halfway along for cup of tea, and a slice of carrot cake. Very civilised!

I’m not sure what the numbers were like this year, but last year I know they had around 800 riders. People are notoriously bad judgers of crowd numbers, but it looked similar to last year, so I’d guess 800 again this year.

Here’s a little piccy I snapped from my phone’s camera about 30 minutes before the start:

Big Canberra Bike Ride 2005

The weather looks a little forbidding in the photo, but it was actually a really nice 20 or so degrees (thats Celsius!). And it was a nice added element to have the Hot Air balloons float over as we prepared to start.

Being a very social ride, you get all sorts joining in – I saw at least 3 unicycles and a whole pile of recumbents. Ages seemed to range from around 10 to around 80. Really good to see so many different people getting out there.

A great day, that was finished off for me by brunch at a nearby cafe with some mates! Its a hard life… ;) Going back for my next mountain bike ride around the 24 Hr Mont track is going to be a real shock to the system…

Anyways, highly recommended if you’ve never done it before. For the no-yet-cyclists, a nice, gentle introduction into riding around the Nation’s capital. And for the more experienced, a good ride with a great atmosphere. Whats not to like?!

Javadoc-driven development

Friday, March 17th, 2006

Its the new development methodology thats taking the developer-world by storm…. ;)

Well, not really.

Just a cute phrase that occurred to me today when chatting to a colleague. We’d just spent 15 minutes discussing the desired behaviour of a system I was working on. Usual stuff – at first blush it seems straightforward, but plenty of edge cases, historical behaviour requirements, and other nastiness.

So we got it figured out, and its 11:45. Lunch booked at 12:00. No way am I even getting 10% of the code done in that time. But its just enough time to do the Javadoc.

So, 15 minutes later, my code has the 2 method signatures I need and around 40 lines of Javadoc describing the code’s behaviour, exceptions, and assertions. And after lunch, I was able to get straight into coding, all details of my discussion safely preserved.

And as an added bonus, when it comes time to rework it, I (or the next guy) will have some great doco to get started.

Not rocket science. Certainly not worthy of its own buzzword-esque title (although it does roll off the tongue :) ). And probably something everybody should be doing anyway as part of their actual methodology. But its a neat little anecdote worth telling!

2006 Honda Civic hybrid vs 2005 Prius

Thursday, March 16th, 2006

I’m currently the proud owner of a Toyota Prius (2004 model). Had it a couple of years and don’t have a single bad word to say about it. The fuel efficiency is fantastic (typically half, to a third of my co-workers’ non-hybrid vehicles), all the features are there (cruise control, climate control, etc) and the number of compromises I have to make seem to be exactly zero.

Whats not to love? :)

At purchase time, there were few options in the “environmentally friendly” space (is that an oxymoron when it comes to cars?). But a few months later, the Honda Civic hybrid became available. When the specs came out, I was still happy with my decision. The main factor was that the Civic’s fuel economy was noticeably worse (a number of small, non-hybrids do better, from what I can tell).

Well, its a new year, and Honda have brought out a new Honda Civic Hybrid. The styling looks great, they’ve increased the power, and electric-engine capability, and it seems to have more of a nod to fuel efficiency (in particular it can now, like the Prius, run on electric power alone at low speeds).

I came across the following review comparing the new Civic Hybrid to the current Prius, which might be of interest to people looking into Hybrids (or current Prius owners who want to check out the next generation of hybrids!):

http://www.edmunds.com/insideline/do/Drives/Comparos/articleId=108445

Non-US people (like me) should be aware that this is a US review, so some details may vary between what they’re reviewing and what is available to you. Also note that the Prius they use for comparison is 2004, but apparently the 2004 model is virtually identical to 2005.

In short, the review says that the Honda Civic is greatly improved, but that the Prius retains its edge. Its close, and the review goes on to say that the Civic may be better for certain people (especially those doing a lot of highway driving) – so, when it comes time to look at upgrading, I’ll certainly give the Civic a test drive.

In summary, still feel great about my original Prius purchase decision! ;) And, if such things interest you, I’d really recommend checking out the review. Even if you’re not that interested in the upshot of the comparison, it’s educational to see the current state of hybrids, and what can differentiate one from the other.

How did I miss this? java.util.Collections

Monday, March 13th, 2006

Well, they say you learn something new everyday. And given the size of the Java API, thats not too hard to believe ;)

After doing serious Java programming for at a least a few years, and having dabbled for a few years more (all the way back to the 1.0 days!), I’m pretty happy with my breadth of Java knowledge. Until a co-worker today mentioned using Collections.shuffle() to randomize a list.

“Pffffft”, says I, “Surely you jest”, says I. “No such thing.”

Well, there is. java.util.Collections (not Collection, note – theres an “s” on the end!). A nice, chunky class, full of juicy, static methods just waiting to save you from having to re-invent the wheel when it comes to operating on Collections. There’s the obvious stuff – shuffle() and sort() to randomize and sort, for instance. And small, but useful stuff – min() and max(), swap(). And some real useful stuff, like synchronizedList() (which returns a thread safe version of your list).

Many’s the time I’ve done my own “max()” routine. Each time, I trawled through the Collection interface looking for one and was mildly surprised it didn’t exist. And I never thought to look any further afield. I’m guessing that there may be one or two Java guys out there who are in the same boat (How many library classes are there now in Java?). Seeing as my co-worker doesn’t have his own blog…yet (come on H! Get your act together! ;) ), I’m doing this posting for the other people like me!

Of course, I’ve always got the excuse for my ignorance that its a relatively recent addition. I mean, its only been around since Java 1.2….. *grin*

Will Wright’s “Spore”

Thursday, March 2nd, 2006

Came across this link on digg for a 30 minute video demonstration of the upcoming game “Spore”.

Wow!

I gather the game is the brainchild of Will Wright (of “The Sims” fame). The demo blew me away – it is sooooo open-ended. I won’t try to do it justice here – for one thing the scope seems huge, and for another, this was just a demo, so the finished product could be wildly different. In short though, you guide a species’ evolution to a certain stage, then switch to a kind of SimCity/RTS type game to build up their civilisation, then switch to a kind of “God” mode where you can fly to other planets and do it all again.

Reading over that last paragraph, it doesn’t really do justice to what the demo showed. For instance, you seem to have complete flexibility in designing your creatures – the computer figures out how they move/eat/etc based on their body architecture. And the creations of different players are made available (asynchronously) to your own universe – while exploring the universe, you might encounter a planet that has been copied from some other player.

I really recommend setting aside the time to watch the video. Its been over 2 years since I bought a computer game, but I can’t wait for this thing to be released.!

(btw – there’s a good article on the Wikipedia on “Spore” which goes into a little more detail, for those that are interested)