Start typing keywords to search the site. Press enter to submit.
Generative AI
Cloud
Testing
Artificial intelligence
Security
Like TDD (Test-Driven Development), Pair programming is a best practice of eXtreme Programming (XP) that is also popular outside of XP. With pair programming, two developers work together on the same algorithm, design or piece of code, side by side in the same workplace.
Using collaborative real time editors, programmers can also be located in physical different locations. This is known as Virtual pair programming or distributed pair programming.
There is a clear division of roles. The first developer –the driver– is the one who operates the keyboard and actually writes the code. The second developer – the observer or navigator – checks (evaluates!) and thinks ahead. While the code is being written, the navigator is thinking about subsequent steps while the driver can fully focus on the technical aspects of the code at hand. Anomalies are quickly observed and removed.
The two developers regularly swap roles. This depends on the experience of the developers. They swap when they are at the same level of experience, otherwise the less experienced developer remains in the driver seat to learn and become a better developer.
In recent decades, this method has been cited at various times as a better way of developing software. Research has demonstrated that by deploying a second developer in pair programming, the costs do not rise by 100%, as may be expected, but only by around 15% [Cockburn, 2000]. The investment is recouped in the later phases as a result of the shorter and cheaper testing, QA and management.
A variant of pair programming is mob programming [Pyhäjärvi 2018]. This is when the whole team works together, for example on a hard problem or to learn from each other.
The significant advantages of pair programming are:
Sources:
Building Blocks
Related wiki’sRisk PokerPlanning PokerRoot Cause Analysis (RCA) Specification and Example (SaE)Test-Driven Development (TDD)Clean Code-architectureCode MaintenancePair programmingPairingTest design techniquesCode reviewUnit Testing PrinciplesCode coverageFeature togglesMonitoring of product quality Parallel testingMutation testingPath Testing (algorithm test)