Pair Programming Guidelines
General Information
The content of this page was originally based on information
provided at http://www.realsearchgroup.org/pairlearning/ Similar
information can be found at this
site.
Pair programming refers to the practice in which two programmers work
together at one computer, collaborating on the same design, algorithm,
code, and test. The pair is made up of a driver, who
actively types at the computer or records a design; and a navigator,
who watches the work of the driver and attentively identifies problems,
asks clarifying questions, and makes suggestions. Both are also continuous
brainstorming partners and they periodically change roles. Many
universities are using pair programming in their computer science classes
throughout the world as well as some high schools. Research found that
most students prefer to collaborate than to work alone and find CS more
attractive if they are not forced to work alone the majority of the time.
Between the two students, they can generally figure out most problems and
can avoid pesky syntax and semantic errors that can cost many hours to
debug. This is one of the most frustrating part of software development.
Pair programming reduces the amount of time spent on debugging and
increases the joy of programming courses! Moreover, many real life
projects are conducted in pairs.
Researchers who implemented and tested this idea found that
- Students in classes in which pair programming was required generally
had higher project scores and higher exam scores – a sign that the
students are learning the material on an individual basis as well.
- More students passed CS1 with a grade of C or better.
- At NCSU, when these students went on to the second programming class
(CS2) in which they were forced to work alone (and, thereby, demonstrate
their individual competence), the students who hadpair programmed in CS1
were more likely to have maintain or improve their grades than the
students who had worked alone in CS1. At UCSC, more students who had
paired in CS1 attempted CS2 (77% vs.62%) and slightly more of these
students passed CS2 compared with the students who had worked solo in
CS1.
- Most importantly, a higher percentage of the students who took a
paired CS1 class chose to pursue a computer science-related major one
year later (NCSU: 57% vs. 34%, p < 0.001; UCSC 25% vs11%, p <
0.008) compared with their solo counterparts.
Specific Guidelines
- If you are using a single computer, both
members of the pair must be at the same computer together while
collaborating. One student will be the "driver" who controls the
keyboard and mouse. The other is the "navigator" who observes,
asks questions, suggests solutions, and thinks about longer-term
strategies. It is not permissible for one member of the
pair to work on the code while the other partner is not there
participating actively.
- Again, if you're on a single computer, the
roles of driver and navigator must be swapped regularly, about every 30
minutes.
- If you are working together on individual
computers, then the pair needs to be working in the same place, and each
person needs to be a full owner of the work.
- You must work with the same partner for an
entire submission. You can work with a different partner on
different labs. If your partner does not contribute or participate
according to the guidelines, then do not include their name in the
submission.
- If there are multiple programs to write for a given assignment, it
is not permissible to simply partition the work between partners.
You must work on each part together.
- To “learn the do’s and don’ts” of pair
programming and to see pairs in action, watch this
fun video and
worksheet from North Carolina State University. These are also
available on this
page.