Professional Documents
Culture Documents
A Pair Programming Trial in The CS1 Lab
A Pair Programming Trial in The CS1 Lab
A Pair Programming Trial in The CS1 Lab
Abstract—The benefits of pair programming have been In recent years, a number of approaches has been
recognized for some time now. Numerous attempts have tried to address the issues of both low CS1
been made to introduce pair programming in the
classroom to improve student learning and enrollment and success rates. These include the use
performance. A trial introduction of this method in the of more attractive interactive programming languages
introductory Computer Science (CS1) lab-based class is and IDEs (e.g., Alice, Greenfoot and Python), media
reported. The noticeable improvement found in student
computation [3], robotics [4], computer games [5] as
performance is in agreement with most previous
studies. This study also explores student perception of well as pair programming. This paper reports a trial
this collaborative approach to learning, and some of the pair programming approach in the CS1 lab
administrative issues. class over several semesters at CSU’s School of
Keywords – pair programming; collaborative learning; Computer Science.
pair formation; driver-navigator model; student
perception II. PAIR PROGRAMMING IN INDUSTRY
AND THE CLASSROOM
The origin of pair programming is in eXtreme
I. INTRODUCTION
Programming (XP) - an emerging software
Motivation generated in the freshman year plays an development methodology intended to improve
important role in undergraduate student retention and productivity. In software industry pair programming,
progression. According to one study, 60% of students production code is written collaboratively with a
who abandon their course of study do so in their first partner, where two programmers sit side by side and
year [1] at the university. Student failure and share a computer. Anecdotal evidence suggests that
withdrawal rates in the introductory Computer two programmers can be more than twice as fast and
Science (CS1) course are unacceptably high in most can think of more than twice as many solutions than
institutions – more than 30% in the US according to a the two working on their own. Also, constant code
nationwide survey [2]. At Columbus State University reviews, an inherent part of pair programming, results
(CSU), the average student success rate in CS1 over in higher defect prevention and removal leading to a
the last five years (2004 – 2009) has been around higher quality product. As reported in a survey of
53%. professional pair programmers by [6], all participants
agreed that they had more confidence in their
Student success in CS1 is decided largely by their solution when doing pair programming than when
success in learning problem solving using computer they worked alone. About 96% of them agreed that
programming. Student performance in classroom they enjoyed their job more when programming in
exercises and assignments shows a large number of pairs. In an experiment at the University of Utah [6],
students struggling when it comes to understanding students in two courses - Collaborative Development
core computing concepts and essential features of of Active Server Pages (20 juniors and seniors) and
programming languages. Lack of success leads to Software Engineering ( 41 juniors and seniors) were
students’ loss of confidence and many simply give divided into two groups – paired and non-paired.
up. Reportedly, students in pairs passed 15% more of
instructor’s test cases compared with those working The students involved in this study were all
individually. freshmen, with most of them in their first semester at
the university. The traditional approach of asking
Ever since the establishment of pair programming as students to find their partners to form a pair was not
a useful technique in professional software adopted since the students hardly knew each other,
development, educators have been trying to especially during the first week of the semester. This
understand its potential benefits in introductory decision was later borne out by our survey results
computing courses. In 2002, a study was conducted (see below) which indicated possible difficulty faced
on the effectiveness of pair programming on by students in this approach. Instead of forming pairs
freshman learning at the University of Santa Cruz [7] randomly, we decided to form pairs based on
showing improvements in the quality of completed individual programming experiences. To assist the
programming assignments as well as the time spent pairing of students, they were asked to do a self-
in completing these assignments. A number of evaluation of their programming skill in a survey
studies thereafter have also shown the positive effect carried out on the first day of the semester. An
of pair programming on student learning and the attempt was made in this process to pair students with
quality of code produced by students [8,9,10,11]. comparable programming experience and skills by
However, at least one study [12] demonstrated some avoiding strong-weak and weak-weak pairs as far as
negative aspects of pair programming. According to possible. This was based on the idea that putting two
this study, students who used pair programming did weak students together might put these students at a
not write significantly better programs than students relative disadvantage compared with pairs with a
who worked alone. Most students were of the opinion different mix. Strong-weak pairing also was avoided
that the key to success in pair programming was to with the expectation that such a pairing would result
get a good partner. in the more skilled student dominating over his/her
weaker partner, thus making it difficult to maintain
III. PAIR PROGRAMMING AT CSU the spirit of learning through equal participation.
In an effort to improve student retention and
progression rates in Computer Science, as well as to B. The Pair programming Model
attract non-Computer Science majors to this Students in each pair worked collaboratively on each
discipline, it was decided to investigate pair assignment. They were asked to assume driver and
programming as a teaching methodology. As part of a navigator roles and switch them regularly. The driver
trial involving the CS1 lab class, students were paired controlled the mouse and keyboard to enter the code,
together during the first week of the semester. compile and run it. The navigator actively examined
the driver’s work for syntax and logic errors, and any
A. Formation of Pairs deficiencies in the design, or for possible design-
A student’s motivation to work collaboratively implementation mismatch. He/she also looked up
depends to a large extent on compatibility with resources and thought of alternatives. The driver and
his/her partner. Accordingly, a good deal of attention navigator would switch roles every 20 minutes or so,
has been focused on the strategies for forming pairs. ensuring they worked as a team and obtained the
The following pair-formation methods have been benefit of acting in each role. The pair would
suggested in the National Center for Women & continue working in this manner until the
Information Technology (NCWIT) pair programming assignment was complete.
programming-in-a-box resources [13]:
The issue of assessing work done by students in a
- Pairs based on levels of programming experience pair is a difficult one. The simplest approach is to
- Pairs formed randomly award both students the same grade, although ideally,
- Pairs formed by students with instructor in a group effort, individuals should receive grades
guidance based on the amount of effort they put in. Assessing
individual contribution, for example, through
interviews, can be time consuming and difficult to
manage. We adopted an approach built partially on shows that, based on available data, student
peer review. Students in a pair were required to performance in classes with pair programming is
submit their work jointly but respond to a few peer significantly better, with DWF rates in the range 7%-
review questions independently. Both students in a 45%, compared with performance in classes where
pair received the grade for their joint effort after it students worked on their own, with these rates in the
had been weighted by mutual peer evaluation. The range 20%-57%.
evaluation questions used are given in Table 1 below.
TABLE II. STUDENT DWF GRADE PERCENTAGES IN
Students had to submit answers to these questions CLASSES WITH AND WITHOUT PAIR PROGRAMMING
with each assignment work using a 5-point Likert
Semester DWF (%)
scale, with 5 corresponding to strongly agree, 3 to Fall, 2006 57%
neutral, and 1 to strongly disagree. Each student’s Spring, 2007 20%
grade was scaled by the average of his/her partner’s Fall, 2007 30%
responses to these three questions. Spring, 2008 47%
Fall, 2008 27%
TABLE I. PEER EVALUATION QUESTIONS Spring, 2009a 45%
Fall, 2009 (section 1)a 7%
1. My partner did his/her fair share of the work Fall, 2009 (section 2)a 21%
2. My partner was cooperative a. Classes offered with pair programming
REFERENCES
[1] E. W. G. Clua, “A Game Oriented Approach for Teaching
Computer Science,” SBC 2008 Workshop on Computing
Education, Belem do Para, Brazil, July 12-18, 2008.
[2] H.Roumani, “Design Guidelines for the lab Component of
Objects-first CS1,” Proc. Thirty-third SIGCSE Technical
Symposium on Computer Science Education, D. Knox, Ed.
ACM, New York, 2002, pp. 222–226.
[3] L. Ray, S. Khan, W. Summers and B.Wright, “Media
Computation: An Audio-Visual Approach to Teaching
Computer Programming,” International Journal for
Knowledge, Science and Technology, Vol.1, Issue 2, pp. 93-
101, 2010.
[4] M. Koski, J. Kurhila, and T. Pasanen, “Why using robots to
teach computer science can be successful theoretical
reflection to andragogy and minimalism,” Proc. 8th
International Conference on Computing Education Research,
Koli, Finland, November 13-16, 2008.
[5] A. M. Phelps, C. A. Egert and J. D. Bayliss, "Games in the
Classroom: Using Games as a Motivator for Studying
Computing: Part 1, " IEEE Multimedia, Vol. 16, Issue 2, pp.
4-8, Apr.-June 2009.
[6] L. Williams and R. R. Kessler, "Experimenting with
Industry's 'Pair-Programming' Model in the Computer
Science Classroom," Computer Science Education, Vol. 11,
Issue 1, pp. 7-20, 2001.
[7] J. Bevan, L. Werner,C. McDowell, “Guidelines for the use of
pair programming in a freshman programming class,”
Proceedings of the 15th Conference on Software Engineering
Education and Training (CSEET'02), Covington, USA,
February 25-27, 2002.