The Benefits of Pair Programming

Aurélie Chancelet
November 30, 2021
- 4 min. read

Pair programming comes with many benefits. Having two brains instead of one on a same piece of code not only leads to team cohesion but also better code quality and productivity.

Our mission at Drovio is to help thousands of teams make the most of their daily or weekly pair programming sessions. Every user tells us how enjoyable these Pair Programming sessions are for them and what a great impact it has on their team’s productivity.

Let’s have a look at some data to back up our claims and help you convince your team or your manager to give pair programming a try!

A shorter, high quality code 

The main benefit of pair programming is undoubtedly the quality of code that will come out of a session.

In 2001, NASA engineers conducted an experiment with extreme pair programming to see how it could impact their productivity and help them increase their business value delivery (1). One individual programmer and one pair programming team were given the same mission, with the same amount of time. After 6 weeks, the individual engineer had written 2144 lines of code, with no testing. After 3 weeks, the PP team had developed the same functionality with 866 lines of code, including 463 lines of test. Needless to say, although the individual engineer was very experienced in their field, the team gave a higher confidence rate to the work of the Pair Programming duo.  

Pair Programming - Productivity Measure Table

Less maintenance code

In 2009, William Malik, at the time research director at Gartner, calculated that 40% of all system crashes are software related, and that those crashes take longer than hardware related ones to be fixed. Cockburn and Williams(2) from the University of Utah Computer Science, calculated that on average, for the same project and with the same amount of person-hours dedicated, code written through pair programming passed 15% more automated tests than code written by individual engineers, despite being 20% shorter. On top of being the time-saving option for engineers, pair programming is a cost-saving alternative for the company. 

Higher velocity = a faster time to market

Just like any new habit, finding the pair programming method that works for you takes time, and you might not notice a big change after your first sprint. But the more experience the team gains, the higher the productivity will be. Remember the Nasa test in 2001? Their first PP sprint took as long as it normally would have if they were both working solo. But for the 2 following sprints, their velocity doubled while the actual work pace remained the same (2). 

In 1996, the Hill Air Force Base asked 2 of their engineers to approach a project as if they were one, meaning they could not divide any tasks. Once the duo got comfortable with the method, they recorded a velocity of 175 lines per person per month for the duo, versus 77 lines on average for their solo engineers (3). 

Pair Programming - Results study Hill Air Force Base

Faster training of new team members

It is common knowledge that a new engineer will need several months to fully get up to speed after their onboarding. Pair programming sessions will not only help a new hire contribute to projects faster, it will also allow them to get an extensive overview of projects, and can be beneficial to seasoned engineers too! According to a 2002 study sent to 30 software professionals by Anuja Shukla, the assimilation time of new hires (from their onboarding to the first project delivered autonomously) could be reduced by up to 50% thanks to pair programming (4).

Pair Programming - Comparing assimilation & Mentoring times pairs vs individuals

Happier employees

Last but certainly not least, why not use pair programming as a way to get to know better the brilliant individuals you work alongside everyday, and enjoy the process at the same time? Reluctances to start pair programming may be high, but according to several surveys conducted by pair programmers, it definitely is worth a shot. 90% of the active pair programmers say their job is more enjoyable working as a duo, and 96% of them agree they are now more confident in their work (5). 

Pair Programming makes employees happier
Don't worry, be happy!

We could keep going on and on about the numerous benefits of pair programming. Why not give it a try? Our next article is a gold mine of tips shared by our users on how to start pair programming. It will give you all the tools you need to make your first session a success! 

(1) Exploring XP for Scientific Research, William A. Wood and William L. Kleb, NASA Langley Research Center

(2) The Costs and Benefits of Pair Programming, Alistair Cockburn Laurie Williams

(3) Pair Programming Illuminated, Laurie Williams and Robert Kessler, 2002

(4) Pair Programming and the Factors Affecting Brook’s Law, Anuja Shukla, 2002

(5) Pair Programming Illuminated, Laurie Williams and Robert Kessler, 2002

Don't forget to share this article

Ready to get started?

Create your free account and start collaborating right away with your team on all your apps. Should you have any questions about our offers, be sure to contact us.

Contact us
arrow-right