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