← All articles

Pair Programming in Scrum: Does It Actually Work?

By XNM Technologies · January 14, 2023 · 4 min read
Pair Programming in Scrum: Does It Actually Work?

Pair programming — two developers working together at a single workstation, one writing code and the other reviewing it in real time — is one of the practices most associated with Extreme Programming (XP) and one of the most contentious to introduce into a Scrum team. Advocates point to the research on code quality. Sceptics point to the apparent inefficiency of two people doing one person's job. Neither position is entirely right, and the teams that get the most value from pairing are generally those that approach it with the nuance it deserves rather than as either a universal mandate or a categorical rejection.

What Pair Programming Actually Is

The standard model has one developer acting as the "driver" — writing the code, managing the keyboard and screen — and the other acting as the "navigator" — reviewing, thinking ahead, catching errors, and considering the broader design implications of what is being written. The roles switch regularly, typically every 25 to 30 minutes, so that both developers stay engaged and both accumulate understanding of the code.

The Empirical Evidence

The research on pair programming is more consistent than the practice's contested reputation suggests. The most cited study, by Williams et al. (2000), found that pair programming produced code with approximately 15 percent fewer defects than solo programming, at a cost of roughly 15 percent more developer time. The defect reduction is consistent across subsequent studies; the time cost varies but the consensus estimate is in the 10 to 15 percent range for equivalent functionality.

The quality differential is explained by the continuous code review pairing provides. The navigator catches logical errors, design inconsistencies, and edge cases that the driver misses while focused on immediate implementation. The result is that defects are caught before they are committed to the codebase, rather than discovered during testing or in production.

The other well-documented benefit is knowledge transfer. Pairing is one of the fastest ways to bring a new team member up to speed on a codebase, because they are working directly in the code with someone who knows it, rather than reading documentation and asking questions in isolation. It also reduces the concentration of critical knowledge in individual team members, which is a systemic risk in any development team.

When Pair Programming Works Best

The conditions under which pairing delivers the highest value are identifiable. Complex logic — problems where the design space is large, the risk of a poor architecture decision is high, and the value of a second perspective is correspondingly great — is the strongest use case. When a developer is implementing something they have never done before, having a navigator who can think about the broader implications while the driver focuses on the immediate problem is genuinely valuable.

Onboarding is another high-value context. A new team member paired with an experienced one learns the codebase, the team's conventions, and the unwritten rules of the system far faster than through any other method. The fresh perspective a newcomer brings also frequently surfaces real problems in code that has been taken for granted.

Critical code — security-sensitive logic, financial calculation engines, integration points with external systems — benefits from the defect reduction that pairing provides. The extra investment in time is well justified when the cost of a defect in production is high.

When It Does Not Work

Pair programming is poorly suited to simple, repetitive tasks. When the work is straightforward — routine configuration, boilerplate setup, well-understood changes to existing code that follows an established pattern — the overhead of coordination between two developers outweighs the quality benefit. The navigator has little to contribute, both developers know it, and the session becomes an exercise in mutual boredom.

Time pressure and working style mismatches are the other common failure modes. When a team is behind schedule, the 10 to 15 percent time premium that pairing carries feels intolerable — even though splitting the work independently will produce more defects. And not all developers pair effectively: forcing pairing on two people whose styles are incompatible produces stress and poor code. The skill of pairing is learnable, but it takes time to develop.

How to Introduce Pairing Without Making It Universal

The most effective approach is selective and voluntary. Identify where pairing adds the most value — complex new features, critical code, onboarding — and make it the default for those situations without mandating it everywhere. Teams that try pair programming on the right work, at a comfortable pace, and with genuine reflection tend to expand its use naturally.

A short retrospective after a pairing session — what went well, what was difficult — accelerates the team's development of pairing skill more effectively than any training. The goal is to make pairing a genuine option in the toolkit, deployed where it fits, rather than a mandate that generates compliance without commitment.

XNM Consulting works with development teams to build agile practices that deliver quality outcomes at a sustainable pace. Learn more about our program and project delivery services.