This is the eBook version of the printed book. If the print book includes a CD-ROM, this content is not included within the eBook version.
Are you looking for a deeper understanding of the Javaâ„¢ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Javaâ„¢, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.
This highly anticipated new edition of the classic, Jolt Award-winning work has been thoroughly updated to cover Java SE 5 and Java SE 6 features introduced since the first edition. Bloch explores new design patterns and language idioms, showing you how to make the most of features ranging from generics to enums, annotations to autoboxing.
Each chapter in the book consists of several “items” presented in the form of a short, standalone essay that provides specific advice, insight into Java platform subtleties, and outstanding code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.
Highlights include:
New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much more
Updated techniques and best practices on classic topics, including objects, classes, libraries, methods, and serialization
How to avoid the traps and pitfalls of commonly misunderstood subtleties of the language
Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.util.concurrent and java.io
Simply put, Effective Javaâ„¢, Second Edition, presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.
ExcellentAugust 24, 2010 Wesley Freeman(Roanoke, VA United States) I bought this book a while ago when I was in a "self-improvement" mindset. I didn't pick it up and read it until recently, and I must say that I regret waiting as long as I did. It has a lot of good ideas, and I would recommend it to anyone who is already familiar with Java. Too early and it won't make sense or stick, but intermediate-advanced developers should definitely read it. Just chiming in along with many other positive reviews.
What??? You haven't read this?June 26, 2010 Cyrus Master(Riverdale, UT) 2 out of 3 found this review helpful
This means that:
(1) You don't write Java code, in which case you're forgiven.
(2) You're about to start reading it, in which case you're also forgiven.
(3) The unforgiveable alternative.
good transactionJune 7, 2010 S. Levy(WashDC) 0 out of 5 found this review helpful
Book was ordered for a co-worker. I have no information about this book, except it was in great condition.
Java craftmanship vs java correctnessJune 1, 2010 J. Howard(On the Potomac) 5 out of 12 found this review helpful
Relatively strong in the language of java, it is a craft knowledge book. One will generally find most of the recommendations correct. I like this book, but find the book fails in the meta process area.
It fails in three areas.
The first is the key weakness...
1) It is too weak on the process of confirming the correctness of java. Snippets of craft knowledge applied to the APIs, is not as necessary as the process of confirming the java code performs as expected. It gives craft knowledge, but not the knowledge to develop one's own craft.
- The most important thing a book like this can do is to teach a developer how to think about effective java programming. Metaprocess not just examples.
- How to profile correctly and tie these to the results of at least one example would be excellent. Many programmers reading the book, don't know how to confirm the effectiveness of their own code. Explaining in detail how to confirm the examples with the profiler would make this a five ***** item.
- It doesn't cover how to use static analysis tools and how to customize them for yourself or your shop. For example, avoiding finalize to release resources can be detected by a custom checker as a shop standard. Many static analysis tools can automatically (or can be made to) check code patterns.
Basically, a "my approach to effective java" chapter would help of how the author comes to this knowledge and confirms it.
These next two are nit's on the book's topic...
2) Java in it's environment could be better explained and the properties that affect the execution. It doesn't clearly explain how some SUN API's are very property setting dependent. Understanding the intentionality of an API property and finding the correct value for properties is essential. General practices require deeper knowledge of the API's (e.g. such as SUN's RMIs large number of unofficially documented garbage collection settings see [...] ). There are limits of java portability and some edgy API's get programmers into trouble. Knowing what and how to tradeoff architectural decisions in selecting an API or language construct is useful.
Further some of these recommendations are affected by the gc and heap settings. Some types of JVMs (SUN's 1.4 had IMP) have differences that change the recommended practice.
3) Use of certain packages over others (e.g. nio (Java 7 nio2)) and what the purpose of these packages are could be explained better. How performance and file transfers are improved with non-blocking io.
Finally, I note java always consists at least these two tasks developing correctly and searching for the correct API to use. Those following this book may believe that the coding correctly is sufficient.
Afterword. I do like this book, but it doesn't make me think using this (JB) author's mental process. Improve by explaining the process of discovering effective java and incorporating it in practice, and this book becomes essential. It's a choice of giving programming pearls versus teaching one how to find programming pearls of wisdom. (I like both, but a bit more of the latter.)
Effective practice performs at least the following functions:
- Defect Tracking - identify critical failures affecting system performance (bugzilla)
- Profiling - determine resource usage and performance of running software components over time (dynamic analysis) and ensure memory leaks aren't occurring
- Network Analysis - (for programs with networking) determine network component and communication failures and packet timing (e.g. wireshark)
- Logging - monitor the logged events in the system for trends and failures (log4j)
- Debugging - trace the execution of code in development to ascertain correct behavior (eclipse)
- Instrumentation - monitor (in a limited fashion) the software and hardware components in production (e.g. SNMP in the Java 6 JVM)
- Static Analysis - analyze (automated or walkthrough) the code for defects prior to running (e.g. Findbugs, checkstyle or better PMD)
- Compilation - analyze the compiler output (WERROR)
- Database Statistics - analyze the database (or file) statistics and access path to stored data (e.g. explain plan, top 10 lists)
- Code management (e.g. subversion or better mylin)
Thanks
Joe
Java programming best practicesMay 16, 2010 Nardino Nicola 1 out of 1 found this review helpful
It's a good book indeed, it touches many aspects of the Java language, well written. Although, other books are required if you really want to know more, like Java Generics and Java Concurrency in Practice.