Extreme (or pair) programming... opinions? Experiences?

I just finished reading this month’s Wired, and it contained a pretty interesting article about a phenomenon dubbed extreme programming, where two people basically share the same workstation and edit and revise the code being programmed over each other’s shoulder, as it were. According to the article this allows for much greater flexibility and spontaneity, and while taking longer, results in amazingly bug-free code.

My interest was piqued as I thought this might be something really clever, being as how it seems to introduce a very human element into something which has traditionally been very much a solo task (IANAP, but that’s the impression my layman ass gets of the job). My friend who owned the magazine, however, told me her ex-boyfriend (who is a programmer) had tried this and said it had been an abject failure.

I’m wondering if there are any programmers here who have experiences with this system of working, and if so, how has it turned out compared to the traditional solo method?

Our team tried pair programming for a while. I thought it would be awful, being a solitary programmer kind of guy. But I actually wound up liking it, and I was amazed at how productive you could be. If you’re like me, programming is periods of furious code output, punctuated by periods of low output as you get stuck on problems, or inertia sets in after you get pulled to another task, or you just get fatigued and slow down.

With pair programming, we seemed to go at a relatively constant pace. The day went fast, and all was well.

There were some problems: If the team wasn’t matched well, they could spend all day arguing over the right way to do things, or one guy could wind up being dominant and do all the coding while the other watches. I had one partner who would never talk - he’d just start coding. If he had an idea in his head he’d just rip into it, and it could be impossible to see what he was on to until he was finished. This made the partner useless.

In the end, we drifted away from it, I believe because management eventually concluded that two programmers working together weren’t as productive as two programmers working apart. But it had a lot of advantages I don’t think they considered. The best perhaps being that domain knowledge is spread around the team. Management usually underestimates how much time can be lost if a critical programmer leaves the team, is sick, or quits. Getting someone else up to speed can take a long time. With pair programming, every one knew everyone else’s code.