Pair Programming

practice · computer science · organizing-schema

Two programmers work at one workstation, alternating driver and navigator roles.

Pair Programming is a software development practice in which two programmers work together at a single workstation (or, in remote contexts, a shared session via screen sharing or specialized tools), with one in the 'driver' role typing and one in the 'navigator' role reviewing each line, considering the broader direction, and catching issues. Roles are exchanged frequently — every few minutes to every few hours depending on style. The practice was substantially codified within Extreme Programming by Kent Beck and others, with Laurie Williams's PhD research at Utah in 2000 providing some of the earliest controlled empirical studies on pair-programming effectiveness. Subsequent research (Williams, Cockburn, Hannay, Dybå) has produced mixed but generally favorable empirical findings: pairs produce code with fewer defects and better design, take somewhat longer in person-hours but typically less in elapsed time, and produce substantial knowledge-sharing and skill-development effects. Modern variants include strong-style pairing (Llewellyn Falco: 'For an idea to go from your head into the computer it MUST go through someone else's hands'), ping-pong pairing in TDD contexts, and asynchronous pairing for remote teams. Adoption faces persistent organizational resistance (perceived as headcount-doubled work) and individual variation in pairing comfort.

Originators

Long-standing informal practice; Kent Beck and Extreme Programming codification; Laurie Williams (early empirical research) high

Year / Decade

Long history; 1999 codification within XP; 2000 (Williams PhD research) high

Primary sources

Williams, L. & Kessler, R. (2002). Pair Programming Illuminated, Beck, K. (2004). Extreme Programming Explained (2nd ed.), Hannay, J.E., Dybå, T., Arisholm, E. & Sjøberg, D.I.K. (2009). 'The effectiveness of pair programming: A meta-analysis', Information and Software Technology high

Core components

Primary use case

Software development practice within Extreme Programming and broader agile contexts; onboarding new team members; cross-training and knowledge sharing; complex problem solving where two perspectives genuinely add value; mentorship pairing of senior with junior engineers; widely-used though not universally-adopted engineering practice.

Common criticisms

Lineage

Parent of
Mob Programming
Child of
Extreme Programming
Siblings
Code Review, Mob Programming, Extreme Programming
Derived from
Extreme Programming