Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Effective Java

by Steve_p (Priest)
on Sep 21, 2002 at 07:20 UTC ( [id://199710]=bookreview: print w/replies, xml ) Need Help??

Item Description: Yes, I said Java. It is, however, the best practical OO programming book. Period.

Review Synopsis:

Although I know there are several who frequent this site that also cross over to Java, let's forget about the Java in the title and replace it with "Object Oriented Programming." Despite programming with OO technologies for for several years, I picked up so much information from this book that it was almost embarasing.

The author, Joshua Bloch, is definately not a slouch as an author for this book. One of the core architects of Java, he has definately had experience in OO design and implementation issues. This, for me, was a minor part in establishing credibility. Its when he criticizes the poor design of certain parts of the Java libraries, even areas that he worked on, that he scored points with me.

The first three chapters are pretty much Java specific, so I will not cover them here, but they are definately worth knowing if you program with Java.

In Chapter 4 - Classes and Interfaces, the book turns more general OO topics that I found useful not only for Java, but for other languages, including Perl. The discusions regarding favoring immutable classes, compositions, and avoiding inheritance are lessons I had learned the hard way, but I had not seen in print. It was very nice to see someone smarter than I saying that inheritance breaks encapsulation, and that years of avoiding inheritance on my part was justified.

Chapter 5 - Substitutes for C Constructs was also a very useful chapter for the OO Perl programmer. The examples are fairly straight forward, but the section on enums is worth its weight in gold. Bloch successfully pounds many enum-based designs I've seen in the past (including my own) into the dirt. While some of it gets a bit heavy on the Java side when discussing typesafe, serializable enums, Bloch gives enough advice that the information is usable for just about any programmer.

Chapter 6 - Methods is a chapter full of practical advice that I rarely find in practice, until bugs start creeping in. Advice such as "Check parameters for validity", "Make defensive copies when needed" (especially important when using references), documenting your exposed API can not be stressed enough to new (and many old) programmers.

Chapter 7 - General Programming contains a lot of advice that again can be transfered to just about any language. The advice to "Know and use the libraries" is one that I am reminded of every day. Some of the ideas regarding avoiding strings made me think a lot about my own use of string. The section on limiting the scope of local variables caused me a lot of grief since I came into programming through Pascal and COBOL.

The remaining topics go back towards a Java related scope discussing threads, serialization, and exceptions. The one piece of advice that would apply elsewhere ties into the discussions throughout the book regarding immutable classes. Since immutable classes are, well, immutable, they are thread safe.

Essential Java has quickly become one of my most refered to books on my bookshelf. It should be required reading for any Java programmer, and much of the information in the book would be a benefit to any programmer.

Update: Fixed Title. Aaargh! That's what I get for writing this at 2 am after two pots o' coffee.

Replies are listed 'Best First'.
Re: Essential Java
by ignatz (Vicar) on Sep 21, 2002 at 10:50 UTC
    Agreed. It was very refreshing to read one of the main Java people delving into the weaknesses of their work. Such honest reflection is very rare in this business and should be embraced by any developer. One of the few programming books that I've rushed through from cover to cover.
    ()-()
     \"/
      `                                                     
    
Re: Essential Java renamed to Effective Java?
by revdiablo (Prior) on Sep 22, 2002 at 21:06 UTC
    I cannot find Essential Java by Joshua Bloch anywhere, yet Effective Java by Joshua Bloch has chapters which match exactly what you describe. Perhaps the book has been renamed?
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: bookreview [id://199710]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-28 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found