top of page

Pair Programming: When It Works and When It Doesn't

  • ShiftQuality Contributor
  • Jan 2
  • 4 min read

Two developers. One computer. One writes code (the "driver"), the other reviews, thinks ahead, and navigates (the "navigator"). They switch roles regularly. This is pair programming, and depending on who you ask, it's either the most effective development practice ever or an expensive way to halve your output.

Both views contain truth. Pairing is powerful in specific situations and wasteful in others. Treating it as always good or always bad misses the point. The skill is knowing when to pair and when to work alone.

When Pairing Works

Onboarding New Team Members

A new developer joining the team learns more in one day of pairing with an experienced team member than in a week of reading documentation. They see the codebase in action, learn the team's conventions, understand the unwritten rules, and can ask questions in real time.

The experienced developer learns too — explaining why things are the way they are often reveals assumptions that are worth questioning. The new person's fresh perspective catches things the team stopped seeing.

This is pairing's highest-value use case. The knowledge transfer is fast, deep, and bidirectional.

Complex Problem-Solving

When the problem is genuinely hard — a subtle bug, a complex architectural decision, an algorithm that needs to be correct — two minds are better than one. Not because two people type faster, but because they think differently. The driver focuses on the immediate code. The navigator thinks about edge cases, design implications, and the bigger picture.

Hard problems benefit from the navigator catching mistakes in real time rather than in code review, and from the continuous discussion that surfaces assumptions and blind spots.

High-Stakes Code

Code that handles money, security, or safety. Code that's expensive to get wrong. Payment processing, authentication, data migration, critical infrastructure changes. The cost of a bug is high enough that the "inefficiency" of two people on one task is cheap insurance.

Pairing on high-stakes code isn't about speed. It's about correctness. Two people reviewing every line as it's written catches errors that solo development and later code review miss.

Knowledge Sharing

Two developers from different specialties pair on a task that crosses boundaries. A frontend developer and a backend developer building a feature together. A developer and a data scientist integrating a model. Each person brings expertise the other lacks, and both learn from the collaboration.

This is investment pairing — the time is spent to build capability, not just to complete the task.

When Pairing Doesn't Work

Routine, Well-Understood Work

Adding a standard CRUD endpoint that follows the existing pattern. Writing tests for straightforward logic. Fixing a CSS layout issue. Tasks where the solution is known and execution is mechanical don't benefit from a second brain — they just cost a second salary.

If the driver wouldn't benefit from a navigator's input, pairing is overhead. The navigator gets bored, checks their phone, and both people would be more productive alone.

When the Power Dynamic Is Wrong

If one person dominates — dictating every keystroke, dismissing the other's suggestions, or treating the session as a performance — the "pair" is really one person working with an audience. The other person disengages, learns nothing, and dreads future pairing sessions.

Effective pairing requires roughly equal engagement. Both people contribute. Both people learn. If the dynamic is teacher-student with no dialogue, it's a lecture, not a pair.

When People Need Focus Time

Some work requires deep, uninterrupted concentration. Pairing introduces constant interaction, which is the opposite of deep focus. If a developer needs four hours of uninterrupted thought to work through a complex algorithm, pairing during those four hours is disruptive.

Respect the need for solo focus. Pairing and solo work aren't competing modes — they're complementary tools for different situations.

When It's Mandated for Everything

"We pair on all code" is a policy that ignores context. Some tasks benefit from pairing. Many don't. Mandatory full-time pairing exhausts people, wastes time on routine work, and creates resentment.

Effective teams pair selectively — for the situations where it adds value — and work solo the rest of the time.

How to Pair Well

Switch Roles Frequently

Every 15-30 minutes, swap who's driving and who's navigating. This prevents one person from dominating and keeps both people engaged. A navigator who's about to become the driver in 10 minutes pays closer attention than one who's watching for an hour.

The Navigator's Job Is Thinking, Not Watching

The navigator isn't a passive observer. They're actively thinking: "Is this the right approach? What edge cases are we missing? Should we refactor this before we continue? Is there a simpler way?" They voice these thoughts.

A navigator who silently watches is wasted. A navigator who constantly interrupts is disruptive. The balance: speak up when you see something worth discussing, stay quiet when the driver is in a productive flow.

Take Breaks

Pairing is more mentally taxing than solo work. Two hours of focused pairing is a full session. Take a 15-minute break, then decide whether to continue pairing or split up. Nobody pairs effectively for 8 hours straight.

It's Okay to Stop

If the pairing isn't productive — the problem turned out to be simpler than expected, both people are tired, or the dynamic isn't working — stop pairing. "Let's split up and reconvene later" is always a valid option. The practice should serve the work, not the other way around.

Remote Pairing

Remote pairing requires screen sharing and good audio. VS Code Live Share, Tuple, or screen sharing through Zoom/Teams — the tool matters less than the connection quality.

Audio is more important than video. You need to hear each other clearly. You don't need to see each other's faces. Many remote pairs turn off video and just share the screen plus audio. This reduces bandwidth and cognitive load.

Latency kills remote pairing. If there's a 500ms delay on screen sharing, the navigator is always half a second behind what the driver sees. This makes real-time collaboration frustrating. If your connection can't support low-latency screen sharing, async code review might be more effective.

Key Takeaway

Pair programming is valuable for onboarding, complex problem-solving, high-stakes code, and cross-specialty knowledge sharing. It's wasteful for routine work, when power dynamics are wrong, when deep focus is needed, or when mandated unconditionally. Pair selectively. Switch roles every 15-30 minutes. The navigator thinks ahead, not watches. Take breaks. And stop when it stops being productive.

Comments


bottom of page