A classic work on Java programming
Book review Although it's not a new title, Joshua Bloch's Effective Java is one of those classics that invariably crops up on people's list of top Java books. And, when the question comes up 'what book do you recommend for someone who's past the beginner stage?', this is usually the answer.
The book assumes a good working knowledge of Java and object oriented development, and is not a tutorial or introduction. Instead, it aims to teach a set of best practice techniques that can be applied to real world coding problems. This isn't about design as such, it's certainly not a set of design patterns, though there is an element of it here.
The author lists 57 techniques to make your Java code more robust, easier to maintain and easier to reuse. These techniques are grouped by theme, such as Creating and Destroying Objects, Methods Common to All Objects, Classes and Interfaces, Serialization, and Threads. Each item is illustrated with sample code, cross-referenced to other items and given a thorough explanation.
For example, item 8: Always overide hashCode when you override equals, explains the principles of object identity, principles which are essential to the understanding of anything but a simple application. Bloch not only gives a thorough explanation, he shows what happens when this rule is violated.
Aside from providing a set of proven techniques, Bloch discusses the pros and cons of each, explaining the reasons as well as the rules. The effect gives a deeper insight into the structure of Java and object orientation in general, and is the reason it's rated so highly among Java developers. It's as though years of hard-won experience have been distilled in a single book.
For someone taking the step up from beginner, the chances are many of the techniques will be way beyond you, or perhaps the advantages are not as clear as you would want. As your coding matures, however, it is likely you'll come back to the book again and again.
Verdict: Essential for any serious Java developer
Author: Joshua Bloch
Publisher: Addison Wesley
List Price: £30.99
Reg price: £24.79
Sponsored: Hyper-scale data management