Back To: [Trinity College] [Computer Science Department] [Heidi Ellis home page] Instructions for Pair Programming


Instructions for Pair Programming


Pair programming is an approach where two people work together in front of a computer to accomplish a software engineering task. This task may be writing code, desiging an application, testing, writing documentation, etc. The team works side-by-side continually reviewing and discussing the task. The work product is owned equally by both team members. When used in lab, two students work together to complete a lab, submitting a single lab and both students recieve the same grade for the lab.

A pair programming team consists of the driver who types at the keyboard and records the actions needed to accomplish a task.


The navigator watches the work being developed by the driver and reviews and comments on the work. The navigator asks questions, makes suggestions and identifies problems.


Team members should trade roles between driver and navigator (every 15-20 minutes) so that each person gets approximately the same time in each role.

Guidelines to be followed when using pair programming:
  1. Partners should share ideas about the overall problem, how to solve the problem by breaking the problem into smaller pieces, and any concepts related to the problem covered in lecture, the text or the assignment before starting to solve the problem.
  2. The driver should explain their thought process as they are typing. This will allow the other person to understand the logic behind what is being typed.
  3. If both team members don't have the same idea, use a piece of white paper or a whiteboard to diagram solutions and then select the best one.
  4. Save your work frequently.
  5. If one of the programmers is clearly less comfortable with programming, have that person drive until they become comfortable.
  6. Respect the driver. If you know the solution to a problem, don't grab the keyboard and begin to type. Instead explain your thoughts to your partner so that they understand.
  7. Work out differences with respect for others' opinions. There will be difference of opinions and partners must communicate effectively in order to resolve them.
A paper that outlines the use of pair programming is All I Really Need to Know About Pair Programming I Learned in Kindergarten, by Laurie A. Williams and Robert R. Kessler (Communications of the ACM, May 2000).
Send Dr. Ellis Mail.
http://www.cs.trincoll.edu/~hellis2/CPSC110/index.html
Copyright © Heidi J. C. Ellis