Effective Java™ Programming Language Guide (Java Series) (英語) ペーパーバック – 2001/6/15
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
A new edition of this title is available, ISBN-10: 0321356683 ISBN-13: 9780321356680
Joshua Bloch is a principal engineer at Google and a Jolt Award-winner. He was previously a distinguished engineer at Sun Microsystems and a senior systems designer at Transarc. Josh led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He holds a Ph.D. in computer science from Carnegie Mellon University.
3件中1 - 3件目のレビューを表示
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.)
Joshua Bloch is cited by several sources as a math prodigy and an accomplished researcher. None of that high-octane stuff affects this book. The prose style is simple and practical. The author never strains to detail a complex or abstract tangent. For example, his piece on random number generation (under Item 30, "Know and Use the Libraries"), raises a whole slew of "interesting" questions, but he stays on point (trust the library to do work you don't know needs doing). He avoids proving his assertions when a demonstration will suffice, so the book stays short and focussed.
Many of these points were review material for me, but I gained from Bloch's discussions nonetheless. As often as not, I preferred his reasoning over ones I have relied on; Bloch's just feels better rooted. And, in a world of high-stress schedules and moving-target projects, it's refreshing to hear someone with heavy concerns of his own preach the Good Word on better programming.
This book will strengthen your understanding of Java. It will confirm the things you've been doing right all along, and politely show you how you could do better. It might also give you a way to move people who wouldn't listen to broken-record you, but would listen to a smart stranger who says the same thing. ;)
I've been working full-time in Java since 1995, prior to version 1.0. I've also written books and articles on Java and have been teaching Java at the University level as a sideline for four years. In that time I've accumulated a great deal of "expert" knowledge about the language, the JVM, and the APIs and developed opinions on the best approaches to use in Java. At this point, reading books such as this that contain a collection of tips and advice I am usually satisfied to gain one new piece of knowledge; I learned at least six new things from this book.
Of the 50+ books on Java I've read, this book contains by far the most comprehensive and useful collection of that hard-won knowledge of core Java. The bonus is the clear and concise manner in which it is presented.
Bloch is dead-on. There isn't a single factual error or piece of bad advice in the book. The most I came up with were a couple of omissions on some of the topics. However, omissions are inevitable given the technical depth of some of the topics Bloch covers, such as serialization, exceptions and threads.
I offer only two caveats about the book. The first is that the book is for advanced Java programmers. This is not to say that this information is not useful to every Java programmer, but you need to have a comprehensive knowledge of Java in order to appreciate many of the topics. This book does not provide comprehensive coverage, but rather fills in the detail and subtleties. I teach a Java IV class and recommend this to my students as additional reading after completing the class.
The other caveat is that this book is written from the perspective of writing public APIs. Bloch is the lead architect for the core JDK APIs where the classes and APIs have special security considerations. Several pieces of advice he gives apply absolutely to a public API where you want to defend the API from malicious code. However, if the code you are creating is intended for a less hostile and more trusting environment, fully following all of his advice will result in unnecessarily complex code. The one knock I give to the book is that Bloch does not delineate the circumstances that would dictate following his rather rigorous approach to bullet-proofing an API and can leave the reader with the mistaken perception that the advice applies equally to all categories of code.
Overall, this is absolutely a must-have book for the experienced Java programmer. Even if you are not yet an advanced Java programmer, buy this book and keep revisiting it as you advance until everything in the book makes sense to you.