Based on a handout by Chris Piech, Marty Stepp, Cynthia Lee, and others.

As the course information handout mentions, several of the assignments in this course (specifically, Assignments 4-6) allow you to optionally work in a pair with a partner. Each assignment will explicitly specify whether this is an option. Some common questions and tips on working on assignments with a partner are listed below.

Additionally, some helpful tools for sharing code privately online with your partner (if needed) are CollabEdit and Google Docs. Please Do NOT post shared partner code publicly on places like Pastebin or public GitHub repositories.


Q: Why are we doing pair programming in CS106AP this quarter?
A: Pair programming serves two purposes. The first is that pair programming has potential benefits to students. Working with a partner can give you someone to talk to when you're stuck, or help you learn different ways of approaching the same problem. Pair programming also reflects the collaborative nature of software engineering in the real world!

The second is to ensure a high quality of service from our course staff. Pair programming helps reduce the heavy grading workload on our section leaders, so they can support you and best help you be successful in CS106AP.
Q: What is the best strategy for working with a partner?
A: The exact work style you use with your partner is up to you. There are several ways that pairs can work together. We'll discuss potential options for coding together more below, but first, here are some highly recommended strategies for approaching the problem as a team, before you begin programming:
  • Brainstorm together to make sure both partners fully understand the complete algorithm before beginning coding.
  • Brainstorm ideas and approaches to the problem separately and then come together to see different ways of approaching the problem. This can then lead to a discussion of the pros and cons of each person's approach to the problem.
Once you have a general strategy for how you're planning to approach the assignment, here are some possible strategies for coding together, along with our opinion about the effectiveness of each:
  • Sit together and write the code together: (Strongly recommended.) In this work style, you would sit next to each other at the same computer and collaborate to write the code. One person would type for a while, then the other, and back again. You can decide the interval for switching who controls the computer (the "driver"). Some people recommend switching roughly every 15-20 minutes, to make sure that each person gets to drive. Even if one of you is a faster typer, letting both people drive for equal time is good to avoid having one person dominate the work.
  • Work together using online tools: (Recommended.) In this work style, the two of you would be physically apart but would collaborate by sharing code using online tools. For example, you would put your code into CollabEdit or Google Docs (see links above) and talk to each other using a chat program like Google Hangouts, Skype, FaceTime, etc. This style can be effective for students who have different schedules or live far apart.
  • Do the assignment individually, and then compare/merge solutions: (Somewhat recommended, but we suggest one of the others above instead.) In this work style, each of you would complete the assignment on your own, then the two of you would have a meeting and compare solutions. You would then merge the solution into a best combined solution that you would submit together. This work style doesn't have as many benefits as working on the solution together, but it is still good to see how another student solved the problem and learn from each others' programs' strengths and weaknesses.
There are some work styles that we do NOT recommend because we do not think they follow the spirit of working in pairs, and do not allow both students to effectively learn the material. For example:

  • Splitting up the parts of the assignment: In this work style, each of you would complete parts of the assignment individually, then submit them together. For example, if the assignment has a "Part A" and a "Part B", one of you would do Part A and the other would do Part B. We do not recommend doing this because each of you will only learn part of the material for that assignment.
  • Taking turns on assignments: In this work style, in a pair of students named A and B, student A would do Homework X, then B would do Homework X+1, A would do Homework X+2, and so on. You should not do this, since each partner is expected to make a significant contribution toward solving the assignment.
  • One person does all of the work: You should not do this, since each partner is expected to make a significant contribution toward solving the assignment.
Overall, you should not claim to be part of a pair submission if you did not contribute significantly towards the entire submission. By choosing the work strategies described above, one or both members of the pair will not learn all the course material well and will be grossly underprepared to do well on exams and future assignments. The assignments are by far the best vehicle for you to learn how to program effectively and truly come to understand the course material.
Q: Is every assignment going to be a pair assignment?
A: No; some assignments will be individual. Each assignment will clearly label whether it is an individual or pair assignment. Please follow each assignment's instructions properly, and if a given assignment is an individual assignment, please submit your own work and do not share code with a partner.
Q: Are there any constraints on whom I can work with?
A: You can only work with another student in your section.
Q: How can I find a partner to work with?
A: Your section leader may provide time in section for you to find a partner if needed. You may also contact your section leader if you need help finding someone else in your section to partner with.
Q: Do I have to have the same partner for the whole quarter?
A: No; if you want to change partners, you may do so. You can also decide to work individually on particular assignments even after having worked in a pair.
Q: How do we submit/get grades as a pair?
A: Only ONE of you should submit your project via Paperless; please clearly mark at the top of the files in the project that you are both working in a pair. Make sure to add your partner as a collaborator on the assignment when submitting on Paperless. Your section leader will grade the assignment for both of you.
Q: My partner was a bad partner. They didn't do any work, or didn't do their share of the work, or didn't communicate or meet with me, etc. What can I do?
A: Have you tried speaking to your partner to let them know that you expect them to do more? Remind your partner what the course info handout says about expectations of each member of a pair. Many group issues can be resolved by better communication and setting expectations.

If talking to your partner does not resolve the situation, speak to your section leader and explain the details of what has happened. We will try to help you resolve the issue. If it is an ongoing problem, the section leader can help you find you a partner, or you can dissolve your partnership and submit individually. Please feel free to bring to our attention any complaints you may have about your partner.

NOTE: If you agree verbally (or via email) to work with a given partner on a given assignment, you are expected to work through that assignment with that partner to completion. You can't abandon your partner in the middle of an assignment unless the decision to unpair is mutual for both of you. Please be considerate to your partner and don't leave them hanging without an easy way to find a new partner mid-assignment. If you are planning to end your partnership and do the next assignment alone, please tell your partner this as soon as possible when the assignment is given out, so that they can make other arrangements.
Q: My partner was a bad partner, but not because they didn't do enough work. They did too much! They hogged the keyboard, or they did the whole assignment without waiting for me, or they didn't communicate with me, etc. I feel that I didn't get a real chance to help in writing the code and solving the assignment. What can I do?
A: The answer is similar to the previous question. Have you tried speaking to your partner to let them know that you expect them to let you contribute? Remind your partner what the course info handout says about expectations of each member of a pair. Many group issues can be resolved by better communication and setting expectations.

If talking to your partner does not resolve the situation, speak to your section leader and explain the details of what has happened. We will try to help you resolve the issue. If it is an ongoing problem, the section leader can help you find you a partner, or you can dissolve your partnership and submit individually. Please feel free to bring to our attention any complaints you may have about your partner.
Q: How do we get help if our pair is stuck on an assignment?
A: You can go ask for help from the section leaders in the LaIR. Keeping in mind that a big reason for implementing pairs is to help reduce staff workload, we request that if both of you are in the LaIR, that only one of you enters the queue at a time. That is, please don't try to "double up" by enqueuing both of your names in the line. If we find that a group is doing this, we will remove both of their names and move one of them to the very back of the queue. Thank you for your cooperation.

If one of the members of the pair has conceptual questions, they are more than welcome to come to the LaIR on their own to get help in the conceptual queue. However, we advise that pairs come to the LaIR together if they are seeking help on debugging their assignment.

Also feel free to come ask the instructor or Head TA for help during office hours.

Don't forget to talk to each other plenty during the assignment along the way. One benefit of working in pairs is that each member of the pair can help the other improve their understanding of the material and help figure out how to solve the assignment.