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.
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:
Grails looks nice, partly because I can make use of the giant body of Java libraries in any Grails code I write. Next time I’m building a standalone web-app, I’ll definitely consider it.
Tom Adams’ Better testing through Behaviour on the topic of Behaviour Driven Development. BDD is an offshoot of “Test Driven Development” and Domain Driven Development. The central idea is that you first specify the behaviour that you’d like your code to have, in the form of tests, and then implement that specification.
Tom presented a bunch of examples from his Instinct Java test framework. Instinct differentiates itself from JUnit by paying a lot of attention to producing readable test cases – readable in the sense that you can make sense of it in English. Because of this, the test cases end up more like specifications. In the example on the Instinct website, he has a class named “AnEmptyStack” that tests the behaviour of empty stacks. This class has a method named “mustBeEmpty” that tests that the stack’s isEmpty() method returns true. You would read this as, “An empty stack must be empty”.
In comparing to TDD and JUnit some of the points (I think I heard) Tom made were:
I think I’d like to try Instinct on one of my home projects, then perhaps use it in the office.
Well, after four and a half years, I’m leaving this job. It’s been a blast. For such a little company, it’s amazingly stuffed with talented, interesting people. Amongst my colleagues are Keith, David, and Neville. Other alumni include Charles Miller (who taught me what a ‘blog’ is) Daniel Bradby and the now famous Gavin King. (Speaking of Gavin King, there are several people here who claim they were in the room during a particular meeting when Hibernate was born. They should blog about that meeting.)
As you might imagine, I have mixed feelings about leaving. I’ve learnt a lot while I’ve been here – about Java, about programming as a craft, and about working with people. I’ll miss the staff and management, and I’ll miss working with the fire brigade. However, it’s time to take on new challenges, so off I go.
The shiny new job starts on January 15, meaning three weeks of relaxing unemployment between now and then.
Merry Christmas, everyone!