Code and comments

Practical and theoretical aspects of software development

Book review: Effective Java by Joshua Bloch

If you write Java as part of you job, you need to read this book. If you are learning Java, and hope to write Java as part of a future job, you need to read this book. So for many developers, the question of whether you should read this book is answered very quickly. The most important questions that remain are when to read Effective Java, and why to read Effective Java.

This is not a book to read to learn Java, Bloch assumes throughout that you have a familiarity with the language. It is also not a book to help you take the next steps after learning core Java, such as learning popular APIs such as JDBC, Java EE, or Swing. Effective Java is unlikely to equip you to accomplish any programmatic goal in Java that you were unable to code before reading it.

If you are overly pragmatic, it may seem that this book meets no real need. But if you have learned several languages, the purpose of this book, and the importance of books like this, is obvious.

Why read this book? To learn how Java ought to be written. Any programming task can be coded in a variety of ways, and Effective Java is about writing Java code that is understandable, maintainable, and fits with the design of the language. In other words, Effective Java will teach you how to work with Java, rather than working against it.

As for when to read this book, you should get this book as soon as can write code in Java. This is the book to get when you find yourself thinking, “I know a way to do it, but I’m wondering what is the right way.”

The book is structured with 78 “items” divided into ten sections, including “Classes and Interfaces”, “Generics”, “Enums and Annotations”, “Exceptions”, “and “Concurrency.” Each item takes a narrow topic and argues for a preferred practice. Some items in the “Classes and Interfaces” section are “Favor composition over inheritance”, “Design and document for inheritance or else prohibit it”, and “Prefer interfaces to abstract classes.” Each item is supported with concise arguments and brief examples, and often suggestions of possible exceptions to the rule. This is a very easy read, due to the short chapters and Bloch’s clear exposition. Each entry is like a blog post, easily digested in a short amount of time.

This book is a classic that will continue to fill an important need for as long as Java is relevant.


Written by Eric Wilson

February 8, 2012 at 7:58 am

Posted in reviews

Tagged with , ,

2 Responses

Subscribe to comments with RSS.

  1. informative review.. I’m myself learning JAVA programming course @ and so was looking around for materials like such to boost up my preparation.. 🙂


    February 28, 2012 at 2:50 am

  2. Eric,
    You might be interested in my slightly more critical review over here:

    Helpful book though.


    Daniel Meyer

    January 5, 2016 at 6:29 pm

Comments are closed.

%d bloggers like this: