Panasonic Youth

Five books every Java developer must own

Update: Welcome, Javalobby readers! You might be interested in the followup to this post. Thanks for the great feedback and suggestions.

  • Pragmatic Programmer by Andrew Hunt and David Thomas
    This is absolutely required reading for any software developer, regardless of language. If you are lost when people are talking about "keeping it DRY" or the danger of broken windows, you need this book.
  • Effective Java by Joshua Bloch Effective Java is absolutely crucial if you create any APIs, and if you ever see public class... you are writing APIs, whether its for a team of one or one thousand. Bloch covers issues Effective Java Programming Language Guidelike immutability, properly implementing equals and hashCode, the benefits of composition over inheritance, and the value of static factory methods. He talks about all sort of common beginner mistakes such as using interfaces for constants, using float or double when you need absolute precision, overuse of Strings, and crappy singleton implementations. After you've read this, listen to the JavaPosse interview with Bloch to hear how about a possible second edition and take a look at Java Puzzlers for fun gotchas found in Java.
  • Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley Professional Computing Series)Design Patterns by the GoF Design Patterns is by the Gang of Four (GOF) is often lauded as a classic read for anyone doing OO development, whether the language be Smalltalk, C++, or Java. If you aren't familiar with Design Patterns but have been doing OO for awhile, you have already been using some of the patterns without knowing it. Having a common vocabularily to share with others is very powerful, so know the 26 classic patterns is important for any Java developer today.
  • Extreme Programming Explained : Embrace Change (2nd Edition)Extreme Programming Explained: Embrace Change
  • by Kent Beck and Cynthia Andres When I first read XP: Explained, so many of the concepts made me nod my head in agreement and wonder how typical software development goes against so many of its principles. XP and agile isn't rocket science or a silver bullet, its just good common sense. "Take small steps, one at a time. Communication is vital. Feedback is important. Change is constant, so work with it instead of fighting it." It sounds like advice your mom or grandpa gave you when you were eight years old, so why does it take a "revolution" or a "movement" to put these things into practice for software development? That might be a topic for another essay, so for now just get this book. Its essential for understanding the ideas behind XP and agility. Note that the second edition is quite different from the first - it has a broader, less technical apporach. They are both worth reading, the first moreso for programmers and the second for customers and managers.
  • Practical Common LispProgramming Ruby by Dave Thomas et al, or Practical Common Lisp, or Learning Python or... The fifth book in this list really isn't a specific book at all, but a more general recommendation to get a book about a language very different from the Java/C# family. Learn one of the hot dynamically typed languages all the kdis love these days, like Ruby or Python. If those are old hat, pick up the The Haskell School of Expression if the online tutorial seems interesting. Or maybe Graham's On Lisp, which recently put online for free. Just learn a language that forces you think in a different way from Java. Even if your day job continues to be Java, knowing how you would solve a problem in Ruby or Lisp will only make you a better programmer.

Note what isn’t on the list: any of the Java 5 reference books or any of the tens (hundreds?) of J2EE books. Its important to keep up with the language and the platform, but I think thats better done through programming with the JDK and examples as reference. The reference books can be helpful for getting up to speed for day to day work, but I don’t think they are essential for furthering your knowledge or your craft. Long after your J2EE 1.4.x.niner book is collecting dust on the shelf, Effective Java will still be a reference you consult regularly.