The more agile/XP practices I get a chance to apply on the job, the more I become convinced that they are not just good ideas, they are indispensable. This happened to me a long time ago with unit testing, more recently with continuous integration, and most recently with pair programming. Pairing is probably the most controversial of the XP practices, and even when I talk to people from Agile or XP shops they readily acknowledge they don‘t do this very much.
First off, let me admit being biased on this. I really enjoy pair programming. I find it incredibly more enjoyable and productive to do anything but the most basic grunt work in pair. But part of the reason I enjoy it so much is that it absolutely amazes me how much more productive it is, and how much better work comes out. The ideas that come up out of a pair session are almost always better than either programmer would have come up with on their own, I‘m convinced. And often jaw-droppingly better. I can‘t tell you how many times I‘ve been up against what seemed like a difficult task and bounced my planned idea off my partner and an incredibly simpler solution than mine will pop out.
The big question I‘ve always heard about pairing is “Doesn‘t that mean each task will take twice the man hours?“. I‘ve seen the research that indicates this just isn‘t true. And now I‘ve experienced and measured it on a real project. We‘ve actually measured iterations where we do pairing against those where we don‘t. We saw no drop in per programmmer velocity. What that means is you really done get twice as much done together as separately. There is no “pair programming penalty“.
Ok, fine, this would mean pairing or not pairing makes no noticable speed difference overall. But this would ignore the quality difference. I ran up against this today in some code that had not been done in pair compared with code that had. It wasn‘t fun. The quality difference was astonishing. It‘s harder to measure design quality of course, but it‘s easy to spot when you see it.
So when will this, like other XP best practices, “catch on” for real? Soon, I hope.