TechBookReport logo




Keywords: Java, coding style, best practice

Title: The Elements of Java Style

Author: Allan Vermeulen, Scott W. Ambler, Greg Bumgardner, Eldon Metz, Trevor Misfeldt, Jim Shur, Patrick Thompson

Publisher: Cambridge University Press

ISBN: 0521777682

Media: Book

Level: Intermediate, advanced

Verdict: A must for any serious Java hacker

This slim little volume is proof, (for books at least), that size isn't everything?Within it's 142 pages lurk just over 100 useful rules and conventions for Java coding and design. It represents a substantial condensing of hard-earned experience from a selection of industry gurus and trainers and as such it is worth taking notice.

We all pick up bits and pieces of coding conventions, style, best practice etc. Mostly this is by osmosis - looking at other peoples code, finding out what works in our code, having corporate standards foisted on us and so on. Trial and error usually weeds out the stuff that doesn't work, but it doesn't always point to newer or better ways of doing things. That's where this book comes into its own. Here you can learn what does work for other people, and, just as importantly, why it works.

Each numbered element comes with an explanation, example (and often a counter-example), and sample code (where appropriate). It's not expected that you take these various components simply on trust, the arguments are there to help you decide if it is right for you. Even where a particular element doesn't work for you, it's enough to let you know what kind of issues your own solution has to address.

What are these elements? Just plain good advice on Java usage. Being able to speak English is one thing, being able to speak it well is another, and the same goes for programming languages. This is a book about how to write Java well. What it does not do is teach you to program, how to solve programming problems or tell you the best way to solve a particular problem. Many of the suggestions you can find on the internet, but finding them all in one place like this is far more useful as a reference.

As you would expect, this isn't a beginners book, but it is one that anybody serious about coding in Java should take a look at.


Hit the 'back' key in your browser to return to subject index page

Return to home page