I haven’t published a post in a while so I decided to start writing book reviews in hope to force myself to write more posts in the future. The first review will be for the Effective Java Second Edition book by Joshua Bloch since it’s the last book that I read. In fact, I just finished it few minutes ago.
Even though this book is not intended to be read from cover to cover it’s still interesting enough that you will probably end up doing just that. I started reading it as part of getting more familiar with Java since I started working full time at a company that uses it exclusively. I don’t remember where I found out about it in the first place (probably on StackOverflow) but the book itself has a very good reputation and a lot of promising reviews. Even the inventor of the Java language is recommending it.
“I sure wish I had this book ten years ago. Some might think that I don’t need any Java books, but I need this one.” - James Gosling, inventor of the Java programming language
Others agree with James and recommend the book. The book is structured in “items” where each item describes potential perfomance and/or security improvements. Some of the items (almost all of them in the general programming section) are not even tied to the Java programming language such as:
- Item 13: Minimize the accessibility of classes and members
- Item 15: Minimize mutability
- Item 16: Favor composition over inheritance
- Item 57: Use exceptions only for exceptional conditions
- Item 65: Don’t ignore exceptions
- Item 55: Optimize judiciously
- Item 56: Adhere to generally accepted naming conventions
There are many more interesting items in the book covering topics from managing objects to generics over general programming, concurrency and serialization. To summarize, this book is a must read for anyone working with Java. You can get the book at Amazon.