Book review : Effective Java, 2nd edition
I bought Effective Java 2nd edition last year. I loved it immediately, and since I’m frequently reading bits of it again. I even think I should read it all over another time.
Indeed, Joshua Bloch items are more than just “do this, do that” : he takes care of explaining them in great depth. It allows the reader to ponder both the advantages and drawback of all these items, but even more important it gives real good insight of the Java language (and object oriented languages in general).
Still, it’s a very pleasant read, far from pedantry. He explains everything with clarity and efficiency, whatever the topic and complexity. And that’s something : I was just amazed by this guy knowledge of so many different fields in Java : he writes not only about object oriented design, like “Prefer class hierarchies to tagged classes”, but good as well into complex matters like Concurrency or Serialization (see the TOC here to see the full extent of it). It’s funny to realize how we (uwe and I) have been using AtomicInteger as singleton since we read this book. Similarly, when looking back at the Serialization chapter recently (after some Serialization related issue and questions), I was struck by elements I hadn’t properly understood before, like the readResolve() method when dealing singleton. It shows, if needed, that’s really a book worth reading more than once, in order to get all the depth of it.
To conclude, this book is really a must read for all Java developers : if you don’t have it yet, rush for it