Pair Programming

Pair programming basics

When working on programming assignments, whether in the Help Center or elsewhere, we have you an approach known as Pair Programming. In pair programming, two programmers share one computer. One programmer is the “driver,” who controls the keyboard and mouse. The other is the “navigator,” who observes, asks questions, suggests solutions, and thinks about slightly longer-term strategies. The two programmers switch roles about every 20 minutes. Substantial research has been conducted on pair programming and it strongly shows that it works: pair programming will very likely make you much better at programming than working alone, nearly always make you more productive than the stereotypical solitary programmer—no matter how experienced, and lead you to produce more high-quality code in less time, by far more than two-to-one over a single programmer!

“[Pair programming] makes learning programming faster and more fun. I have had previous experience working both alone and with partners. I definitely agree that working with partners is more profitable.” - ICS21 student

You will work with one partner for the first three assignments, and a different partner for the last two. For each of these two pairings, we expect students to choose their partners. If you prefer not to choose your own partner, or cannot find a partner, contact a TA, who will find one for you. You or your partner must email the names of your team members to 21-questions@ics.uci.edu no later than the dates given in the Course Schedule.


Choosing your first partner

Your partner does not need to be enrolled in your lab section. though, of course, your partner should be someone who can come to the Help Center at the same times as you; the more times you can meet in the Center, the better. You will also likely need to arrange times outside of class to meet. We expect everyone to be flexible and professional in arranging those times as necessary; if your schedule is highly constrained, explore possible meeting times with your prospective partner before you commit to the partnership.

If it is absolutely infeasible for you to work in a team, see the instructor; if that is truly the case, the instructor may give you permission to work alone. You must report your solo status to 21-questions@ics.uci.edu by the same dates as pairs report their partnerships.

You should try to pick a partner whose skill level is similar to your own, or one who is more skilled in areas where you are less skilled. This won‘t always be possible, and it‘s sometimes hard to compare skill levels, but students tell us (and other data support) that pairs are most productive when the partners are at about the same level.

Still, people often pair up with another whose skills and abilities are different. This happens much more often than not, as no two people have identical skill sets. The differences may be great or small, one member may have more strengths than the other, but this reflects most real-world working situations. Part of accomplishing a task is to get the most out of each member and make each member stronger and more productive on subsequent tasks.

A clearly stronger partner may feel frustrated or slowed down by the other partner, but the stronger partner still benefits from the teamwork in many ways: The other partner's requests for clarification often uncover flaws in the approach or solution; the exercise of providing a clear explanation solidifies and deepens the explainer's own understanding and the teamwork and communication skills they gain have great value in both the academic realm and the job market.

“My partner had never coded anything before so I was able to teach him a little bit about how it worked. The teaching bit helped me a lot with understanding the labs and passing the exams.” - ICS21 student

The less-strong partner may feel that questions hold the other partner back or that there is no benefit to participating actively, but pair programming studies show that paired work is consistently better than work the stronger partner does individually. It is part of each partner's job to understand the whole task; that means asking questions when necessary and answering them when possible.

It may be instructive to read a selection of students‘ partner evaluation comments from a previous course; they give a picture of what good partnerships are like (and a few disasters, too).

One good way to find a partner is to go to the Help Center at the times you are available to be in the Center to work on the assignments, and to talk to other students there at those times about teaming up. Another is to ask a TA at the Help Center to assist you in finding a partner. And a very good approach is to post an “ad” for a partner, or responding to a posted ad, at the course’s Finding a Partner message board.


Dealing with differences in commitment between partners

If, in your view, your partner is not participating appropriately in pair programming—for example, she or he often does not come to Center when you agreed you both would be there, does not keep in touch, does not come to meetings prepared to work—please first address your concerns to your partner and try to agree on what should be done to make the pair programming experience work well for both of you. If that approach is not successful, report the situation to the instructor, who will work with you and your partner to try to improve the situation.

If your partner drops the course, or otherwise stops participating in the team, notify a TA, who will, if at all feasible, pair you up with another student. In rare cases, we may ask you to work as the third person of a team (with that pair’s approval) or, as a last resort, to work alone, until a suitable partner can be found.


How does pair programming affect my grade?

All graded items in this course—lab exams, the midterm, the final—are done individually, so how your partner scores on these items will not affect your score on them.

Since pair programming is a requirement of this course, you are expected to work collaboratively with a partner. Failure to participate fully and cooperatively will count against you; you could receive a one- or two-point deduction in your total course points, depending upon how severely you failed to participate in pair programming. You may also receive a deduciton it you work alone, or in a group larger than two, without the instructor’s permission, or your partnership is not reported (see the last paragraph of pair programming basics, above). Since there are two pairings during the course, your total point reduction could be up to 4 points. If your participation was up to par, you’ll see a notation of "--" — meaning no adjustment — on eee for your adjustment score.

At the end of Assignment Three, and at the end of the course, you will be asked to individually submit a brief partner evaluation. See First Pair Programming Partner Evaluation and Choosing Your Next Partner and Second Partner Evaluation in this Lab Manual, for the form to use and the process for completing the evaluations and turning them in. These evaluations are required, and are due when indicated on the Course Schedule. As discussed in the Course Reference, you earn one point for a cursory evaluation, two points for an evaluation that is particularly thoughtful or insightful, and no points if you turn an evaluation in late or not at all.


Additional information

Much on pair programming has been published; a fine source for more information about pair programming is NCWIT's Pair Programming-in-a-Box. Although geared to instructors who want to adopt pair programming in their courses, many of the sections apply to students involved in pair programming.

Pair programming is one aspect of the trendily-named programming methodology Extreme Programming. A search for “pair programming” or “extreme programming” on the Web will yield many references.


Adapted by Norman Jacobson, September, 2006, from Informatics 41 Fall 2006 Pair Programming Guidelines by David G. Kay; used with permission (and thanks!)
Updated to reflect partner change at end of Assignment Three by Norman Jacobson, December, 2006.
Revised to include a section of what to do if your partner "disappears," by Norman Jacobson, February, 2007
Minor revisions by Norman J.acobson, September 2007.
Provided more detail on how pair programming and pair evaluations affect the course grade, by Norman Jacobson, December 2007.
Minor edits, and addition of quotes, by Norman Jacobson, September 2008
Inclusion of infomration and the eee finding-a-partner message board and minor edits for clarity, by Norman Jacobson, December 2009.
Minor revisions, to the introduction in particular, to improve clarity, and to update the find-a-partner noteboard URL, by Norman Jacobson, August 2010.
Minor revision to update the find-a-partner noteboard URL, and a couple of grammatical fixes, by Norman Jacobson, December 2010.
Minor revisions for clarity by Norman Jacobson, September 2011 and January 2012.