I have to admit, the very first thing that drew me to Kent Beck’s book Test Driven Development: By Example was his casual, easy writing style. While his audience is clearly not the faint of heart (Beck isn’t preaching to initiates; those without a prior knowledge of programming very definitely need not apply), Beck doesn’t assume the role of an automaton, much like some other software development books tend to do. Beck is casual and funny, a breath of fresh air in a book genre that’s often coma-inducing in style.
That said, Beck’s book isn’t being reviewed because it’s a New York Times bestseller; it’s here because it’s a book on Test-Driven Development, a software development model that has recently gained traction in the field of programming. The idea behind test-driven development is quite simple- by writing test cases before writing actual code, code can be written to fulfill the specific test and therefore remain as simple and streamlined as possible. Beck takes the reader through the method by with two samples as well as his own philosophies and personal anecdotes concerning software development and the method in question.
But does test-driven development hold up, especially in Beck’s presentation? It most certainly does, especially with the examples and easy-going style. While test-driven development isn’t the most complex of ideas in concept, it can be hard to get a feel for how to implement this sort of model practically. Beck does a good job of walking the reader through his examples and test cases using Java and Python; the book is broken up into short chapters and there are few points where it feels that Beck is going too fast or losing the reader in the walkthrough for that particular sample project.
The other very welcome aspect of “Test-Driven Development” is its difficulty. Newcomers to programming or software development need not apply. Beck assumes a knowledge of Java, jUnit, and Python to get through his sample cases, with Java being the language for the first and Python the second. If you’re not familiar with the jUnit API prior to reading, as I wasn’t, there is a bit of background research required to feel comfortable enough writing test cases using Beck’s methodology; this would not be a hurdle for anyone with some experience in the field, but Beck is clearly writing for veterans- script kiddies need not apply here.
The only real downfall of the book is the book’s length. Beck is clear and concise- perhaps too concise. By the end of the book, I wasn’t entirely sure that I had a great handle on test-driven development for enterprise-level projects; his sample projects, while well-crafted and informative, aren’t exactly clear on how to scale up to larger products that the typical reader might be seeing in a real-world environment. The book feels much more like an introduction to test-driven development than a handbook for enterprise-level development. If you are an advanced developer already familiar with the method, you may not find much more here; if you’re new to it, however, you’ll find a very fast and informative read on the basics of test-driven development as well as some practical examples on how to get started.
Overall, I have to give four out of five stars to “Test Driven Development: An Example”. It’s well-written, easy-to-read, and leaves you with a pretty solid handle on the basics of test-driven development, as well as some practical examples concerning the craft. It loses a star because of its short length and the fact that Beck doesn’t quite make the transition to enterprise development clear; that said, however, I recommend the book to anyone looking to get a very solid introduction to test driven development, especially to Java developers!Our Rating: