23
Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Jennifer Bevan, Linda Werner, Charlie McDowell Charlie McDowell Department of Computer Science Department of Computer Science University of California, Santa University of California, Santa Cruz Cruz {jbevan,linda,charlie}@soe.ucsc.ed {jbevan,linda,charlie}@soe.ucsc.ed u u

Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Embed Size (px)

Citation preview

Page 1: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Guidelines for the Use of Pair Programming in a Freshman

Programming Class

Jennifer Bevan, Linda Werner, Charlie McDowellJennifer Bevan, Linda Werner, Charlie McDowell

Department of Computer ScienceDepartment of Computer Science

University of California, Santa CruzUniversity of California, Santa Cruz

{jbevan,linda,charlie}@soe.ucsc.edu{jbevan,linda,charlie}@soe.ucsc.edu

Page 2: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Problem Statement

Initial exposure to computers and Initial exposure to computers and programming directly affects the retention programming directly affects the retention of students within the field.of students within the field.

Conventional introductory programming Conventional introductory programming classes do not prepare students for later classes do not prepare students for later collaborative work.collaborative work.

How do we increase retention and prepare How do we increase retention and prepare students for working within a group?students for working within a group?

Page 3: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Solution Approach

We used pair programming in the freshman We used pair programming in the freshman programming class at UCSC for three programming class at UCSC for three quarters, as part of an NSF research project.quarters, as part of an NSF research project.

Good early results were achieved, but some Good early results were achieved, but some pairs were unstable or ineffective.pairs were unstable or ineffective.

The problems encountered by these pairs The problems encountered by these pairs were used to create guidelines for future were used to create guidelines for future implementations of pair programming.implementations of pair programming.

Page 4: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Background

Pair programming is one aspect of eXtreme Pair programming is one aspect of eXtreme Programming (XP).Programming (XP).

Partners alternate between Partners alternate between drivingdriving and and observingobserving at (in our case) 1-hour intervals. at (in our case) 1-hour intervals.

All or most individually produced code is All or most individually produced code is treated as a throwaway prototype.treated as a throwaway prototype.

Reduces ego involvement, typographical Reduces ego involvement, typographical bugs, improvisational design changes.bugs, improvisational design changes.

Page 5: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Implementation Details

3 classes, with 3 different instructors, used 3 classes, with 3 different instructors, used pair programming (Fall 00, Winter 01).pair programming (Fall 00, Winter 01).

1 class, with an instructor who previously 1 class, with an instructor who previously used pair programming, did not (Spring 01).used pair programming, did not (Spring 01).

Each class required 9 programming Each class required 9 programming assignments (one per week).assignments (one per week).

2 TAs were assigned for each class.2 TAs were assigned for each class.

Page 6: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Implementation Details (cont.)

Paired students were required to submit Paired students were required to submit individual logs for each assignment:individual logs for each assignment: Time spent driving, observing, and Time spent driving, observing, and

working alone; confidence in solution; working alone; confidence in solution; satisfaction with the experience.satisfaction with the experience.

Unpaired students submitted similar logs:Unpaired students submitted similar logs: Time spent; confidence in solution; Time spent; confidence in solution;

satisfaction with the experience.satisfaction with the experience.

Page 7: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Class-Level Implementation

2 of the paired classes had mandatory 2 of the paired classes had mandatory sections, 1 did not.sections, 1 did not.

1 of the paired classes only allowed pairing 1 of the paired classes only allowed pairing within sections, 2 allowed pairing between within sections, 2 allowed pairing between sections.sections.

Week Week nn assignments covered similar assignments covered similar material but varied in the expected average material but varied in the expected average solution time.solution time.

Page 8: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Difficulties

Inability to schedule enough time together.Inability to schedule enough time together. Unreliability of a partner.Unreliability of a partner. Friction caused by different experience Friction caused by different experience

levels and/or rates of learning.levels and/or rates of learning. Lack of understanding or caring about the Lack of understanding or caring about the

pair programming guidelines.pair programming guidelines. Unwillingness to raise these issues in a Unwillingness to raise these issues in a

timely fashion.timely fashion.

Page 9: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Scheduling Conflicts

Just under 5% of all pairs had significant Just under 5% of all pairs had significant scheduling/reliability problems.scheduling/reliability problems.

Students’ methods of handling these Students’ methods of handling these problems were hampered by inexperience problems were hampered by inexperience with a 10-week term.with a 10-week term.

Scheduling difficulties were exacerbated Scheduling difficulties were exacerbated between partners that were not enrolled in between partners that were not enrolled in the same section.the same section.

Page 10: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Experience Conflicts

Just under 2% of the pairs experienced Just under 2% of the pairs experienced friction due to differing experience levels or friction due to differing experience levels or rate of learning.rate of learning.

These “higher” level students thought:These “higher” level students thought: Pairing is a waste of their time.Pairing is a waste of their time. They are not required to be teachers.They are not required to be teachers. Better to just complete the assignment Better to just complete the assignment

alone and submit it with both names (!).alone and submit it with both names (!).

Page 11: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Understanding and Buy-In Issues

Some pairs divided and conquered.Some pairs divided and conquered. Others alternated development by emailing Others alternated development by emailing

the latest version back and forth.the latest version back and forth. Some partners did not want to drive at all.Some partners did not want to drive at all. In most cases, this behavior was discovered, In most cases, this behavior was discovered,

not reported.not reported. These issues were caused by a lack of These issues were caused by a lack of

understanding or caring.understanding or caring.

Page 12: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Overcoming Pair Problems

Most of these students do not have the Most of these students do not have the experience or the inclination to quickly experience or the inclination to quickly resolve these problems.resolve these problems.

Introductory programming courses need to Introductory programming courses need to agressively address these issues. agressively address these issues.

Classes need to be structured within Classes need to be structured within constraints of TA and instructor time limits.constraints of TA and instructor time limits.

Page 13: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Guidelines 1

Pair Within Enrolled SectionsPair Within Enrolled Sections Reduces scheduling problems by using Reduces scheduling problems by using

enrollment system as conflict resolver.enrollment system as conflict resolver. TAs can facilitate ice-breaking activities TAs can facilitate ice-breaking activities

and partner test-drives during first-week and partner test-drives during first-week sections.sections.

Page 14: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Guidelines 2

Pair (somewhat) by skill levelPair (somewhat) by skill level Ask student about willingness to work Ask student about willingness to work

with a partner of a higher or lower level.with a partner of a higher or lower level. Unwilling students can be paired with Unwilling students can be paired with

others at a similar level.others at a similar level. After one successful pairing, willingness After one successful pairing, willingness

to accept another partner increases.to accept another partner increases.L. Williams, R. Kessler, W. Cunningham, and R. Jeffries, “Strengthening the L. Williams, R. Kessler, W. Cunningham, and R. Jeffries, “Strengthening the case for pair programming,” case for pair programming,” IEEE SoftwareIEEE Software, vol. 17, pp. 19-25, July 2000., vol. 17, pp. 19-25, July 2000.

Page 15: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Guidelines 3

Make Sections MandatoryMake Sections Mandatory TA can identify reliability problems faster, TA can identify reliability problems faster,

because both partners are expected to be because both partners are expected to be present.present.

Students’ grades are linked to meeting with Students’ grades are linked to meeting with partner.partner.

A set of acceptable excuses and attendence A set of acceptable excuses and attendence requirements add little work for TA or requirements add little work for TA or instructor.instructor.

Page 16: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Guidelines 4

Assign Work as a Function of Section TimeAssign Work as a Function of Section Time Tailor the problem size such that an Tailor the problem size such that an

acceptable percentage of the pairs finish acceptable percentage of the pairs finish during section.during section.

Does not reduce topic coverage, only Does not reduce topic coverage, only reduces overhead and busywork.reduces overhead and busywork.

Requires planning by instructor.Requires planning by instructor.

Page 17: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Guidelines 5

Institute a coding standardInstitute a coding standard Experienced programmers can code to a Experienced programmers can code to a

standard regardless of opinions on standard regardless of opinions on readability, past familiarity, etc.readability, past familiarity, etc.

Most others have their own “right” style.Most others have their own “right” style. Reducing conflicts between styles Reducing conflicts between styles

reduces conflict between partners. reduces conflict between partners.

Page 18: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Pairing Guidelines 6

Create a Pairing-Oriented CultureCreate a Pairing-Oriented Culture Openly discuss common problems in-Openly discuss common problems in-

class or in-section.class or in-section. Reiterate goals of pair programming.Reiterate goals of pair programming. Added awareness can lead to self-Added awareness can lead to self-

correction of problems.correction of problems. Submission and grading policies need to Submission and grading policies need to

support collaborative process.support collaborative process.

Page 19: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Why Bother?

““Not that many pairs had problems”Not that many pairs had problems” Small target size doesn’t prohibit simple Small target size doesn’t prohibit simple

solutions.solutions. ““Their degree is an individual achievement”Their degree is an individual achievement”

The workplace is a collaborative environment. The workplace is a collaborative environment. Any preparation is helpful.Any preparation is helpful.

““My students wouldn’t have these problems”My students wouldn’t have these problems” We didn’t think so either.We didn’t think so either.

Page 20: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Conclusions

Many valuable lessons learned from the Many valuable lessons learned from the variety of pair-programming variety of pair-programming implementations during our experiment.implementations during our experiment.

Introductory classes have several common Introductory classes have several common problems not frequently found in workplace problems not frequently found in workplace (or upper division) environments.(or upper division) environments. Time management, scheduling support, Time management, scheduling support,

professional behavior not developed.professional behavior not developed.

Page 21: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Conclusions (cont.)

We developed guidelines for future We developed guidelines for future implementations that address these implementations that address these problems.problems.

As more introductory classes adopt pair As more introductory classes adopt pair programming, these guidelines should be programming, these guidelines should be expanded and adapted.expanded and adapted.

Paper on impact of pair programming to be Paper on impact of pair programming to be presented at SIGCSE 2002.presented at SIGCSE 2002.

Page 22: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Acknowledgements

Dr. Heather Bullock, Dr. Julian Fernald, Wendy Dr. Heather Bullock, Dr. Julian Fernald, Wendy R. Williams, M.S, and Tristan Thomte, from the R. Williams, M.S, and Tristan Thomte, from the Psychology Department at UCSC.Psychology Department at UCSC.

Dr. Alex Pang and Dr. Scott Brandt from the Dr. Alex Pang and Dr. Scott Brandt from the Computer Science Department at UCSC.Computer Science Department at UCSC.

Project funding by the National Science Project funding by the National Science Foundation (NSF EIA-0089989, “Retaining Foundation (NSF EIA-0089989, “Retaining women in computer science: Impact of pair women in computer science: Impact of pair programming”). programming”).

Page 23: Guidelines for the Use of Pair Programming in a Freshman Programming Class Jennifer Bevan, Linda Werner, Charlie McDowell Department of Computer Science

Thanks! Any Questions?