[Dustin Shaffer]

TDD as an Adversarial Game


TDD plays like a game when used with Pair Programming.

We play on System X.

  1. Player 1 attempts to write a test that will fail given the current state of System X.
  2. Player 2 attempts to fix System X in correspondence to this new failure.
  3. Repeat.

Player 1 is the attacker, Player 2 is the defender.

The individual attacks are small, but they keep the defender busy.

The defender tries to patch System X with as little work as possible - to avoid failing old tests, and to catch up with the wrath of the attacker.

How does ‘work as a game’ effect a pair programming team?