Book Report: Growing Object-Oriented Software Guided by Tests

Buy Growing Object-Oriented Software Guided by Tests on AmazonI just finished reading Growing Object-Oriented Software, Guided by Tests by Steve Freeman and Nat Pryce. Brandon Keepers recommended this book in his talk “The Plight of Pinocchio: JavaScript’s quest to become a real language” at BackboneConf in June. It’s a pretty good start for thinking about Test Driven Development and application design.

The Good Stuff

The book does a great job of explaining good application design: separation of concerns, encapsulation, and modular design connected through messaging. Some of the points raised here immediately struck a chord with me. Inspired by this book, I’ve done some refactoring of my current project over the last couple of days, which resulted in a more stable application (in my opinion) and removed about 2,000 lines of code.

The book also hits on some of the good conceptual stuff to keep in mind when developing tests. I’m definitely inspired to implement testing in my current and future projects. I’ve played with QUnit before, and I’m going to give Jasmine a shot.

The Lesser Stuff

My biggest complaint—though your mileage may vary—was that this was far more reliant on Java syntax than advertised. I was expecting a far more conceptual book. About half the book is a step-by-step walk-through of developing an application using Test Driven Development. I was able to pick out a lot of the concepts, but the examples were heavily dependent on reading Java and understanding how the Java-specific testing suites the authors used worked. To be fair, there is a good overview of the tools used, but as someone who doesn’t deal with Java every day, I found myself completely skipping the code examples and scanning for the concepts.

The Verdict

If you’re a Java programmer looking to start unit-testing your code, I would say this is a 100% no-doubt must-read. If you’re programming any other language, I’d say it’s useful to a point, but maybe keep an eye out for a more language-agnostic guide. I know I will.