About Robert Watkins

My name is Robert Watkins. I am a software developer and have been for over 15 years now. I currently work for Wotif.com, but my opinions here are in no way endorsed by them (which is cool; their opinions aren’t endorsed by me either). My main professional interests are in Java development, using Agile methods, with a historical focus on building web based applications. I’m also a Mac-fan and love my iPhone, which I’m currently learning how to code for. I started this blog as a sort of public professional notebook, and it is mostly devoted to my professional interests. That said, I do have the occasional opinionated rant on other things, but if you steer clear of the “General” category, you should be able to avoid them. I live and work in Brisbane, Australia, but I grew up in the Northern Territory, and still find Brisbane too cold (after 14 years here). I’m married, with two children and one cat. My politics are socialist in tendency, my religious affiliation is atheist (aka “none of the above”), my attitude is condescending and my moral standing is lying down. The name of the blog comes from a one liner I posted ages ago to the XP mailing list. It reflects an attitude that software development is a very expensive process, and cutting corners by trying to do things cheaply will merely result in a lot of waste. I have a picture in my mind about a table, with one corner cut so deeply that the leg has been chopped off. I’ve used that line as my email signature for almost ten years, so it was a natural title for my profession-related blog. The name of the site is an anagram on my surname.

Reading Associative Arrays with ExtJS Models

Wow, it’s been a while since I posted something…

I’ve been working a lot with ExtJs recently, as the basis for a web application which talks to a lot of JSON-based web services. And I got to say that I am enjoying it – it’s a nice, powerful framework that makes working with JavaScript quite bearable.

ExtJs includes a sub-framework for turning JSON (or XML) data into ‘models’, including nested data. It does this by providing ‘reader‘ classes that understand JSON (or XML). However, it only understands nested arrays. Sometimes what you have is a nested object – e.g. when you serialize a HashMap from Java into JSON. Fortunately, it’s possible to extend ExtJS and provide a new Reader – one that understands nested objects (aka ‘maps’, or ‘hashes’, or ‘associative arrays’).

If you’re using ExtJS, I hope you find this useful.

Code samples not enough anymore

It’s becoming quite common for employers to ask to see code samples from prospective developers. This doesn’t really go far enough.

The next step up is to see the VCS history as well. A small sample – say, a couple of hours of work – can reveal a lot about how a person works – more than the code itself. Do they write tests first, or do they backfill later? Do they refactor their code to promote readability? Do they commit regularly, with meaningful comments, or do they just push bits in randomly?

With good free VCS hosting – like GitHub and BitBucket – anyone can easily create sample code and put it online for your potential employer to see.

So the next time an employer asks for a code sample, take it up a notch and give them the entire history as well. (And yes, I practice what I preach)

AiL – JBehave and Spring

Having succeeded in getting a simple JBehave story running. my next challenge is to scale it up a bit. In particular, I want to get a JBehave story that integrates with Spring to do something more fully-featured: save an entry in a database.

Continue reading

Thoughts on the new Podcast app for iOS

Inspired by reading this article over at ZeroDistraction.com

While I don’t actually care about many of the features the author cares about (e.g. I prefer to do podcast discovery on my laptop), I do agree that the app feels clunky.

Update: Podcasts listened to using this app don’t get recognised as ‘played’ back in iTunes. Presumably that will get fixed with an iTunes update with iOS 6, but still… that’s the nail in the coffin for me. I won’t be using this app again until iOS6 is out proper.

Update the second: Heck, even after I manually updated the played status in iTunes, the Podcast app didn’t swap out the played episodes for unplayed. It did bring down new podcasts – but not new episodes.

Continue reading

AiL – Simplest JBehave Scenario

In the last segment, I managed to get JBehave reporting under Maven using a pre-canned example. This time, I want to tackle the other extreme – I want to develop a single story in JBehave and see what’s the bare minimum it takes to get it running, inside an IDE (in my case, Eclipse)/

Continue reading

Newman government to slash solar feed-in rebate

So the Newman government, in its latest attack on anything sensible, is slashing the feed-in rebate for solar power - from 44c a kilowatt/hour to a mere 8c kw/hr. This is an absolutely insane idea – crazy crazy crazy stuff.

Continue reading

AIL – JBehave Trader Example, standalone.

JBehave comes with some very comprehensive examples, so I thought I’d start there to see if I could get one of them building – and reporting – under Maven. The example I chose was the ‘trader‘ example, which you can see at github.

Continue reading