Collection of Tips and Ideas, Poor Value on the Dollar

Pseudo-pattern approach is useful, but too much of the material is overly obvious and sometimes unnecessary, potentially good for a novice programmer, a bit too expensive.


ORIGINAL DRAFT

In principle, a style guide is a great idea. Even if you don’t adopt every suggested guideline, there’s always something valuable you might pick up along the way. Unfortunately, developers are an independent breed and getting them to change their individual style tends to be a lot like pushing string. Jeff Langr makes a valiant attempt to change our minds in "Essential Java Style: Patterns for Implementation". The book presents a wide array of useful ideas, reminders, strategies and patterns. Even if some of them seem trivial, there’s something in here for everyone.

The book is divided into individual patterns which present a question and solution, in categories like Behavioral, State, Collections, Class and Formatting. The chapters are more or less divided in the same way, the first two focussing on Behavioral patterns, along to Chapter 6, which closes with Formatting patterns. There’s a nice table in Appendix B that pulls together the patterns by question and solution for reference. It would have been more useful if the table pointed back to the page on which the pattern could be found, but the summaries are nice to have. Appendix A adds value by providing several tips and techniques for optimization.

I found a few of the patterns particularly interesting. The converter method and constructor patterns don’t typically show up in pattern books. They’re useful when you want to convert one collection into another, for example, and it’s more practical to put that processing in the class you are converting to rather than building completely new methods to handle this elsewhere. Adding methods that return the default value for a given variable seemed like a good idea, as were the recommendations for package naming. Other patterns seemed way too obvious to me, like using Enumeration when appropriate or when to use a Stack or List objects.

Overall, I found the price tag on this book is a little high. There’s enough material to make this look good when you’re browsing, but when you start digging down into the pattern, too much of it seems obvious. Of course, a reminder of the obvious is not all bad. If you are relatively new to programming, these are probably little gems waiting to be absorbed. Sadly, I lost the novice perspective quite some time ago, so I can only guess at this potential usefulness. It’s hard to recommend this book. At $20, it might be a great buy, but its clearly not enough to make me feel like I got anything close to $40’s worth out of its pages.