Pair programming is often described as [Williams 2000]:
a practice in which two programmers work side-by-side at one computer, continuously collaborating on the same design, algorithm, code, or test. This method has been demonstrated to improve productivity and the quality of software products.
Students who chose to work in pairs are required to abide by the rules given below.
What is pair programming?
"In pair programming, two programmers are assigned to jointly produce one artifact (design, algorithm, code, among others). ... One person is typing or writing [driving], the other is continually reviewing the work [navigating]. ... Both partners own everything."
Not only is this an effective learning technique, it is also more productive than splitting a task in two, working on each half separately, and then combining the two.
- Play fair.
It is important to take turns typing or writing [driving], so that the other person gets a chance to review [navigate].
- Clean up.
Defects belong to the pair. Having two sets of eye balls is much better than one.
- Hold hands and stay together.
All programming should be done together; do not create things done alone. The literature of pair programming shows that most defects are traceable to things done singly. It also inhibits learning.
- Say you're sorry.
"Ego-less programming ... is essential for effective pair programming." Do not insist on having things your way or else. Do not get defensive about criticism. Work things out as a pair.
Laurie A. Williams and Robert R. Kessler.
All I really need to know about pair programming I learned in kindergarten.
CACM, 43, 5 (May 2000), pp. 109-114.
- A pair consists of exactly 2 people.
- Pairs should turn in only 1 copy of an assignment or lab with both names on the assignment.
- Pairs, once formed, must be stable; your only other option is to revert to working alone for the semester. Exception; to get an exception, you need to present your case to your instructor prior to beginning an assignment.
- Pairs may split for an assignment and then return to pairing.
- Pairs are required to work together; any form of splitting up the work is a violation of pair programming.
- I reserve the right to split up a pair for any reason. I will instruct you in your options with regard to pairing at that time.
Violations of Pair Programming
- Taking turns doing the assignments.
- Splitting the assignment in two and each doing half.
- One person doing all (most of) the work and the other partner putting their name on it, as though the latter had contributed equally.
- One member of a pair coming to see me about an assignment without their partner.
Sources of Stress
- Disparity between experience levels.
- Scheduling difficulties.
Pair Programming and CS141 (CS1)
A recently completed study of pair programming in an introductory programming class at UCSC is summarized in one slide. The results of this study provide some of the most compelling evidence to date of the effectiveness of pair programming as a pedagogical tool. It appears that pairing bolsters course completion and consequently course pass rates, and contributes to greater persistence in computer related majors.
The students in the pairing section were significantly more likely to complete and pass the course (CS1). For the students that passed CS1, those from the pairing section of CS1 were significantly more likely to pass CS2 on their first attempt. In addition to being more likely to pass, students who pair produce higher quality programs, are more confident in their work, and enjoy it more.