Ping Pong

Facilitating

Learning Goals

  • Learn and practice the basics of Test-Driven-Development.

Description

Ping pong is one of the most basic activities used when teaching TDD. The rules are simple:

  • Work in pairs (of course, at a coderetreat, we are always working in pairs)
  • Person A only writes tests (test code only)
  • Person B only tries to get the tests to pass (production code only)
  • Both persons refactor when approprate

During the activity, it a good idea to ask participants to switch roles. Person B becomes the test writer, and Person A becomes the test taker (or the person who gets the tests to pass).

Depending on how quickly the pairs pick up the activity, you can ether ask participants to swap roles in the middle of the session, or you can repeat the exercise and ask participants to switch roles in the next session.

When to use

This is a good activity to use with groups who are very new to TDD. It can be used as early as the 3rd session.

When NOT to use

Ping pong is typically not appropriate for groups which are already familiar with TDD (too basic).

Notes

Ping pong is often combined with other activities. For example, it is used as part of the Mute with Find the Loophole activity.

Further Reading

 

Back to the Activity Catalog

© 2014   Created by corey haines.

Badges  |  Report an Issue  |  Terms of Service