Amazon.com Customer Reviews
Any serious Java programmer should have this book - Review written on November 17, 2006
Rating: 5 out of 5
16 customers found this review helpful, 1 did not.
First, the disclaimer -- I know Josh, and to know him is to like him. I work at Sun, and used to call him from time to time for advice. Josh is the force behind the initial versions of the Java Collections API, a good example of how to design using interfaces.
I was really struck by this book when I read it -- it was exactly what I was looking for. Other books will teach you how to use Java; this one assumes you know that much and then teaches you how to use Java *well*. It's a bit like knowing how to draw cartoon-like figures and then learning to draw lifelike images. I also find his writing style very natural; believe it or not this was, for me, a page-turner.
The book is slightly dated since it does not reflect the many significant Tiger (5.0) features. In fact, I think Josh himself obsoleted some of his own advice by giving us a really good enum implementation. Still, most of the content is very relevant, and even the dated stuff is still important if for some reason you are stuck using 4.x. It also helps you understand why enums were done the way they were.
[...]
He hinted that he might make an updated version of the book; if so, I'm in for one -- this is *bar-none* my favorite Java book.
In fact, I should ask whether people have read "Effective Java" when conducting interviews, and then ask them to articulate some of what Josh said. Hmmm.
Not Just For Java Developers - Review written on May 28, 2006
Rating: 5 out of 5
4 customers found this review helpful, 1 did not.
I have never done more than play around with Java, but this book has still has had as much influence on my programming habits as any other book.
I work with Flash ActionScript, which is similar enough to Java that nearly all of Bloch's points apply. (I just had to skip the "Threads" chapter, mentally replace "Exception" with "Error", etc.)
Three primary things I like about the book:
1) The content. He's right on pretty much every point.
2) The format. It's easy to find relevant information, and each section is fairly compact (without being incomplete).
3) The tone. Bloch comes across as a stern, principled teacher, and I almost get a sense of Schadenfreude imagining some writer of spaghetti code getting his knuckles smacked with a ruler for violating good design patterns. (Hey, if you've worked with Flash as long as I have, you know that there are a jillion "coders" out there who have no idea what the heck they are doing.) The book gives voice to the frustrations I feel with other coders, even while pointing out ways I myself could be better.
Condensed Java best practices - Review written on May 07, 2006
Rating: 5 out of 5
4 customers found this review helpful, 2 did not.
Ever since Scott Meyers wrote his seminal work "Effective C++..", the "effective" word has been frequently misused to produce mediocre work. But Joshua has produced a book equivalent in stature to Scott's, in the Java realm.
The pearls of implementation details and finer points of the language that could be learnt only from years of Java application and analyses, has been distilled into a comparatively small book.
The book has been divided into 10 chapters, for example "creating and Destroying Objects", "Classes and Interfaces" etc. If you are consummate Java developer you could dive into any section of your choice or even a specific chapter. The chapters though well connected, can still be read independently. If you are new to Java tread with care, time may be better spent reading an introductory Java book, which this isn't.
For example, this book consumes 8 pages to explain in detail, with examples, of all the vagaries of the "equals()" method. If you are programming in Java for a living, get this book now!
This will make you a better Java programmer, period. - Review written on December 15, 2005
Rating: 5 out of 5
7 customers found this review helpful.
"Effective Java" transformed my Java code. It made me a better programmer. If I were teaching a Java class, I would make this book a companion to the main text. I thought I knew Java pretty well and was following good basic practices, but almost every section in this book made me slap my forehead and run back to the code I was writing to refactor it. OK, maybe you don't want to/can't go and refactor all your existing code, but you will definitely write your code differently after reading this book, unless you are one of those rare superstar programmers and Java gurus who has nothing more to learn.
This is the best Java book I have ever read. It is focused, concise, and relevant, and it does exactly one thing: teaches you how to write better Java code. It is not a tutorial on how to build Java applications or a guide to learning Java. You must already know Java to use this book. It's also not a reader on general programming; while it does emphasize good programming practices that you can and should use in any language, the 57 items in this book are specifically about Java and how to use the Java language most effectively.
The items range from very basic practices that anyone writing a single line of Java code should follow to some more advanced topics that not everyone will make use of immediately (notably the chapters on threads and serialization), but NOTHING here is fluff or esoteric. You should know this stuff. Learn it, live it, love it. Did I mention it should be required reading for any Java programmer? If I were hiring a Java programmer, having read this book would be a BIG plus for any candidate I was considering... I think this book is to Java what "Code Complete" is to general programming. Seriously.
The only slightly negative comment I have, not really a negative but just something to be aware of, is that this book (at least the latest version) only covers JDK 1.4, so some of the advice should be modified just a little for the latest release, 1.5. (Notably, the section on writing typesafe enum classes -- the Enum class is now part of the Java language so you no longer need to "roll your own," but the tip still applies, as well as its suggestions on how to extend an enum class.)
Refreshing - Review written on June 28, 2004
Rating: 5 out of 5
12 customers found this review helpful.
It has been an absolute pleasure to read this no-nonsense collection of observations and suggestions.
The author is extremely knowledgeable and articulates his points in a clear, concise and logical presentation, which is a rare characteristic in today's overflowed and low-quality offer of "how-to-become-a-guru" manuals.
The Collections framework is clearly the author's backyard and you will learn about implementation details and rationales that you will not easily find anywhere else.
What I found most useful in the analysis of the various Java aspects was the author's perspective, which is based on the pros and cons of implementation choices, and strongly focused on API construction. Unless you work alone and deliver complete applications, you will define, design and implement an API sooner or later, maybe even without realizing it. With the help from this book you will most certainly design a robust, maintainable and useful API.
I also liked the practical approach that sometimes goes against OO principles: for example, just because Java embraced the OO philosophy does not mean that inheritance is the only way to go. Composition, static factories, singletons, immutable classes and some good old procedural programming are discussed in depth.
Another brilliant characteristic of this guide (and I would like to especially thank the author for this) is that although there are plenty of snippets to illustrate concepts, these are just skeletons, never longer than few lines and therefore they do not force you to waste your time and divert your attention from the core issue by analyzing pages over pages of code when maybe only one line could have served the purpose.
I would say that this book finds its best audience in the experienced developer/architect who does not have a specific Java expertise but is very comfortable with some other programming language. However, everyone can benefit from in-depth explanations of often misunderstood subtleties like the "equals()", "hashCode()", "clone()" or "compareTo()" contracts. Or serialization: are you sure you master it?
You don't need a profound Java working experience to immediately grasp some concepts; I found that this guide was an excellent companion in my learning of Java, you can start reading it from day 0, and you will get back to it every time you want to know more about a new concept.
The best praise I can say about "Effective Java" is that in my opinion only a handful of experts in the whole Java community could rightfully say "This book shall not teach me no thing", and then I would like to work with these people.
Great book! - Review written on June 22, 2004
Rating: 5 out of 5
7 customers found this review helpful, 1 did not.
I just want to state what other already told about this book: It is a great book!
I think it is a classic for Java programmers that try to write the best code! The title tell you all.
Note: Don't expect to learn the Java basis in this book. You will need this book after learning Java.
The best Java book, and valuable for C# developers - Review written on March 26, 2004
Rating: 5 out of 5
6 customers found this review helpful, 1 did not.
I started in computing in '78, and have been using Java since early '95 (before Java was available on Windows).
I read or scan a couple of books a month on Software Engineering, and software development. For me, this is Top 10 for the last 10 years. I strongly recommend it to all Java developers, it is so good that I strongly commend it to C# programmers.
The content is nicely organised into sections, which makes it helpful to focus developers in on understanding key areas. Bloch has done a great job of distilling experience into pithy, practical 'items' with meaningful titles. Effective Java is more approachable and less self-conscious than many of the pattern or 'anti-pattern' books, while still retaining a clear, unclouded focus on the job at hand; he rarely suffers scope creep ;-)
My only complaint is I would like another few points on exceptions and threading, both of which seem to be poorly handled by most developers.
I am looking forward to Joshua's wisdom on Java 1.5.
Indispensable for the Java programmer - Review written on March 22, 2004
Rating: 5 out of 5
4 customers found this review helpful.
If you have enough money to buy only one book in Java then this should be it! Bloch's masterpiece consists of 57 tips which specifically delve on using the Java API THE WAY THE DESIGNERS INTENDED IT TO BE. In case you're wondering, the author is a Senior Staff Engineer at Sun Microsystems and was the one who designed and implemented the Java Collections Framework and the java.math.package.
I have been programming in Java for 5 years already and still each tip teaches me something new (I was actually surprised when Bloch mentioned that the hashCode method has to be overriden if you were to override an Object's equals method).
However, you need to have programmed in Java for quite some time to appreciate this book as it will not teach you object oriented programming and the Java language constructs from scratch.
It's quite a shame that the details he expounds on this book are in the Java specifications but are merely glossed over by the anxious programmer searching for that elusive Java class method to meet some deadline.
Incredibly useful for all Java developers - Review written on February 06, 2004
Rating: 5 out of 5
4 customers found this review helpful, 1 did not.
This is one of the most useful books that I've ever read. I'm an experienced Java developer, and I learned a lot of useful tips. I'd also recommend this book to an inexperienced developer - it's helpful for everybody.
It has a lot of tips for good programming practices and information that applies to all Java projects (such as information on creating/destroying objects, methods common to all objects, classes and interfaces, general programming, exceptions, threads, and serialization.) It also has some code samples that you can use (such as how to write a good enumeration class or how to write a readResolve method for a singleton class.)
a good book to inexperienced Java programmers - Review written on January 10, 2004
Rating: 3 out of 5
7 customers found this review helpful, 9 did not.
I highly recommend this book to two kind of programmers: experienced C++ programmers who are new to Java, and Java programmers who have yet read Java 2 Language Specification and/or some of JDK's source codes. Because this book simply carried out some programming skills which you can learn from C++/Java programming, some insight of JDK which you can learn from language spec and JDK's source codes.
This is a good book. I am giving it a 3 stars just because people spoke it too high.
For people who like this book and think that it is right for you, here is some suggestions from me for you getting the next step:
1, Study Java 2 Language Specification to gain deep and complete understanding of how Java works as a language.
2, Read as much JDK's source as you can. You will know how Java libraries work and how to write professional codes.
3, Get familiar with design patterns, especially read some books titled both Java and patterns.
You want to dig further? Okay, find some books that provide JVM's secrets, eg. how is a JVM implemented?
Excellent Java resource ... - Review written on December 23, 2003
Rating: 5 out of 5
1 customer found this review not to be helpful.
I've read quite a few programming/development books in my time and a few of them have also been about Java. Most of these books have been good and worth the money, but once in a while I've come across a book that's been a real gem. This book is truly one of those gems, and has become one of the most priced possessions of my bookshelf.
If you ever though of yourself as a expert Java programmer, this book is still going to be a must. This book should be a part of any aspiring or accomplished Java programmer's personal library. It gave me quite a few surprises and presented an in-depth look into several topics I've never really touched on in detail before, nor ever seen a good explanation of in any other book.
Bloch goes into great detail with a logical and convincing style. His explanations are clear and surprisingly easy to understand. The layout of the book (structure and size) is also good, and it has a very good index of the contents. The book has the ability to keep you glued to your chair for a long time (it's actually very entertaining to read - imagine that?), and it will serve as a indispensable reference once you're done.
The book has 10 chapters with a total of 57 different parts (called items in the book). Some examples of these items are "Make defensive copies when needed", "Minimize the scope of local variables", "Favor immutability" and "Consider providing static factory methods instead of constructors". The items are organized in the following chapters: "Creating and destroying Objects", "Methods Common to All Objects", "Classes and Interfaces", "Substitutes for C Constructs", "Methods", "General Programming", "Exceptions", "Threads" and "Serialization".
Conclusion: If you are working on maintaining and/or developing your Java skills, this book is highly recommended! I give it an unconditional 5 STARS!!!