- Paperback: 272 pages
- Publisher: Addison Wesley (5 Jun. 2001)
- Language: English
- ISBN-10: 0201310058
- ISBN-13: 978-0201310054
- Product Dimensions: 18.4 x 1.7 x 23.1 cm
- Average Customer Review: 4.7 out of 5 stars See all reviews (19 customer reviews)
- Amazon Bestsellers Rank: 84,706 in Books (See Top 100 in Books)
- See Complete Table of Contents
Effective Java (Java Series) Paperback – 5 Jun 2001
|New from||Used from|
Customers who bought this item also bought
What other items do customers buy after viewing this item?
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
If you are a seller for this product, would you like to suggest updates through seller support?
You may think you're a hot Java programmer, but you aren't perfect--yet. Josh Bloch is one of the Java core architects and in Effective Java Programming Language Guide provides a Java master class.
Bloch provides 57 items (did he reject "varieties"?) grouped by subject. Each item highlights a "gotcha", expands on best practice or argues for deprecating a common practice. For example, among the gotchas, he points out problems with relying on finalisers, whose implementation varies from one JVM to another and may not run at all under some circumstances.
Best practice also gets a lot of airing. A neat example is not relying on Java's default object serialisation API, which--among other problems--can cause the object to break if you make any changes. This can result in a code maintenance nightmare. In the last category he discusses the string concatenation, "+". Using this can be a hundred times slower than appending to a StringBuffer. No problem for a one-off string but using it repeatedly can cripple performance.
Many of the items discussed are fairly trivial, such as returning zero rather than null for zero length arrays or avoiding the use of floats when you need precise answers--perhaps they were thrown in to make the magic "57"--but despite these Effective Java Programming Language Guide offers a fascinating insight into Java's architecture and solid, easily assimilated guidance on its effective usage.
Unlike most books for programmers, this is one you really will find difficult to put down. Every serious Java programmer should read it. --Steve Patient
From the Back Cover
"An excellent book, crammed with good advice on using the Java programming language and object-oriented programming in general."
--Gilad Bracha, Computational Theologist, Sun Microsystems, Inc., and co-author of The Java Language Specification, Second Edition "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, Fellow and Vice President, Sun Microsystems, Inc., and inventor of the Java programming language
Are you looking for a concise book packed with insight and wisdom not found elsewhere? Need to really understand the Java programming language; that is, really understand it? Do you want to write code that is clear, correct, robust, and reusable? Look no further! The book you are holding will provide you with this and many other benefits you may not even know you were looking for. Become a more effective programmer.
Featuring fifty-seven valuable rules of thumb, Effective Java Programming Language Guide contains working solutions to the programming challenges most developers encounter every day. Offering comprehensive descriptions of techniques used by the experts who developed the Java platform, the book reveals what to do--and what not to do--in order to produce clear, robust, and efficient code.
Each rule appears in the form of a short, stand-alone essay offering insight, code examples, and "war stories" from this uniquely qualified author. The essays include specific advice and insights into the subtleties of the language and are illustrated with exceptional code examples. Throughout the book, common language idioms and design patterns are examined and insightful and enlightening tips and techniques are provided.
Customary and effective language usage that is saturated with expert advice in a concise, readable, and easy-to-access format.
Patterns, antipatterns, and idioms to help you get the most out of the Java platform.
Commonly misunderstood subtleties of the language and its libraries- how to avoid the traps and pitfalls.
Focus on the language and its most fundamental libraries- java.lang, java.util, and, to a lesser extent, java.io.
Detailed coverage of serialization, including practical advice that is not available elsewhere.
Appealing to a broad spectrum of the programming community, Effective Java Programming Language Guide presents the most practical, authoritative guidelines available for writing efficient, well-designed programs for the Java platform. 0201310058B07092001
Top Customer Reviews
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.Read more ›
The format is simple, providing 57 distinct items of advice. Each item is small, some are obvious, some more complex. Even the obvious ones are valuable for their formalisation of simple approaches (the "why" to add to your "how").
It is so well written that it can be read cover-to-cover (a rarity in computer books for me), and then dipped into as a reference as and when an item becomes pertinent.
This is not a book to learn to program Java, but one to help experienced programmers write more effective Java. I doubt there is a Java programmer anywhere who would not benefit from some of the items.
As someone who has been coding in Java from 1999, I felt my understanding of the basics were fairly good. OO techniques such as inheritance, method overloading, object creation et al were fairly bread and butter for me. Reading this book has shown me numerous ways to increase the standard of my code and also given me good reasons to code the way I should.
Many developers are aware of the fact that they should override hashCode() if they are overriding equals(), but how many could tell you why. This book does and there are many further examples like this, each one designed to highlight scenarios that can raise common (and often subtle) errors which can be easily dealt with.
This book can almost be seen as a book of design patterns but rather than covering patterns to solve various problems (such as: front controller, composite and decorator) these patterns cover writing reliable, stable, efficient and bug free code rather than hacking something together than works.
Essential for anybody wishing to improve their code.
There are several sections covering different aspects of java programming. Bloch starts with an in depth look at some of the idiosyncrasies of the language that can lead to the creation of strange and nasty bugs. For example a surprising number of developers don’t realize that you have to override hashCode() when you override equals. Bloch goes into why. He also covers many design issues and good practices such as favouring static inner classes, favouring composition over inheritance and minimizing scope. In each case his analysis is succinct and thought provoking without ever becoming overly dense.
Finally, the book is organized in a very accessible manor. The contents refers to the 57 items that he highlights and the judicious use of bolding in the text is simple yet extremely effective at both highlighting the important points as well as making return visits for references accessible.
If there is one book all java programmers should have it is this one.
Most Recent Customer Reviews
This was a .01 book but the quality of the print was really bad as it was like it survived a flood...Published 12 months ago by fokion sotiropoulos
Even the first edition is an excellent guide for good programming practices. Whilst there are similar books (by different authors) which aim at C#, the arguments Bloch presents... Read morePublished 21 months ago by Nicholas F.
This book is not designed to teach you to program Java, it is closer to a framework or rule-set for ensuring high-quality, robust code. Read morePublished 22 months ago by James Butler
This book is worth every penny. It explains all the best practices you should be adopting in your core Java programming, and why. Read morePublished on 20 July 2007 by Mr. P. HAIGH
I was very much of the opinion that everything you need to know about programming can be found online and in the Javadocs, but gave this a chance because Josh Bloch is such a... Read morePublished on 8 April 2007 by Samuel Halliday
If you have a basic understanding of J2SE take the time to read and understand the advice in this book. Read morePublished on 17 Sept. 2004 by Simon Baker
This is without doubt the best book I've bought on Java (and I've bought a lot). I've read books on Java specifications, design patterns, etc. Read morePublished on 20 May 2004 by T. Song
I was so impressed with the quality of information in this book that, having reached the end of it (in a surprisingly short space of time), I started again from the beginning - not... Read morePublished on 22 July 2003 by Bramblehead
This book can impart the knowledge & understanding you need to write better code than you currently know is possible. Read morePublished on 20 Feb. 2003 by rjb