Pair programming

We’ve been doing pair programming daily for almost 6 months. Here are my general thoughts.

Pros

The main benefit of pairing is knowledge sharing and training. It’s most efficient when the lesser skilled developer is on the keyboard. Everyone involved agrees that pair programming is superior teaching technique compared to anything else. It works for both general programming skills and product-specific knowledge.

I would estimate that the code quality is also slightly higher than when programming alone, because two eyes will pick up things that one pair won’t. At the very least, it will work as rubber ducking.

Thirdly, it’s good for team spirit, doing things together.

Cons

The main drawback is reduced performance per developer. The performance is somewhere between 1 and 2 developers per pair, but that performance depends on the skill levels and other factors. If I’m programming with another senior who mostly knows what we’re doing, we can obviously get things done faster, than if I’m explaining everything to a junior programmer. On the other hand, if you have two seniors together, you won’t get as much of the teaching benefits.

I would estimate that the total output is the average of both developers’ output + ~25%. This means, if two equal developers would accomplish 200% on their own, when working as a pair their output is “only” 100 + 25 = 125%. If you pair a theoretical “10x” developer whose productivity is 1000% with an average developer whose productivity is 100%, their combined productivity drops to (1100 / 2) + 25% = 690%. But this is a rough estimate. The point is, the bigger the difference in experience, the bigger the drop in output becomes, but also the teaching effect increases.

Separate code review step is no longer necessary, which mitigates the performance penalty somewhat.

The second drawback is that it’s tiring to communicate constantly. We have solved this by limiting pair programming to only half of the day. So, half day pair programming, and the rest is done solo.

Conclusion

Overall, I consider pair programming a positive thing, considering that everyone understands the main drawback, that the performance per developer will be lower. On the other hand, it’s an investment into the future, with knowledge sharing and more efficient teaching of juniors.

One Reply to “Pair programming”

Leave a Reply