Sunday, January 30, 2005

Pair Programming with Pair rotation

My colleague Vivek once blogged about the way we pair in our team. I would say it is like an acquired taste, some people like to pair and some do not. I used to hate pairing earlier , until in this project we started rotating pairs frequently. You get a chance to work with a different person every day, and get a different view of the codebase. Opinions vary and often new ideas come out.

To contrast what Vivek had written , our team size has scaled down temporarily to only 2 developers. Hence I am "stuck" with the same pair. What now happens is that we have developed almost the same kinds of opinion about the code. Over a period of time , it becomes really boring because you for sure know what your "life long" pair is thinking. So if this pair does not beleive in test-first development, you will never get a chance to do that as long as you pair with the same pair. That is probably why I feel we should change pairs after a max of 2 days. Best is to rotate pairs , when finished with a reasonably sized chunk of task.
There is definitely something to learn from every team member. Pair rotation gives you a chance to learn by working with each member closely.
Brent, Paul and I came up with 6 commandments for Pair Programming in our team .
  1. No story work without a pair ..... ever.
  2. Switch pairs often, ideally at the end of a reasonably sized task.
  3. No heroes in the team. ( Everyone knows about the codebase well enough )
  4. After pair switch , newbie to the story must drive.
  5. Driver cannot drive for more than 10 minutes straight.
  6. Driver should think out loud especially if it relates to lunch. ;-)

This worked well for a small sized team , a max of 4 pairs. Wonder what are the experiences in larger XP teams ...?

No comments: