Java Nerd-Shirt

10 PM March 3, 2008

Charles is getting together a bunch of T-shirt slogans for Java nerds. Here's what I'd put on mine:


That'll ramp up the nerd quotient of just about any gathering on the face of the Earth.

By alang | # | Comments (1)
(Posted to javablogs, Software Development and Java)

Give me the damn source!

10 AM December 4, 2007

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:

  1. JadClipse relies on a native executable, Jad, to do the decompilation.
  2. Jad does not come with source.
  3. Time spent perusing the JadClipse preferences page is well rewarded.
  4. Be careful what you decompile. Many sourceless packages have licenses that prohibit reverse engineering. One wrong click, and you could be sued.
By alang | # | Comments (1)
(Posted to Software Development and Java)


1 AM November 29, 2007

Paul King, co-author of Groovy in Action is speaking on Grails, the Groovy version of Ruby on Rails.

  • Grails is rip-off of Rails. Development in Grailsis much the same as Rails. It even has the same folder layout.
  • There is IDE support for Grails.
  • Grails is in its infancy. 1.0 due out in a few weeks.
  • Integrates robust tools such as Hibernate, Spring and Jetty.
  • Several Javascript frameworks incorporated, including Prototype, Dojo and Yahoo.
  • Because it uses Hibernate, Grails supports a wide range of databases.
  • Grails can build a standard WAR file, ready to be deployed to just about any Java servlet engine.
  • Grails “is growing enormously”. The number of people involved is growing by an order of magnitude every six months. (!)
  • Performance is comparable to Ruby on Rails, but somewhat slower than a bespoke Java web app. The good news is that it’s easy to replace performance hotspots with Java code.

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.

Update: Paul, of course is also responsible for much of the Groovy content in the PLEAC.

By alang | # | Comments (4)
(Posted to Software Development and Java)

Behaviour Driven Design

1 AM November 27, 2007

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:

  • xUnit tends to work only at the code level, whereas Instinct and BDD tend to work both on high level stories and at the code level.
  • Instinct and BDD dosn’t guide you so much toward strict units of code, but into adding behaviour wherever it’s needed to support the specification. In cases where you do need very clearly defined APIs – such as when providing public APIs to distinct processes or libraries, you will need to take extra care.
  • Instinct does tend to drive more usable APIs.
  • Instinct makes for more readable tests than JUnit, and plays nicer with IDEs.
  • Because of the language, Instinct is a valuable resource for developer-developer and developer-analyst communications.

I think I’d like to try Instinct on one of my home projects, then perhaps use it in the office.

By alang | # | Comments (0)
(Posted to Software Development and Java)

Last Day

11 PM December 21, 2006

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!

By alang | # | Comments (5)
(Posted to Stuff, javablogs, Software Development, Python and Java)
© 2003-2006 Alan Green