Site Search

My status

News


Recent Articles



Advertisements

Pair Programming Game

 

Timing: 1+ hours

Ingredients:

* IDE + Unit Testing tool
* Timer

Directions:

Programmer 1 writes a test and challenges Programmer 2 to make it pass. Programmer 2 attempts to make it pass in as short of time as possible and then writes another test to try to stump Programmer 1. This test could be to fill any gaps that were exploited in the previous test, or to test another part of the system. This continues until all features have been implemented. A winner can be chosen based on total time taken to make tests pass. After each test passes, both programmers collaborate to refactor the solution. This time does not count towards the final score.

Learning Points:

* This game highlights the essence of Test-Driven Development, by only writing code for failing tests.
* Programmers end up producing the simplest solution that works. They then must have the discipline to refactor the solution when code-smells emerge.