Sorting Our Issues

Java Case Study, Episode 3

By Robert C. Martin & Micah D. Martin

75 minSep 2014

Boy! All we had to do in this episode is sort one field and add another. And yet we stumbled and fussed all over the place. We even got derailed once by using the Java-6 documents instead of the Java-7 documents. Sheesh!

Watch Uncle Bob in the first half of the episode. He doesn't want to touch the keyboard! What's up with that? He just sits there and grunts imperiously while Micah does all the work.

With all the load on Micah, he starts to get tired too. By the end of the first tomato they're both so knackered that they can't remember how to make the sort function work.

What a difference a break makes. The energy comes back in the second tomato and is running high in the third. I guess all programmers go through periods where they just don't feel up to coding.

There are some interesting technical surprises in this episode. For example, there a classic case for inheritance that we eventually bail out of and use an enum instead. And we find some interesting issues with SimpleDateFormat.

We also dig a bit deeper into the FitNesse fixtures such as Decision Tables, Query Tables, and Ordered Query Tables.

By the end of the episode, you'll see that the code is starting to get pretty messy -- despite the refactoring we've done along the way. And that set's the stage for Episode 4 -- But then I don't want to give too much away.

You can get the source code from github. This episode begins at commit: be8d09 and ends at: 4b885f