SPA Conference session: Test-Driven Development as if You Meant It

One-line description:Explore the impact of Unit Tests used as a design tool
Session format: Tutorial (75 mins) [read about the different session types]
Abstract:"TDD" is probably the highest profile and most widely adopted technical practice from the Agile toolkit.

Often, it means "test-first" development, which is fair enough. Some practitioners insist, though, that by using tests to truly drive development (the second 'D' in "TDD") something quite interesting can happen to your design.

This session is an opportunity to explore that claim.

Audience background:Programmers.
Benefits of participating:Gain an appreciation of the possibilities of TDD as a design tool.
Materials provided:a few slides outlining the maximum-discipline interpretation of TDD and describing a problem domain to address
Process:Attendees will pair program to solve a small programming problem but using a very strict interpretation of TDD.

That interpretation is:
1) write exactly ONE failing test
2) make the test from (1) pass by first writing implementation code IN THE TEST
3) create a new implementation method/function by:
3.1) doing extract method on implementation code created as per (2), or
3.2) moving implementation code as per (2) into an existing implementation method
4) only ever create new methods IN THE TEST CLASS
5) only ever create implementation classes to provide a destination for extracting a method created as per (4).
6) populate implementation classes by doing move method from a test class into them
7) refactor as required
8) go to (1)
Detailed timetable:00:00 - 00:15 explain the process
00:15 - 01:00 programming
01:00 - 01:15 highlights and lowlights
Outputs:hopefully a version control system can be set up to capture the code written by attendees as it evolves, which will subsequently be studied and some conclusions published somewhere.
History:This was one of the most talked-about sessions at Software Craftsmanship 2009

It has been run subsequently at AltNetUK used in coding dojos and will be run at QCon San Fran later this year.
1. Keith Braithwaite
Zuhlke Ltd
2. 3.