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:
-
When defining a new procedure are you using a sensible name? And is it obvious at first glance what the procedure is for?
-
What are the inputs for the procedure? Are these inputs reflected in the arguments? And have you given the arguments sensible names?
-
Do you expect the procedure to have a return value and if so what do you expect it to be?
-
What’s a sensible first test for the procedure? Is this the simplest possible test that you can think of?
-
How many steps have you broken the problem into and can you break it down any further?
-
As you work through the problem, are all your passing tests still passing? If not, why not?
-
Are you adding tests as you go? And what test are you going to add next?
-
Are you using sensible names for all your variables? Is it obvious at first glance what each of them is being used for?
DS