Pair programming is two developers working on the same code at the same time: one types, the other reviews and thinks ahead, and they switch often. It sounds like paying two people for one person’s work. Done at the right moments, it’s the opposite: two brains catch problems earlier, make better decisions and finish with code both of them understand.
Driver and navigator
- The driver has the keyboard and focuses on the line being written.
- The navigator watches the bigger picture: the next step, edge cases, naming, and whether the approach still makes sense.
- Switch roles every 20–30 minutes, or at each passing test (“ping-pong” pairing), so both people stay engaged.
- Remote pairing works well with a shared editor or screen sharing that lets either person take control.
When pairing is worth it
- Someone is stuck. A fresh pair of eyes often spots the problem in minutes, because they don’t share the same assumptions.
- The problem is hard or risky: checkout, payments, authentication, a tricky migration. Two people catch mistakes before they reach production.
- The deadline is tight and the design must be right the first time. On a storefront platform, I paired with another UI engineer to build a new product card from Figma on a tight timeline, and it shipped with very little rework.
- Someone is learning: a new team member, a new part of the codebase, or a new framework.
There’s research behind the quality gain too. In a well-known study by Alistair Cockburn and Laurie Williams, pairs spent about 15% more total effort than solo developers, but their code had about 15% fewer defects, and fewer defects saves far more time later (see Sources below).
When it isn’t
- Simple, well-understood tasks: small fixes, copy changes, routine updates. One person is faster.
- All day, every day. Pairing is intense, and people need time alone to think, research and recharge.
- One person drives and the other just watches. That’s a demo, not pairing.
- Very different paces without patience on either side. Pairing works when both people feel safe to say “wait, explain that.”
Pairing as mentoring
Pairing is one of the best ways to learn, because you see how someone thinks, not just the finished code. When I lead or navigate a session, I’m usually training or mentoring: I ask questions instead of giving answers, let the other person drive, and explain why, not just what. Other times the goal is simply to get something done together, and that’s fine too. Knowing which kind of session you’re in, and saying it at the start, keeps both people’s expectations right.
Pairing with AI
AI coding assistants now act like an always-available pair: they suggest code, explain errors and draft tests. They’re useful, and I build with them, but they don’t replace a human pair. An assistant doesn’t know your team’s history, won’t push back unless you ask, and can be confidently wrong. I treat AI as a fast driver and keep the navigator’s job, owning the architecture and reviewing every change, for myself.
What developer experience means
Developer experience (DevEx) is how easy or hard it is for developers to do good work: how fast builds and tests run, how clear the docs are, how quickly a new person can ship their first change, and how often they’re interrupted. Researchers describe it in three parts: fast feedback loops, low cognitive load (less to keep in your head) and time for focused flow. Pair programming touches all three: instant feedback, shared understanding and fewer hours lost while stuck.
Some companies have people or whole teams dedicated to it, often called developer experience or platform engineering. They improve the tools every developer uses every day: CI pipelines, local setup, shared component libraries, templates and documentation. When developers spend less time fighting their tools, they spend more time building for customers.
The takeaway
Pair when two minds make the work faster or better: hard problems, stuck moments, risky code and learning. Work solo when the path is clear. And treat developer experience as part of the product, because how a team works shows up in what it ships.
Sources
Alistair Cockburn and Laurie Williams, “The Costs and Benefits of Pair Programming” (2000): the study behind the 15% effort and 15% fewer defects figures. Read the paper (PDF) (opens in a new tab)
Abi Noda, Margaret-Anne Storey, Nicole Forsgren and Michaela Greiler, “DevEx: What Actually Drives Productivity,” ACM Queue (2023): the three parts of developer experience (feedback loops, cognitive load and flow). Read the article (opens in a new tab)