Pair Programming for Lab Assignments 1 - 3

Pair programming basics

When working on the first three programming assignments (and optionally the last two), we have you use 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 programmerno 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

We expect students to choose your partners. If you cannot find a partner, contact the instructor, who will assit you in finding one. You or your partner must email the names of your team members to ics45J@ics.uci.edu no later than the dates given in the Course Schedule.


Choosing your partner

Obviously, your schedule and your partner's need to be compatible, so that you can arrange ample times to meet to work on the assignments. 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 45J@ics.uci.edu by the same date 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 talk to other students tbefore and adter lecture about teaming up. Another 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 keep appointments, 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 the instructor, 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?

The midterm, the final—are done individually, so how your partner scores on these items will not affect your score on them. However, Lab Assignments 1 to 3 are turned in as joint work: one assignment per team is submitted for grading, and each member of the team will receive the same score on that assignment.

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 deduction 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). 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 3 you will be asked to individually submit a brief partner evaluation. See Pair Programming Partner Evaluation and Optional Pair Programming for Assignments 4 and 5 in this Lab Manual, for the form to use and the process for completing the evaluation and turning it in. This evaluation is required, and are due when indicated on the Course Schedule. As discussed in the Course Reference, you earn one point for turning in an evaluation on time and no points if you turn an evaluation that is incomplete, or turned 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.
Links updated by Norman Jacobson, September 2012.