Thursday 15 March 2007

"How do we know we're done?" - Test Driven Development - Steve Freeman

Steve spoke about Test Driven Development, showing some examples, driven using the magic formula:
  • Write a test
  • Make it pass
  • Refactor
Design is driven from how things are used, not how they are written. Development is driven with design in mind, and gives the developer continual reinforcement of success. Steve spoke of the importance of taking tiny steps, one at a time, encouraging developers to explore the space, the problem and your knowledge to deliver quality built in to the product.

Later Steve discussed the fact that TDD enables you to defer your decisions, for example giving you confidence in refactoring situations.
  • Forces the developer to put themselves in the place of the caller of the code.
  • Forces a fine grained modular fashion.
  • Keeps them neat and clean.
Often, there are views that TDD is too much work. Some counters to this line of arguments are:

  • Most of time is spent reading code.
  • Include debugging time - if you get good at this, debugging time drops dramatically.
  • Reliable code lets QA focus on larger issues.
  • It becomes critical when you scale up - it enables you to scale up cheaply and safely - particularly around teams.



Reading:

TDD Yahoo Groups

No comments: