Review - Test-Driven Development by Example
I recently reviewed Kent Beck's "Test-Driven Development by Example". It got pretty good reviews on Amazon, but I have to admit, it didn't really do too much for me. I rated it at six horseshoes, which is three stars on Amazon. I've read pretty much every book on TDD and unit testing, and this has been the worst of the lot in my opinion. It was okay, but definitely I could have gone my whole life without reading it and not been any poorer for it.
The meat of the book rests in two sample projects which are used to demonstrate the TDD process. The first one, which Beck refers to as "The Money Example", was my favourite of the two. It's a nice simple easy-to-follow introduction to TDD suitable for a complete novice to follow and gain some clue as to what this whole TDD thing is all about. I had always referred people to Bob Martin's bowling example in the past, but this one goes into a bit more detail and involves a bit more hand holding.
The second example was an implementation of xUnit. Only in this chapter do we finally begin to get some clue what the xUnit API really is, even though he used it without comment throughout the first example. For some reason Beck thought it would be a good idea to switch to Python for this example. I'm sure Python is a fine language and all, but let's not make the readers work any harder by making them come up to speed on a language that likely the vast majority aren't using. It's not that it was so difficult to figure out, it's simply that it was an unecessary barrier placed in front of the reader.
There were other things I didn't care for about this book, but I pretty much addressed those things in my review, so there's no need to repeat it. I found the David Astels title test-driven development: A Practical Guide to be a much more useful introduction to TDD in just about every way (see my review here and here). If you primarily work in Java, you should gain much more from the Astels book than you will from this Beck title.
