Pair Programming

icon
Piazza - Partner Search

(post here to find a partner!)
icon
Google Docs

(share code privately online)
icon
CollabEdit

(share code privately online)

We are not doing pair programming this quarter. All homework must be completed individually.

Q: Why are we doing pair programming in CS 106 this quarter? I have heard from friends that pairs were not allowed in the past.

A: There are several reasons. One reason is that pair programming has potential benefits to students. Working with a partner can give each of you someone to ask when you're stuck, or help you learn different ways of approaching the same problem. Having a partner also gives you a friend in the class so that you'll feel more welcome in our course.

Another major reason is to ensure you a high quality of service from our course staff. Our enrollments have grown rapidly, and we are trying to explore creative new ways to manage student work that will also reduce the heavy workload on our section leaders. We hope that having students work together in pairs will encourage people to help each other answer questions and reduce some of the dependency on the section leaders for help. It also leads to fewer assignment submissions to grade, which is important since grading takes a long time to do well.

Q: Am I required to work with a partner?

A: No, but we want to strongly encourage most students to do so. Pairs and individual students have the same due dates and are graded the same way.

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. Here are some possible strategies 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.
  • Both do the assignment individually, then compare/merge solutions: (Somewhat recommended.) 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 also some work styles that we do NOT recommend because we do not think they follow the spirit of working in pairs. For example:

  • Splitting up the parts of the assignment: (Not recommended.) In this work style, each of you would complete part 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. This will leave you less prepared on exams and future assignments.
  • Taking turns on assignments: (Not recommended.) In this work style, in a pair of students named A and B, student A would do Homework 1, then B would do Homework 2, A would do Homework 3, so on. We do not recommend doing this because each of you will only learn half of the course material in detail. The assignments are by far the best vehicle for you to learn how to program effectively and truly come to understand the course material. Only completing half of them will leave you much less prepared to do well on exams and future assignments.
  • One person does all of the work: (Strongly not recommended.) While we can't follow you around and monitor your work, it's conceivable that one person could just do all of the work, and the other person could do none of it. We do not want you to do this because the other person will not learn that material well and will be grossly underprepared to do well on exams and future assignments. This also violates the Honor Code, since you are putting your name on work to which did not contribute.

Whatever work style you and your partner choose to use, please keep in mind that every student must complete our exams individually. You are still responsible for learning all of the relevant course material so that you can do well on the exams. If you choose a pair work style that is not conducive to both members learning the material, you do so at your own risk.

Q: Is every assignment going to be a pair assignment?

A: No; some assignments, such as Homework 1, 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 about whom I can work with?

A: You must work with another student in your section. If your section has an odd number of students, ask your section leader and they may be able to arrange a swap to help you find a partner.

Q: How can I find a partner to work with?

A: We will provide time in section for you to find partners if needed. You can also post on the class message forum to help find a partner if you like. (In your post's subject, please include the section and time.)

Q: I have a friend who is also taking the class; can I work with him/her?

A: If you already have a friend in the course, as long as you are in the same section, you can work with them. Therefore, when signing up for sections, you and your friend should list the same section(s) as your highest preferences. If your friend is not in your section, your section leader may be able to help arrange a section swap so that your desired partner is in your section or you are in theirs.

Q: The person I want to partner with isn't in my section! What can I do?

A: If it's still early in the quarter, you can try to switch your section (or have your partner switch theirs, or both) by logging in to the cs198.stanford.edu web site and using the Section Swap option. If that does not work (due to a full section, etc.), please email the section leader coordinators using the contact information on that web site.

Q: Can I be partners with someone who is not in the class? For example, someone who took it in a previous quarter? What about someone who is auditing the class or taking it pass/fail?

A: No. Partners must be people who are both currently taking the course with the same grading basis. That is, if one partner is taking the course for a letter grade, the other must be as well. If one partner is taking the course Credit / No Credit, the other must be taking the course Credit / No Credit as well.

Q: Do I have to have the same partner for the whole quarter?

A: No; if you want to change partners, and can agree to a mutual partner swap, you may swap. But to do this, you have to find a swap that all people involved agree to. For example, suppose students (A, B) are partners and (C, D) are partners, but A and C want to work together. If A and C can get B and D to agree to the swap, the four can rearrange into groups (A, C) and (B, D). In general, due to the overhead of changing partners along the way, we encourage you to use the same partner unless there is a serious problem or reason not to.

Q: How do late days work with teams? What if I switch partners?

A: Each student has an individual personal counter of late days remaining. If your team turns in an assignment late, each individual student's penalty is based on that student's number of late days remaining.

Q: What if my partner drops the class?

A: Speak to your section leader. We will try to find you a new partner, or in the meantime, you can submit individually.

Q: I've added the class late! Can I still find a partner?

A: Speak to your section leader. We will try to find you a partner, or in the meantime, you can submit individually.

Q: I haven't found a partner yet! How can I find one?

A: One way to find a partner is to mingle during/after your section and look for others who are interested. If that doesn't work, post on the class Piazza board; there is a dedicated Partner Search thread linked above. If necessary, you may need to move into another section to work together.

Q: How do I share code with my partner online?

A: See the links above for recommended tools for sharing code. Please do NOT post shared partner code publicly on places like Pastebin or GitHub.

Q: I am retaking the class, or I dropped it in the past, so I already have written a solution to this assignment by myself. Now I want to work with a partner. Can my partner and I resubmit my old individually-written solution together this quarter?

A: No. This is not appropriate because you did not write the program as a pair; one person wrote the entire solution in a previous quarter. You should do one of the following two things instead: Either you two should work alone on this assignment and pair up on a future assignment instead, or you should discard your old individually-written solution (not looking at it at all!), and rewrite it from scratch as a pair.

Q: (Similar to previous question) I am retaking the class, or I dropped it in the past, and I already have written a solution to this assignment in a pair, with a partner from that past quarter. Now I want to work with a different partner who is taking the course with me currently this quarter. Can my partner and I resubmit my old different-pair-written solution together this quarter?

A: No. This is not appropriate because the current pair of you did not write the program together; a different person, someone who isn't even in the class any more, wrote the solution with you in a previous quarter. You should do one of the following two things instead: Either you two should work alone on this assignment and pair up on a future assignment instead, or you should discard your old solution (not looking at it at all!), and rewrite it from scratch as a pair.

Q: (Similar to previous two questions) My partner and I are BOTH retaking the class, or both dropped it in the past, and we already have a solution to this assignment that we wrote together as a pair that quarter. Can my partner and I resubmit our old solution together this quarter?

A: In this specific case, if you and that same partner wrote that same solution together in a prior quarter, and exactly that same pair of people is working together again this quarter, then yes, you can resubmit it this quarter as a pair. The general policy to be gleaned from these past 3 Q/As is: Once a solution is completely written (even if it has not yet been turned in), it should be considered "locked" in terms of who wrote it and who is permitted to submit it. If it was written by one person, that one person should submit it; not another individual person, and not a pair. If it was written by a pair of people, that exact pair should submit it; not an individual, and not some other non-identical pair.

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. We will provide a way for you to give feedback about your partner in case there is any complaint you would like to bring to our attention.

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, and you do not submit any pair-written code individually. Please be considerate for your partner and don't leave them hanging without an easy way to find a new partner in 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, and what this web page 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. We will provide a way for you to give feedback about your partner in case there is any complaint you would like to bring to our attention.

Q: How do we get help if our team 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 will enqueue for LaIR help 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.

Please also feel free to come ask the instructor for help during office hours, as well as posting questions on the course message forum. Please try to coordinate with your partner so that you don't both redundantly post the same question.

Don't forget to talk to each other plenty during the assignment along the way. One benefit we are hoping to see from having students work in pairs is that each member of the pair can help the other improve his/her understanding of the material and help figure out how to solve the assignment.

This document and its content are copyright © Marty Stepp, 2018. All rights reserved. Any redistribution, reproduction, transmission, or storage of part or all of the contents in any form is prohibited without the authors' expressed written permission.