File Size: 1963 KB
Print Length: 370 pages
Page Numbers Source ISBN: 1530427169
Simultaneous Device Usage: Up to 5 simultaneous devices, per publisher limits
Publisher: Addison-Wesley Professional; 2 edition (May 8, 2008)
Publication Date: May 8, 2008
Sold by: Digital Services LLC
Word Wise: Not Enabled
Lending: Not Enabled
Enhanced Typesetting: Enabled
Best Sellers Rank: #234,388 Paid in Kindle Store (See Top 100 Paid in Kindle Store) #104 in Kindle Store > Kindle eBooks > Computers & Technology > Programming > Java #341 in Books > Computers & Technology > Programming > Languages & Tools > Java #377 in Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Object-Oriented Design
Please see my review of the first edition for my general response. My opinion hasn't changed with the second, so I'll focus on what's new in this review.The second edition was well worth the wait. The number of items are beefed up to 78 from 57. The chapter "Substitutes for C Constructs" is gone, but replaced by more contemporary material on "Generics" and "Enums and Annotations." Some first edition items have been amended to address features new to Java since the first edition was released. Some new items also address concurrency, favoring it over traditional Java threads. As expected, the cases for each item are methodically and persuaisvely made. If you are particularly interested in concurrency, also consider Java Concurrency in Practice.The item discussions use boldface liberally to highlight key points, sometimes calling attention to arguments in the first edition that have been updated. If you're skimming -- the author in fact doesn't encourage cover-to-cover reading -- these highlights are useful attractors to important material you might otherwise gloss.It's often helpful to have practices or insights you've earned on your own backed up by a reputable authority. Effective Java certainly helps with that. More importantly, the arguments that support his items are clear, easy to read, and compelling. Anyone proficient with Java would have to go a long way to find fault with them. In fact, it took considerable investigation to determine that one item from the first edition -- "Provide a readResolve method when necessary" -- was not the best advice for some cases.
Effective Java, Second Edition by Joshua Bloch is certainly the best Java book I have read in a long time. As a disclaimer, I never read the first edition and I am thus unable to compare the two editions. Effective Java, Second Edition is a mostly easy and fun read providing you with many insights and best practices on how to use Java effectively. It certainly is not a book for the beginner just starting out learning Java. For that purpose you may want to take a look at Thinking in Java by Bruce Eckel instead. Nevertheless, Effective Java would serve as an excellent follow-up.In Effective Java, Joshua Bloch does a great job describing best practices that you as developer will find useful on a daily basis. For example, I really found his description of the builder pattern (Item 2, page 11) quite interesting. Another Item that fascinated me, was Item 15 (page 73) - "Minimize mutability". Both items are part of a broader theme throughout the book that promotes creating code that is as immutable as possible. In that regard, reading the book will enable you to simply write better and safer code. The book also leads the way towards promoting functional programming techniques which will come in quite handily when developing multithreaded applications. Therefore, as a next book I may recommend reading Java Concurrency in Practice by Brian Goetz.Even for the experienced Java developer, Effective Java contains quite a few little eye openers. I for example was previously unaware of how static factory methods can simplify the creation of parameterized type instances using "type inference". This is described on page 9 (Item 1).
If you want to know the good things about this book, read the other reviews, many of which I agree with. This review just states what makes the book 4 stars for me instead of 5, because none of the other reviews I read pointed them out.Most of the items in book are very good, a few are great and well worth the price of the book and the time it takes to read it, but some have to be taken with a grain of salt. They probably make sense if you come from the background of working on the Java API team, as the author does, but wouldn't make much sense on any of the projects I have worked on. The problem is that all are presented as universal truths and only through experience can you tell which truly are and which can be ignored.I also feel that some of the items need to be tempered with just plain practical usefulness. I know that programming a certain way makes the code bullet proof from certain errors by not compiling if those errors are introduced, but if the code is quite a bit harder to understand and those errors are rare, is it really worth it? Also, some of the items are written as if everything you are writing is being published and supported publicly. If code and interfaces are just being used between two teams within the company, or even just on a single team, some of the logic used to describe why items are important don't make as much sense. Again, I just feel that these are something that make complete sense if you are writing on the API team, but not necessarily in every other case.My final small complaint is that the author tends to be a bit wordy on some of the items, fully explaining out every nuance of the wrong way to do it, which tends to create noise in some explanations that are pretty heavy anyway.