Three tricks to get better pair programming

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!

Copyright © 2011 Johannes Brodwall. All Rights Reserved.

About Johannes Brodwall

Johannes is Principal Software Engineer in SopraSteria. In his spare time he likes to coach teams and developers on better coding, collaboration, planning and product understanding.
This entry was posted in English, Extreme Programming, Pair programming. Bookmark the permalink.
  • Anonymous

    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.

  • http://wendt.se/ Fredrik Wendt

    XP is clear on promoting “production code is pair programmed”, for a reason. :)

  • http://twitter.com/fuzzylizard2 Chris Johnston

    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.

  • http://twitter.com/tormaroe Torbjørn Marø

    Just draw a pair programming star on the whiteboard. Thanks for the tip!