Priya and I began working the Path to Mastery app a few weeks ago. We have spent the majority of the time pair programming.

It has been technically challenging pairing continuously for 2 weeks with a single person. We have learned a lot from each other. From our different styles of approaching a problem. To the way we implement solutions.

Whilst I believe we have produced higher quality code, I’m skeptical about the speed of our output. I decided to take a deeper look to see whether pair programming, really is a productive technique.

It produces higher quality?

There have been empirical studies looking at productivity levels and code quality resulting from pair programming.

One often cited academic paper is from the XP pioneers R.Jefferies and W.Cunningham.

The paper found that “through pair programming, software products can be produced in less time, with higher quality”. Not only this, the programmers surveyed stated that they enjoyed their work more, so there’s a added bonus.

Is that always the case?

Does it produce higher code? Yes I like to think so from my experience. Plus like the old adage says, two heads are better than one.

But what about productivity?

I think it depends. It depends on the pairing variation.

Pairing Variations:

  • Expert-expert - With both individuals being highly skilled, I can see how they would be more productivity.
  • Expert-novice - A “mentor -apprentice” can develop in this scenario whereby the expert teaches and the apprentices hesitates to participates.
  • Novice-novice - The task could be in a higher quality with two pairs of eyes, although time spent could be even higher as there isn’t a mentor to coach them.

In the long run I truly believe the general team benefit. Thinking with a short term mindset, it may seem productivity is low. But see pair programming as an investment and it’s clear to me productivity will increase in the long run as the programmers improve their craft.

Ced