I know my APIs well, I don't need a Java book!


That's exactly what I thought, when some years ago I've been suggested a Java book. I've had enough hands-on experience (well, I thought!), I read books years ago, now why should I need a Java book?

I was completely wrong.

Mastering a programming language is not only about knowing all the keywords, constructs or a good number of classes. Mastering a language is about knowing how to effectively use it. Why I should use composition instead of inheritance? Shall I throw an exception or use a different way to handle an unexpected situation? Are interfaces a good places to store constant variables? If you're in the process of learning a language, usually you're not asking yourself such questions, as your effort it's more orientated towards learning the keywords and the data structures you use to solve your problems. You're focused on how to build the right thing.

But, as a software craftsman, it's equally important to build the thing right.

A book I've found extremely useful to polish some of my wrong coding habits is Effective Java: Second Edition by Joshua Bloch. I really felt embarrassed when, using some simple reasoning, he demolished some of my "rock solid" beliefs about how to code properly using Java. And, unsurprisingly, he's right. These simple but solid tips should be part of any Java programmer culture.

In the end, even if you know your APIs well, you may still need a Java book...