Pair programming is more than just a way to build software, it’s the way we build teams.

Great software is made by great teams.

At Test Double, we value pair programming, and over the years we’ve refined our technique. These are some things we’ve learned that make a difference, which together form an ethos that helps us create stronger relationships and improve the way we work.

When we pair, we have the unique opportunity to combine the experiences of two different people in the most high-fidelity way possible. There is no asynchronous communication to misinterpret, no meetings to coordinate, just two people working together with a shared purpose. Use pairing time to share decision making, share direction, and share the evolution of a solution.

Pairs also share context – both people become experts in the solutions they develop. Continued pair programming, especially when switching pairs regularly, promotes pollination of better patterns and more consistency across the code base.

No matter how much experience we gain, nobody knows everything about software. In fact, there’s a good chance that nobody knows everything about your codebase. We also tend to overvalue technical experience at the expense of domain knowledge, communication, and plain common-sense.

Pairing allows for diverging roles. One person can confidently focus on the mechanics of the code, knowing their pair is thinking about how the code interacts with the system and how their intent is communicated through code design.

Leadership within a pair is fluid, not static. Acknowledging this allows the work to benefit from a breadth of experience and perspective. For this to work, a pair needs to listen to each other.

Pairing produces more than just better technical solutions. It also makes people better developers and better team members.

Developers naturally cross pollinate the best tactics and techniques when they pair. Pairing offers excellent opportunities to learn and teach new tools and patterns.

Even more importantly, successful pairing depends on communication and empathy. Taking time to do these things well builds stronger, more trusting relationships. As we pair together, we find opportunities to become more open, vulnerable, and accessible.

The more we rush, the less we see these benefits. Give yourselves time and permission to explore, learn, and teach.

Pair programming is intense work. It’s tiring to explain your thought process and negotiate with another person all day. Recognize this, and be aware of the need to take a break. Talk openly with your pair about your needs and encourage them to identify theirs.

We are humans, not always-on pairing robots. Be considerate and think about what each person needs. Rotate roles and adapt schedules to keep everyone engaged and happy.

We don’t do pair programming because it’s easy. In fact, like a lot of worthwhile things, it’s hard. So cut each other some slack.

Assume that everybody wants to do a good job. Allow your pair to make mistakes, complete thoughts, and try things which may not work. Resolve that everyone who pairs with you should feel safe.

The goal of pairing is not the best code you can produce, but the best code you can produce together.