Wow, it’s been a while since I posted something…
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.
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)
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.
In any battle between the source code and the documentation, the documentation always loses. Note that this is not the same thing as the source code winning.
See the NY Times article for details
As a non-American, this is purely spectator sport for me, but it’s still interesting.
Some comments (below the fold):
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.
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)/
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.
Cool. 2011 Census results are out! I love Census data – it’s always so interesting.
As a militant atheist, though, the first thing I checked out was the religious affiliation breakdown. Great news: we’re continuing our advance.
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.