Petri Wessman's weblog

Minireview: Effective Java (2nd Edition), by Joshua Bloch

It’s been a good long while since I last read a book on Java. I’ve been using the language in my professional work for well over a decade, and while I don’t consider myself an authority on the language I do consider myself quite competent in using it. However, there is a tendency for a certain type of statis to set it in these matters; once you learn something to “good enough” levels and find techniques that work for you, you tend to settle into using those techniques and being happy. There’s nothing wrong with this as such, but with a dynamic environment it does mean that you may be missing out on new stuff – and Java has gotten quite a few tweaks and additions since I originally learned it. Some of these I use all the time, some I use now and then but don’t deeply understand, and some I’ve only heard of but never used.

Effective Java is a book than attempts to encapsulate best practices in programming with Java, including the new 1.6 additions. As the book notes, a lot of books concentrate on the basics of languages and the mechanical details, but the “how best to use this in practice” part is typically either missing or an afterthought. This book is only about that, it assumes you already know Java and have some experience with it.

The book has a ho-hum name and cover illustration, and doesn’t really scream “read me now!”. However, it’s been getting consistent rave reviews ever since the first edition, and this new edition is an updated one which (also) covers new features in the language and how to best use them (generics, enums, all that stuff). I mostly bought it based on the reviews, and I’m glad I did.

The book is a long list of “how best to” articles on various Java subjects, grouped by general subject. While the book says it’s not really mean to be read cover to cover, that’s precisely what I did and I found it a good read – the language used is light enough, while staying focused on the subject, and the discussion is quite fascinating. I learned a lot of stuff from this book, and while there are lots of things here which I do not do in my work programming, I at least know that I should be doing them. There’s very little if anything here that I disagree with, though some of the details here do not really apply in my work; the author has been involved in creating parts of the Java main libraries, where there is need to protect against hostile code linked with your own. In my own work, the danger of hostile code in the same EAR package is not a realistic one, so some of the issues here can be sidestepped. That said, it’s good to be aware of what is dangerous in theory and what isn’t, even if that danger isn’t a valid one for you at the moment.

All in all, I fully endorse the five-star reviews this book has been getting. If you consider yourself a Java programmer, you really can’t go wrong in reading this book. Chances are you’ll learn quite a bit (I did), and this book doesn’t insult your intelligence and try to teach you obvious things.

Published on by Orava, tags , , ,

comment Minireview: Effective Java (2nd Edition), by Joshua Bloch

Trackbacks are disabled

Powered by Publify – Thème Frédéric de Villamil | Photo Glenn