What is Pair Programming?

Back in the 1980s, a big part of my job at a defense contractor was writing software. Sometimes I worked by myself and sometimes I worked with another programmer – generally one who was a friend. Sometimes we worked on separate devices, and sometimes we sat together at the same keyboard and screen and worked together. My friend and I had done that in college when we were learning to program in C, and we not only learned from each other, but our work was more efficient than when we worked separately.

Pair Programming

Pair Programming

Now, years later, this technique has been adopted by the agile community and is called “Pair Programming.” The Extreme Programming site says, “Pair programming increases software quality without impacting time to deliver. It is counter-intuitive, but two people working at a single computer will add as much functionality as two working separately except that it will be much higher in quality. With increased quality comes big savings later in the project.” I have not only found that to be true, but also that the code is developed more quickly. As one who often works in the field of cyber security, I like the idea of better quality and more secure software.

The Extreme Programming site goes on to make a critical point about pair programming: “Pair programming is a social skill that takes time to learn. You are striving for a cooperative way to work that includes give and take from both partners regardless of corporate status.” I could not agree more. While children are often excited to work together in teams, adults somehow often lose that eagerness. It may be due to school programs that discourage working together, it may be the desire to appear “best” at work, the programmers may be extreme introverts, or perhaps something else. Regardless of the cause, there is often resistance to working with someone else, especially when it involves sharing a computer keyboard.

What skills do you need?

The social skill of working so close with another programmer that you share a keyboard needs to be developed and nurtured. Both programmers not only need to be able to work together, but to trust each other’s work. The hardest part is perhaps to learn to throw out ego and to trust the other programmer. I attribute my (limited) experience in learning improvisational theatre (improv) to making this easier for me. Improv requires trust and anticipation of others’ actions – the exact skills needed for pair programming. It is a bit awkward at first watching someone else implement an idea in a way other than the way you might, but sharing ideas and the action of nipping issues in the bud by fixing each other’s mistakes live far outweighs the initial awkwardness.

I like pair programming. I’d encourage you to try it if you haven’t. Be sure to work with someone you trust and who wants to make the experiment work, if you don’t, the likelihood of success is greatly reduced. If you do try it, let us know in the comments below.

To your better computing,
John McDermott

Type to search blog.learningtree.com

Do you mean "" ?

Sorry, no results were found for your query.

Please check your spelling and try your search again.