On this page
What is pair programming
Pair programming is a software development practice in which two developers work together on the same code at one workstation. One developer, the driver, types the code while the other, the navigator, reviews each line in real time, thinks ahead about design, and spots issues as they appear. The two switch roles regularly so both stay engaged.
The practice was popularised by Extreme Programming (XP) in the late 1990s and is now a common technique across agile teams. Related practices like mob programming emerged from the same agile community, where three or more developers work on the same problem together. A widely cited study by Laurie Williams and Robert Kessler at the University of Utah found that pairs wrote code roughly 15% slower than solo developers but produced 15% fewer defects, with faster knowledge transfer across the team.
Roles: driver and navigator
The driver holds the keyboard and focuses on the tactical work of writing syntactically correct code. The navigator stays one step removed, watching for bugs, thinking about the overall design, and considering edge cases.
In-person vs remote pair programming
In-person pair programming happens at a single desk, with both developers sharing one screen and keyboard. Remote pair programming achieves the same outcome over the network via collaborative editors, generic screen-sharing tools or purpose built tools. More details in the pair programming tools section.
Pair programming vs mob programming vs code review
All three are forms of collaborative software development, but they sit at different points on the spectrum:
- Pair programming: two developers, one workstation, working synchronously on the same problem.
- Mob programming: three or more developers on the same problem at the same time, with one driver and the rest navigating.
- Code review: asynchronous; one developer writes the code, another reviews it after the fact via a pull request.
These practices are not mutually exclusive. They combine well. A code review can be performed in a pair programming setup, with two or more developers walking through the changes together in real time instead of leaving inline comments on a pull request. This hybrid is especially useful today, when an AI agent writes most of the code: multiple humans reviewing the generated output together catches more issues and builds shared understanding faster than any single reviewer working alone.
Pair programming styles
There are many styles for this definition, and you can read about them in detail in our full pair programming styles guide.
- Driver-Navigator: One person types, the other watches the bigger picture and calls out direction. It's the default when one of you knows the area better.
- Strong-Style Pairing: The person with the idea has to talk it through someone else's hands, which forces clarity and pulls the less experienced partner into the work fast.
- Ping-Pong Pairing: You take turns: one writes a failing test, the other makes it pass, then you swap. Keeps both people engaged and leans naturally on TDD.
- Unstructured Pairing: No fixed roles; you open the same code together and figure it out as you go. This is what most code reviews, onboarding walkthroughs, and everyday collaboration actually look like.
- Tour Guide Style: One person leads and narrates while the other follows and asks questions. Useful when introducing a new codebase or tool.
Benefits of pair programming
Pair programming is proven to deliver many benefits, in particular:
- Fewer defects and higher code quality. Pairs produce fewer defects, compared to solo developers. Though the size of that quality gain is not fixed, it depends on multiple factors, like the programmer expertise and task complexity.
- Continuous code review, built in. Industry practitioners of pair programming report that pairing enables “instant code review, easier refactoring, fewer bugs, and higher team resilience,” and makes frequent pushes to main feasible without heavy coordination overhead.
- Faster knowledge transfer and onboarding. An empirical study in Education and Information Technologies found pairs consistently outperform individuals on knowledge-transfer tasks, which makes pairing very suitable for onboarding new engineers into an unfamiliar codebase.
- Juniors level up fastest when paired with seniors. The 2009 meta-analysis found pairing raised junior developers to near senior-pair performance, especially on complex problems, with collaboration compensating for a junior's lack of deep understanding of the problem.
- Better focus and fewer distractions. The social presence of a second person makes it far harder to drift into Slack, email, or social media.
- Collective code ownership and a higher bus factor. When pairs rotate regularly, multiple people touch every part of the system, so no single developer is the only one who understands a critical module.
Most of the benefits of pair programming come from thinking out loud — reasoning about or explaining an action — which has been shown to raise problem-solving performance. This is verified by the 2009 meta-analysis.
These benefits don't go away when AI writes the keystrokes. The increased focus from pairing is especially helpful when there is more code to review, as is the case with AI-generated code.
Drawbacks and when not to pair
Pair programming has real drawbacks, in particular:
- The quality increases are not linear. As we mentioned above, the quality advantage of pairing depends on multiple factors; for example, on simple, well-understood work pairs gain little over solo developers.
- Mentally intense and tiring. Sustained pairing is cognitively demanding; practitioners warn it “can be quite intense and exhausting,” recommend putting time limits in place, and note that exploration and self-paced learning often go better solo.
- Personality and compatibility friction. An industrial survey of Microsoft engineers found that finding a compatible partner is one of the hardest parts of pairing, with personality conflicts and scheduling among the top frustrations.
- Less parallel work. Having two developers on the same issue means fewer features get done in the short term, though the quality gains and fewer defects can make up for that time in the long term.
These are issues that occur even when pair programming is done right. There are also pitfalls that can derail a session into pair programming done badly, for example:
- One person monopolises the session. One person is over-directive or doesn't allow the other to take control, and as a result the second person disengages and just follows along without thinking.
- Impatient pair. Jumping in before the other has had a chance to think.
- Silenced juniors. When working with a junior, the session can end up as a tour rather than a pair.
How to do pair programming
We've collected a set of guidelines for a good and productive pairing session. These come from our own experience and resources online.
Prepare before the session
- Choose what to work on. Not every task gets the benefits of pair programming. For example, as mentioned in the benefits and drawbacks sections, well-understood tasks gain little from a pairing session. Also skip pairing if a task needs heavy upfront research, or if one of you knows nothing about the domain. In those cases, do the research first and then pair.
- Find a slot that suits both of you, and block more than you think you'll need.
- Check in on each other before you start. Pairing is more draining than solo work, and there are days where we don't feel 100%. It's good to know what state your partner is in.
- Do your reading before the session. If you're new to the area, read the relevant code and recent PRs first. If one of you has substantially more context, run a short knowledge-sharing pairing session before tackling the real work.
Set up the space
In person. Pick a space where you can talk freely.
Remote. When pairing remotely, make sure the tools you are using are not getting in your way. You'll need high-quality, low-latency screen sharing and crisp audio. For typing on the other person's computer, use either a collaborative editor or a tool that allows remote control for seamless transitions. Try to be in a quiet space, or use a tool with noise cancellation so your pair doesn't find it hard to hear you. When you're low on bandwidth, consider dropping the camera.
During the session
- Always talk through your thinking. One of the reasons pair programming results in higher-quality code is thinking out loud.
- Turn off notifications. Turn off Slack, email, and anything else that might interrupt you and break your focus.
- Don't slip into streaming mode. Actively engage when you're not driving. Challenge what the driver is doing by asking hard questions.
- Don't lock in roles. The common advice is to assign driver and navigator up front and swap on a timer. We have found a more fluid approach works better, especially nowadays when AI agents type most of the keystrokes.
- Switch roles often. Structured (a pomodoro timer with swaps every 25 minutes) or unstructured, both work. This way the session stays interesting for both parties and is less monotonous.
- Don't interrupt the other person. Even if they're heading the wrong way, let them finish the thought, the line, or the prompt. If needed, write the thought down somewhere so it isn't lost.
- Take proper breaks away from the computer. Don't check Slack on a break. That just drops you into another context and skips the actual rest.
After the session
- Review the changes. Do a final review of what you did.
- Plan a follow-up if needed. If the task is unfinished, plan the next session, or decide how you'll finish it solo.
Pair programming tools
We've put together a detailed comparison of the best remote pair programming tools across all five categories. Here's a quick overview.
Pair programming tools fall into five groups:
- Purpose-built apps built specifically for pair programming.
- IDE collaboration; most editors nowadays support multiplayer editing.
- Cloud editors that let you pair in a browser without local setup.
- Generic screen sharing like Zoom, Meet, Teams, or Slack Huddles.
- Remote control apps that give one person full control of another's machine.
Purpose-built pair programming tools
We've compared each option in detail in our dedicated pair programming apps comparison:
- Hopp — our own tool, and the only open-source option in this list, with self-hosting available. Sub-100ms latency, 4K screen sharing, and multi-cursor remote control, so it feels like sitting next to your teammate.
- Tuple — the most mature tool on the market, with an intuitive UI and a large user base.
- CoScreen — multi-window sharing with remote control is the standout feature, but updates have slowed noticeably since it was acquired by Datadog. Free for individuals.
- Drovio — formerly USE Together. Cross-platform with multi-cursor control, but the product appears to receive infrequent updates and the public roadmap has gone quiet.
- Pop — also cross-platform and free to use, but it doesn't seem to get many updates any more.
IDE-integrated tools
If your team is using the same editor, you can do concurrent editing using its built-in collaboration features. You'll likely need a separate tool for audio and video, though. We've covered each option in detail in our remote pair programming IDEs guide:
- VS Code Live Share: extension for VS Code.
- Zed: built-in collaboration, no extension required.
- CodeTogether: extension that works across different editors.
Cloud editors
Cloud-based development environments let you pair without any local setup. Both developers open the same workspace in a browser and edit together. Good for quick sessions, onboarding, or when you don't want to share your local machine. Most of them lack built-in audio or video, so you'll need a separate call running alongside. We've included these in our full tools comparison:
- Replit — real-time multiplayer editing with live cursors and built-in voice/video chat. Paid plans only.
- CodeSandbox — live collaboration via shared branch URLs with live cursors and shared terminals. No audio or video.
- GitHub Codespaces — cloud VS Code environments. Collaboration works through the Live Share extension, not built-in.
Generic screen sharing and video tools
Any screen sharing tool (Slack Huddles, Google Meet, Zoom, Microsoft Teams) can be used for pair programming. The problem is that they aren't optimised for it, so they miss the features that make the collaboration truly feel like sitting next to each other: sub-100ms latency, remote control, and an easy way to annotate. Some of them cover one or two of these, but none cover all of them.
Remote control apps
Remote desktop tools give one person full control of another's machine with low-latency input streaming. The guest can move the mouse, type, and interact with any application on the host's desktop. These tools come from the IT support world, so collaboration features like annotations and multi-user sessions vary between products. We've compared them in our full tools comparison:
- TeamViewer — remote desktop with audio/video chat, multi-user sessions, and whiteboard annotations. Free for personal use.
- AnyDesk — remote desktop with screen annotations, whiteboard, and multi-user sessions on paid plans.
- RustDesk — open-source remote desktop with self-hosted relay server support. Free for one device.
- Chrome Remote Desktop — Google's free remote desktop via Chrome extension. No annotations or multi-user.
Pair programming examples
The best pair programming examples are tasks where shared context matters more than typing speed. Pair when the work is risky, ambiguous, knowledge-heavy, or hard to review after the fact. Skip it for routine boilerplate.
Here follow a few use cases.
Onboarding
Pair with a new engineer during their first couple of weeks on the team. Use real, low-risk production tasks rather than toy onboarding exercises.
This makes onboarding faster because they learn the specifics from live sessions: local setup, test habits, deploy flow, product vocabulary, review expectations, and team conventions. Pairing juniors with seniors is especially useful because the junior gets context and feedback while doing real work; we cover this in more detail in the junior-senior pairing guide.
On-call incident handling
Pairing is useful during on-call incidents when one person has more context on the system. It is faster to navigate dashboards, logs, traces, recent deploys, and likely failure points with someone who already knows where to look.
Review a big change, AI-written or human-written
Large changes are hard to review from a diff alone. Pair on them when the change spans many files, touches a core flow, or was generated by AI. One person walks through the change; the other checks behavior, tests, edge cases, and what should be split out before merge.
Design a new feature
Pair before implementation when need to decide the architecture of a new feature.
FAQ
Pair programming is a software development practice where two developers work together on the same code at one workstation. One person types (the driver) while the other reviews each line, thinks about design, and watches for issues. They swap roles regularly so both stay engaged.
Paired programming is another term for pair programming. Both describe two developers working together on the same code in real time. "Pair programming" is the term popularised by Extreme Programming and used in the research literature; "paired programming" and "peer programming" show up informally in education and corporate settings.
Two developers share one workstation or remote session. The driver types while the navigator reviews each line, thinks about design, and watches for issues. They swap roles every 15–25 minutes, commit in small steps, and often skip a separate code-review pass because the review is folded into the writing.
Studies and practitioner reports suggest that pair programming can reduce defects, spread knowledge faster across the team, and onboard new developers more quickly. A second set of eyes catches bugs early, design decisions get discussed as they happen, and context is shared in real time rather than through long documents.
Pair programming is more intense than solo work and can feel slower for simple, well-understood tasks. It demands good communication, compatible working styles, and deliberate breaks to avoid burnout. The practice works best when you reserve it for complex, risky, or knowledge-heavy work instead of every ticket.
Pair programming was popularised by Extreme Programming (XP) in the late 1990s and is one of the core XP practices. It is not formally required by Scrum, Kanban, or other agile frameworks, but it is widely used across agile teams as a way to bake continuous code review and knowledge sharing into day-to-day work.
Pair programming involves two developers working together on the same problem at the same time. Mob programming involves three or more people collaborating on the same code, with one person driving and the rest navigating. Teams often mix both: they pair for day-to-day work and form a mob when a problem is unusually risky or complex.
Remote pair programming works much like in person: you share a screen or editor, talk through every change, and swap roles regularly. The main differences are tooling and environment: you need low-latency screen sharing or a collaborative editor, reliable audio, and an agreed way to hand control back and forth.
Teams typically use either purpose-built pair programming tools, collaborative IDE features, or generic screen-sharing tools with remote control. The right choice depends on your stack, security constraints, and how often you pair, but the fundamentals stay the same: both people can see the code clearly and take the keyboard when needed.
