Pair programming on the path to excellence

Pair programming is one of my favorite ways to build team cohesion and boost productivity.

It promotes effective collaboration, shared context, and a sense of collective ownership. This is true for remote, hybrid, and in-person teams.

These things not only improve performance — they also strengthen social ties among teammates.

Here, I’ll discuss each of the key benefits that make me bullish on pairing.

Terminology
Terminology

Throughout this article, I’ll refer to pair programming as pairing and your pairing partner as your pair.

Flow state

Flow states and deep work aren’t reserved for flying solo.

You can achieve flow with a pair, and it builds a lot of rapport.

In fact, when done right, pair programming can be even more conducive to a flow state than solo coding.

Why?

1. Accountability

There’s accountability to avoid environmental distractions, like picking up your phone. That would be rude to your pair.

2. Avoiding rabbit-holes

You and your pair can keep each other from going down rabbit-holes. (e.g. “I see this error all the time — this is normal, I don’t think it’s worth investigating.”)

3. Unblocking each other

One of my favorite parts of pairing is when your combined knowledge allows you to move faster than either of you would be able to move individually.

One person might know more about a particular part of the system, for example. Or be more comfortable with React hooks. etc.

Shared context

Hitting flow while pairing feels great, and there’s an analogous feeling on a larger timescale: having a detailed shared understanding of a system.

That shared understanding allows you to have nuanced discussions of architectural changes, edge-cases, and refactors.

Just like a flow state, this is also an addicting feeling.

...and pair programming is a great way to build that shared context.

This is particularly helpful during pivotal moments in projects, like the start — while designs are still taking shape — or during performance tuning, when you have to get deep into the weeds to understand the system.

Plus, in addition to system-level context, you also get to share small workflow and tooling tips, which can boost productivity significantly.

Building a shared sense of ownership

In my experience, one of the most important feelings on a team is a shared sense of ownership over systems and goals.

It’s very different to simply work with a system vs be a steward of that system.

While pairing, the most toilsome and time-consuming parts of our tooling often surfaces.

You and your pair will likely commiserate about it — “oof, this part always takes forever.”

That can quickly turn into a brainstorming session into how to fix those paper cuts.

Over time, these investments add up. Your systems become more stable and maintainable, and you operate them with more ease.

Conclusion

Working together like a well-oiled machine is super energizing!

We often try to build this rapport on teams through social events — and those are good.

But don’t forget that building software is — I would argue — an inherently collaborative and social experience.

By pair programming, we can tap into that, making work more productive and fun.