Bitter Java - a book review
by Josh Staiger
I just finished reading Bruce Tate's Bitter Java this weekend. It was *okay*.
Bruce makes a pretty compelling case for the study of antipatterns, and I also think that in aggregate the book provides a pretty good "bird's eye" view of a lot of the problems that one faces when doing server-side Java development.
The book does quite a good job of covering a lot of particularly troublesome Java-related topics. The Model View Controller sections, Java Memory leaks section, the caching section, and even the EJB section were all quite valuable. In each case he starts with a clear problem definition, or antipattern, provides a clear real-world example of an application that falls into the trap of using the antipattern, and then describes step-by-step how to refactor to eliminate the antipattern. When done right, this method of presentation is very effective.
Unfortunately, I think that his discussions of many of the other topics in the book, other than those mentioned above, leave a bit to be desired. In many cases, he does not provide enough contextual detail about the problem or the solution to convey a very good picture of what is going on.
Additionally, perhaps it is only because this was his first book, but Bruce Tate doesn't strike me as a terribly good writer. At certain times the book is a bit repetitive. At others, it is contradictory. For instance, he introduces the round-tripping antipattern multiple times throughout the book - each time treating it as though it were a semi-new topic. Early on he mentions the evils of pre-mature optimization, but then later on emphasizes the importance of considering performance early on in a project - without making a clear distinction as to when, specifically, this applies (a good software developer should be able to figure this out, but it still struck me as slightly annoying). In the code hygiene section, he states that one should almost never handle the raw Exception class, and yet he, himself, does this in almost every code example he presents throughout the book!
Additional small annoyances abound. Why the hell does he put (a rather incoherent, mind you) discussion of XML in the same chapter as database connection pooling. And for the love of god, why does he discuss CamelCase and Java interfaces in a book that should clearly be aimed at the (very least) intermediate Java developer!?
I get the feeling that the book originally began life as a loose collection of essays that the publisher tried to stitch together and pass off as one coherent book...and in some places the seams painfully show.
Still, these are mostly minor annoyances. In the end, I think that the positives of the book (the good sections) still outweigh the negatives, and any software developer worth his salt should be able to separate out the kruft from the cream. If you can do that, then Bitter Java is a fairly good book for getting up to speed on a wide variety of Java problems in a short period of time.