People are missing the whole point of Pair Programming

Pair Programming is always being touted as a tool to improve quality, but there is a completely different aspect to it.

RDX
3 min readSep 25, 2013

Pair Programming is strongly debated. If you don’t know about it, two people work at the same time, sharing a single screen (may be using screen sharing tools, or using an external monitor+keyboard), so that both see, discuss and type on the same code. Crazy stuff indeed! Or so we think.

Look it’s pair programming!
By Ted & Ian
CC-BY-2.0

Everywhere I read, Pairing is touted as a way to improve quality. Two eyes on the codebase increases quality, which thus increases productivity in the long run. I absolutely disagree!

I pair program because it improves productivity in the short run.

Not weeks or months, but productivity improves in days or hours. To understand why, let’s think of some different things, and then get to the crux of pairing.

Have you ever tried to create a PowerPoint presentation, but ended up staring for a long time wondering where to start? And then some friend comes up. You ask him to sit beside you to help you finish this. And then somehow things start flowing. It doesn’t matter if your friend knows the task at hand as well as you.

Or maybe you are doing some Excel stuff with large amounts of data. You ask a friend to sit by and help you out. Maybe he recites some things, and you cross-verify it. Or you just explain things aloud as you do. Things start flowing.

Well congrats, you just paired. In both cases, whether its an artistic powerpoint job, or its a grunt excel job, or most of the jobs out there, pairing with someone helps you to make choices. The choice need not be better, or purportedly higher quality. The person you’re pairing with doesn’t need to be an expert. But with just some gentle pushes, pairing helps you make choices and move forward without getting stuck on something for inordinate amounts of time (which is something that happens often when programming).

In fact, there have been periods where I have procrastinated for weeks, only to be unblocked by a friend and complete it in a few hours. It often happens on my personal projects.

As programmers, we tend to get carried away a lot. We code, then start looking up something, it slowly spirals out, and after sometime we will be unknowingly reading some random stuff. Even worse — the consciously chosen distractions — mail, chats, facebook! The next day when you look back, you can’t imagine where half the time went.

When you’re pairing, you don’t do this shit. You can’t check your mails, nor get into long chats, or do social networking, or read random stuff — with a person looking at your computer. And neither can they. Pairing brings focus to the task at hand, and doesn’t let you digress (despite how disciplined you pretend to be). Common tasks which I usually take 2 days to complete — I’ve found that I complete it in a single day with pairing, because I don’t digress.

Because of this, Pairing is also intense. 6 hours of Pairing a day makes your brain tired because of the amount of focused work that you’re doing. 8 hours? You’ll crash. But you end up making more progress than when you work alone. So businesses don’t lose money by putting two people on the same job. They gain time instead.

I don’t care about the quality aspects touted of pair programming.

You know, the “pairing produces more quality code, fewer bugs” stuff. Assigning two Java developers on a NodeJS codebase isn’t going to magically increase quality! If we wanted two eyes, many products have great success with code review.

But Capability alone doesn’t matter, Execution and Time matters, and that’s why I prefer pairing. Most likely that you have been unknowingly benefited by pairing too, whether its excel or powerpoint or something else.

Making two people work closely on a job increases productivity and shared responsibility. I’ve (not always, but often) seen the following transition happen when I move a difficult task from a single person to a pair:

Put one person, and they try to find an excuse.
Put two people, and they try to find a way.

So just to reiterate, The whole point of Pair Programming is to improve Productivity in the short run.

--

--

RDX

Simpleton, CI/CD Platformer at goeuro.com, ex-ThoughtWorker, Full stack engineer, Hack Java/Node/Frontend/Ruby/Docker/OSS, Practice XP/KISS/Lean