One of best ways to get the full effect of pair programming is if everyone programs with everyone else. This maximizes learning in the team. Here are three simple tricks we’ve found useful to get the pair programming to flow better.
- Magnets: Getting away from task ownership is essential to get pair programming to work. Instead of writing names on the cards that represents the tasks the team is working on, we place magnets with pictures of the team members on top of the tasks on our task board. This helps people remember that they don’t have to permanently commit to a task. Moving the magnets around during the stand up meeting is a good way to discuss how to organize the work today. We try to keep one person and exchange one person on every task every day.
- Pair programming star: Deliberate rotation fosters learning in the team. Write the names of all team members in a circle on a whiteboard in the team area. Every day two people pair program, draw a line from the name of one to the name of the other. This both becomes the team’s own indicator of success, and an “excuse” to ask someone you haven’t programmed with if you could pair up with them today.
- Don’t sweat it: When I started pair programming, I found it exhausting! It felt like I never had time that I needed to ruminate over the problems and that I never had chance to explore solutions on my own. During this period, it’s helpful to remember to give people the time they need to think through problems on their own. I do prefer that the code that’s actually checked in is pair programmed, though.
When I started pair programming, I found it to be an obstacle for getting into flow. After a few weeks, working solo has become an obstacle to getting into flow. You got to give it some time and take the breaks that you need along the way.
With pair programming, the teams share responsibility, pull together and have more fun!
1+ for giving each other time and breathing room. When we started doing “pairing all the time” in my last project I found it bloody exhausting. Fortunately it became more bearable once we forced ourselves to take more breaks, split up the more explorative/reflective work etc.
XP is clear on promoting “production code is pair programmed”, for a reason. :)
Overall, this is a great set of ideas.
Keep in mind that people need to learn how to pair program. I have worked with several teams where people were told to pair, but never taught how. This results in some very bad habits that become hard to break.
Just draw a pair programming star on the whiteboard. Thanks for the tip!