Some notes about pairing

Pair programming is simply when two (and it can also be three) people work on a programming problem together, usually using a single screen and keyboard.

When pair programming for the first time, treat it as a structured dialogue.

Here is an initial list of questions:

  1. When defining a new procedure are you using a sensible name? And is it obvious at first glance what the procedure is for?

  2. What are the inputs for the procedure? Are these inputs reflected in the arguments? And have you given the arguments sensible names?

  3. Do you expect the procedure to have a return value and if so what do you expect it to be?

  4. What’s a sensible first test for the procedure? Is this the simplest possible test that you can think of?

  5. How many steps have you broken the problem into and can you break it down any further?

  6. As you work through the problem, are all your passing tests still passing? If not, why not?

  7. Are you adding tests as you go? And what test are you going to add next?

  8. Are you using sensible names for all your variables? Is it obvious at first glance what each of them is being used for?

DS