As I’ve matured as a pair programmer in an agile environment, I’ve been able to first hand experience some of the ways to be a bad partner and a good partner when pair programming. One of my major problems was I had a tendency to either hog the keyboard, or I would do what I like to call Backseat Driving: you let your partner drive, but you dictate exactly what they need to type. A typical example (in the most extreme sense) of this might be something along these lines:

Driver:(Looks at test case of seemingly random assertions) So what do we need to do to make this test case pass?

Navigator:Well, let’s get started. Go to the Duplicator class, to line 328. Now, see where it does the string comparison? Type STRING DOT value of … parenthesis…. no, open parenthesis… id number, no the n in number is upper cased… closing parenthesis. Now, add a semicolon.

Driver:(Types) Now what?

Navigator:Call method oogleBoogle in the class SnaglePop and pass the new variable we got by converting the idNumber to a string to it.

Driver:Why are we doing that?

Navigator:That doesn’t matter now, we need to get this done. Now open up…

It’s probably pretty obvious that this pair programming session is going to go downhill fast.
Read More »