top of page
Search

Pair Programming

Pair programming is an Agile practice that is misunderstood by a lot of people, even the people who implement it. It sound crazy that people can implement something they don’t fully understand, but it’s true. So what is pair programming? Before getting into what pair programming is, let’s cover programming, because that’s where the disconnect starts.

Programming is more than just writing lines of code; it is solving problems. According to Steve Jobs, “Everyone in this country should learn to program a computer, because it teaches you to think.” Thinking like a programmer means solving problems. To do that, you need a plan. For most people, problem solving means trying different things until something works. As a programmer, you need a better plan, something that breaks the epic problem down into smaller ones that are easier to manage. 1

So how does the idea of problem solving relate to pair programming? This is where the old adage, “two heads are better than one,” comes in. While working alone, a programmer has only him/herself, and the resources available to him/her to come up with solutions to problems. When paired with another programmer, the two keep up a constant dialogue allowing an integration of two perspectives for better problem solving ability.

“Pair programming consists of two programmers sharing a single workstation.” 2 The “driver” types code, while the “navigator” observes and participates in problem solving. Studies show that pairing programmers is only slightly slower than leaving them to work independently, and produces fewer bugs. This is because the code is being reviewed as it is typed. Changes can be immediately. This is in contrast to code reviews which often times only happens when another programmer adds or changes the code. 3

So what is pair programming? It is a technique to combine problem solving skills of two programmers to write cleaner, better code and solve problems faster. The next question becomes: can we pair program remotely? The answer is, yes.

There are many video conferencing and remote desktop applications that can make remote pair programming not just possible, but enjoyable. Atlassian 4 and Anna Monus 5 have some excellent tips and tricks to help bridge the gap between remote pairs.

I hope this was helpful in understanding the purpose of pair programming. Keep in mind, pairing can only work if the programmers are willing, able, and compatible.

Comments


bottom of page