As a Computer Science student, I think we’re expected to hold a very large library of books. Some are required textbooks for classes, and others are indispensable bundles of text that we just happen or or passed through the grapevine. For me, this book is the former. Effective Java by Joshua Bloch is one of the most indispensable textbooks I’ve ever read on the Java language.
The book’s format is a bit odd: Rather than expecting you to read it cover-to-cover, its expected that you’ll flip through the index when doing some bit of planning, coding or engineering. Topics are laid out loosely in chapters, but the meat is the 78 individual “suggestions” that Bloch provides for you. One of my favorites involves the use of Java’s clone method and reads “Item 11: Override clone judiciously”. This section covers (in fair detail) why you would (or would not) want to use clone() within your methods. For those not familiar with clone in Java, it’s a quagmire that can be very useful when implemented properly. Unfortunately, its implementation was early on in the language and as such, it leaves a little to be desired.
The book’s author, Joshua Bloch led the design and implementation of certain features within the Java language, most notably the Collections framework (that I admire more and more each time I use it). There’s a lot of knowledge packed into this little book, and while I (clearly) haven’t found a use for each item or case I won’t begin a project without reviewing its contents.
Effective Java (2nd Edition) – Joshua Bloch