CS 2 (Winter 2021) Pair Programming

In this course, we ask that, as much as possible, you participate in “pair programming”. But just what is pair programming? How does one do it effectively? Is there any evidence that this is even a good idea?

Pair Programming

Quick Do’s and Don’ts

The Benefits of Pair Programming

Below are some direct quotes from several papers about the efficacy of pair programming. The citations are at the bottom, and we recommend you look into them if you aren’t convinced yet.

Use of this practice has been demonstrated to improve productivity and quality of software products. Additionally, based on a survey(Williams 1999) of pair programmers (hereafter referred to as “the pair programming survey”), 100% agreed that they had more confidence in their solution when pair programming than when they program alone. Likewise, 96% agreed that they enjoy their job more than when programming alone


However, most programmers are long conditioned to performing solitary work and often resist the transition to pair programming. Ultimately, most triumphantly make this transition. This purpose of this paper is to aid programmers in becoming effective pair programmers. The transition and on-going success as a pair programmer often involves practicing everyday civility, as written about in Robert Fulghum’s poem above. Each of the poem lines (some adapted with poetic license) will be explored for the inherent lessons related to successful pair programming


An experiment by Temple University Professor Nosek studied 15 full-time, experienced programmers working for 45 minutes on a challenging problem, important to their organization, in their own environment, and with their own equipment. Five worked individually, ten worked collaboratively in five pairs. Conditions and materials used were the same for both the experimental (team) and control (individual) groups. This study provided statistically significant results, using a two-sided t-test. “To the surprise of the managers and participants, all the teams outperformed the individual programmers, enjoyed the problem-solving process more, and had greater confidence in their solutions.” The groups completed the task 40% more quickly and effectively by producing better algorithms and code in less time. The majority of the programmers were skeptical of the value of collaboration in working on the same problem and thought it would not be an enjoyable process. However, results show collaboration improved both their performance and their enjoyment of the problem solving process (Nosek 1998).

(Williams, Kessler), (Cockburn, Williams)