Note: This document is work-in-progress. Please don’t publish it on news sites, or otherwise link to it in public without the author’s permission. Private linking is acceptable.
When doing Pair programming, there are two programmers sitting next to a single computer screen and keyboard, with one of them actually writing the code, and the other one observing and helping. At first glance, it seems like it’s a waste of resources: won’t they be under-productive? The answer is a “no”.
First of all, pair programming increases run-time code review, as the “passive” programmer observes what the active programmer writes, gives him advice and answers his question. Code-review is always a good thing. [CodeReview]
Secondly, pair programming causes both programmers to have more discipline, and they are less likely to procrastinate as the active programmer will bore the watching one.
Pair programming is also more fun, because people feel more comfortable working in pairs than alone.
Finally, pair programming is more productive, because it was shown that it yields more output than two individual programmers.
I had had a very good experience working in pairs back when I was an undergraduate student at the Technion and can highly recommend it.
[CodeReview] Pair programming is still not a substitute for code reviews by people who didn’t directly write the code. It was noted at a blog entry I recall reading somewhere but can no longer find. TODO: Write more.