During our last retrospective session, my team asked if we could learn ways to use the practice of pair programming more effectively. You can define pair programming as the practice of having two developers co-create a software feature together. In most cases, the developers utilize a single computer workstation and take turns acting as coder and supporter. During a pair programming session, team members continually share design ideas and implement those ideas into code. The practice of pair programming originated from the disciplines of Extreme programming.
Benefits of pair programming:
- Sharing knowledge and techniques among the team: One of my favorite Scrum trainers, Doug Shimp, promoted this wonderful statement on agile team culture: “No mind works alone.” In my experience, I have enjoyed using pair programming to help new team members learn techniques, problem domains, or technologies quickly. Every developer (young or old), has a wealth of knowledge, tips, tricks, and wisdom to share. During these pair programming sessions, I force myself to externally verbalize what I’m thinking about. We typically swap the role of coder every twenty minutes or so.
- Pair programming leads to a stronger design: In the past sprint, my team talked about how a pair programming session dramatically reduced the complexity on a design. I love hearing stories like this! Honestly, I’ve had many experiences where a junior developer shared a new technique or idea during a pair programming session that dramatically simplified a design or made our code more robust. “No mind works alone” is a wonderful principle for all teams.
- Pair programming can reduce defects: It’s pretty well documented that the practice of peer reviews can reduce defects in code. Pair programming has a similar property since the team members continually discuss their design and implementation details.
Honestly, I would like to improve my practice of pair programming and share this practice more effectively with my teams. To that end, I found a few blog posts that I found insightful. I want to become effective in honoring their autonomy and journey of software engineering mastery. I hope I become an effective coach for them and pass on patterns for design and problem solving.
- Pairing with Junior Developers by Sarah Mei: A coaching that I appreciated from this blog post is the idea that new developers should probably hold the role of “coder” more than the senior developer. We all learn most effectively by building and making stuff. I also appreciate the concept of treating your partner as a peer. We should have the opportunity to learn from our partner.
- Try pair programming by Lucy Bain: Very nice summary from atlassian.com.
- “All I Really Need to Know about Pair Programming I Learned in Kindergarten.”
What do you do to become more effective with pair programming? I would enjoy to hear your thoughts.
Photo credit: Menlo Innovations