30 March 2020

Pair Programming is a software development practice that has the developers work in groups of two. All serious code is written by two programmers, typically sitting side-by-side with a single monitor, often with a single keyboard. As they add code, they discuss each step together.

Many people react initially to pair programming by thinking that it's wasteful to have two people working like this. But it's only a waste if the hardest part of programming is typing. In reality programming is a constant sequence of building up your understanding of how the code is working and deciding how best to change it. Two people working together can often make more progress on such a problem than if they worked separately. I certainly find I gain insight much faster with a second brain close at hand, and I'm far less likely to go down analytical rat-holes that can easily waste hours.

Pair Programming is an concentrated, collaborative activity, and I expect that many people will find such intensive social contact doesn't work for them. Balanced against that, however, is the fact that I've met many people, often including introverts, who thought they would dislike pair programming, but came to love it once they had experienced it properly.

Pair programming is a skill, and it's certainly easy to do it so badly that it becomes a Boiled Carrot. The best way to learn it is to pair with someone who has learned how to do it well. Failing that, I'd suggest you read this in-depth article by a couple of experienced pair programmers.

You might also find my older post of Pair Programming Misconceptions useful.