This latest edition of the Carnival focuses on what is rapidly becoming a cornerstone of agile methods: Test-Driven Development. Or Test-Driven Design if you prefer. Or Example-Driven Development. Or Behaviour-Driven Development.
First up, Jeremy Miller discusses Designing for Testability: “I have yet to see a codebase that wasn’t built with TDD that was easy to test.”
New blogger Eric Mignot gets a lot of Pleasure from introducing a developer to the joys of TDD: “He had discovered that even if you don’t use it from the beginning of your project, TDD is the most fun and efficient way to correct bugs.”
And David Laribee speaks about the suspension of disbelief to those who have never tried TDD, afraid to make the leap of faith: “Check your disbelief at the door, stay in the cycle, and wait for the payoff. A bit further down the path, when you’ve finished the story and tests are passing, you’ll all of a sudden have a working, shippable, F5-able feature without ever having hit the debugger.”
Brian Marick laments the standard pitfall of demonstrating TDD using an existing codebase: “The usual reason it fails is that the code wasn’t written test-first, so it’s hard to do anything without instantiating eighteen gazillion objects.” So Brian has created a (draft) TDD workbook, in which you get to add features to a real application that has already been developed for you using TDD; potentially the best of both worlds.
When it comes to writing good tests (as opposed to just writing tests), many bloggers – most recently James Newkirk – have mentioned or reviewed Gerard Meszaros’ xUnit Test Patterns, which Eugene Wallingford says is really three books in one: “I have the best of two worlds: a relatively short, concise, well-written story that shows me the landscape of automated unit testing and gets me started writing tests, plus a complete reference book to which I can turn as I need”.
If you prefer behaviour-driven development (BDD) to TDD Dan North has recently developed rbehave for Ruby: “Inspired by [rspec], I wanted to find a simple and elegant way in Ruby to describe behaviour at the application level.” Moments later Joe Ocampo ported the idea to NUnit for C# too! The BDD world is fast-moving right now, with new tools and new experience posts popping up all over; is it the “next big thing”?
And finally, please nominate someone for one of this year’s Gordon Pask awards. If you don’t know what they are, or what they mean to the software development community, read the thoughts of Laurent Bossavit, one of last year’s winners. And then nominate someone from your corner of that community.
(While putting this carnival together I was shocked to discover that many recent “TDD” blog posts involved writing code and then writing tests. As so often, it seems the buzzword has greater velocity than the practice itself…)
To suggest items for a future carnival – especially from a blog we haven’t featured before – email us at email@example.com. All previous editions of the Carnival are referenced at the Agile Alliance website. The next carnival is due to appear around July 19, hosted by Pete Behrens.