TDD Masterclass

I recently attended a two day TDD training course by Jason Gorman.

Although we practise TDD on a daily basis, I was interested to see if we are applying all the practises correctly or see if we are missing out on anything.

The Jason presented what he called the baker’s dozen of TDD practises.

  1. Write a failing test
  2. Write the assertion first
  3. Don’t refactor with a failing test
  4. Isolate tests from each other
  5. See the test fail
  6. Triangulate
  7. Organise tests to reflect model code
  8. Write the simplest code to pass the test
  9. Choose meaningful names
  10. Test one thing in each test method
  11. Refactor to remove duplication
  12. Keep test and model code separate
  13. Maintain your tests

The great way Jason reinforced these practises was to apply another great agile practise, pair programming. In pairs we applied TDD to solve various programming problems, e.g. generating Fibonacci numbers, FizzBuzz, etc. Solving these problems in pairs was the most enjoyable aspect of the course. By enforcing frequent pair rotation I met a lot of nice people plus I even got a taste of TDDing in C#!

So what did I find in the end? We are doing pretty well at youDevise. We nearly apply all the practises (we can probably do triangulation more). Overall, I think the course is a good introduction to TDD, especially learning through pair programming.

Leave a Reply

Your email address will not be published. Required fields are marked *