About Pair Programming

This quarter, you will be working on your coding assignments in pairs! Working on coding problems in pairs is a skill in and of itself, and this guide is designed to help you make the best use of this opportunity.

What if I would really rather not work with a partner?

We strongly encourage you to work on assignments in pairs this quarter. We believe this is the best way to develop your software engineering skills of planning and collaboration, which are even more important out in the “real world” now that implementation itself is often AI-driven (of course we still want you to learn implementation! since our industry contacts are saying that the most effective AI-coders are those who have a deep foundation in coding). Although we think pair programming is the best way to gain these important skills, we understand that some of you may strongly prefer to work individually. If that is the case, please fill out this opt-out form so we can get idea of why people are choosing not to participate in pair programming, and you may then work alone.

Who Can I Partner With?

The only requirement is that your partner be someone who is currently a student in CS106B. If you don’t know anyone in the course, don’t worry! Your section is a great place to meet people and find a partner for assignments.

Can I Switch Partners?

Yes, absolutely! You are not required to work with the same partner all the time. Our only rule is that if you’ve started working on an assignment with someone, you need to submit that specific assignment jointly. After the due date, you’re free to switch who you’re working with for the next assignment (or to do the assignment solo if you’d like). This happens all the time, either because someone’s partner decides to take CS106B in another quarter, or because the partnership wasn’t a good match, or because three friends are rotating partnering with each other on the weekly assignments.

How Should I Work With My Partner?

Thank you for asking this question – it’s important to be strategic with how you complete assignments in a pair. In fact, historically we’ve found that folks who work well with their partners tend to do markedly better than students who don’t work effectively with the people they’re partnered with.

Let’s begin with the Big List of Bad Ideas. When working with a partner, make sure not to do the following.

  • Do not have one person do all the work and the other person just attach their name at the end. This is borderline dishonest (if you’re submitting as a pair, we expect that both you and your partner actually did the work) and is one of the most common ways we see people have high assignment scores and then flame out on exams. Remember – your ultimate goal is to master the material and techniques we’re teaching, not simply to get through the week’s assignment.
  • Do not have one person do half the assignment and the other person do the other half. You and your partner are not likely to end up being good cooks if one of you just practices sautéing and the other just practices roasting. You and your partner are not likely to end up being good woodworkers if one of you just practices using a table saw an the other just practices using a miter saw. You and your partner are not likely to end up being good musicians if one of you just practices playing pieces in major scales and the other another just practices playing pieces in minor scales. Each part of the assignments is calibrated to hit some particular nuance of the material, and if you don’t work through all of them you’ll miss some important skills and concepts.
  • Do not take turns completing assignments. The material in CS106B builds on itself, and if you take a week off from practicing coding you can easily get yourself into a point where you can’t get caught back up.

With all that out of the way, what should you do? There are many different ways to partner with someone effectively, and we don’t want to give a “one-size-fits-all” approach. For each problem on the problem sets, we recommend picking one of the following approaches:

  • Complete the assignments separately, then compare and synthesize. In this approach, the two people working as partners each do their best to complete the assignment individually. Once they’re done or mostly done, they come together and read over each other’s code, giving feedback about what they liked (“oh, I didn’t think of that – that’s so clever!”) and what they think needs work (“I see what you’re going for here, but I think X works in way Y rather than way Z”). Finally, the two partners write a single final submission jointly, synthesizing ideas from each solution. This gives both partners significant practice critiquing code (a hugely valuable skill!) and lets each person benefit from the other’s insights.

  • Work each problem together, trading off who leads. In this approach, both partners work together on the assignment simultaneously, bouncing ideas off one another and offering real-time feedback and critiques of ideas. To make sure that both partners get experience with problem-solving, on each problem one person will take a lead role, choosing which paths to explore, drawing pictures, etc. The other person will take a supporting role, offering feedback about ideas the lead person generates (“yeah, that sounds good!,” “I remember concept X working differently – doesn’t it mean Y and Z?,” “I think you meant X when you said Y there.,” etc.) The partners trade off the lead role to ensure that both of them learn both to synthesize new ideas and to evaluate potential routes.

  • Do some preliminary exploration, then come together to solve things. This is a hybrid of the two above approaches. Each partner spends some time individually looking over the assignment and trying out some ideas. This could include things like sketching out pseudocode, drawing pictures (“here’s my visualization of what this problem is asking us”), and reviewing relevant lecture topics (“I think this is asking something along the same lines as this lecture example”). From there, the partners can either decide to try to solve the problem individually using what they’ve found or work on the problem jointly.

Beyond these strategies, though, there’s a number of points of General Good Citizenship that you should keep in mind when working in a pair. All of these, by the way, will transfer to the workplace and to other personal relationships. 😃

  • Agree on your method of communication. Will you be communicating over text, over email, or some other means? And what’s a reasonable turnaround time? Different people feel differently about this. Some people like using email to communicate and are fine with 24-hour delays in responding. Other folks like texting and want immediate responses. What matters less is how you choose to stay in touch with one another than that you agree on what the parameters are. Talking about this up front will make things a lot easier.

  • Communicate expectations. We listed three reasonable approaches to the assignments above. Make sure you don’t spend the week solving everything individually preparing for a joint meeting while your partner is expecting to work the problems together with you each day.

  • Be civil. Don’t tell your partner they’re stupid because they made a small error. Don’t ask how your partner could not have known something if they don’t know it. That’s just basic decency.

How Do LaIR and Office Hours Work With Partners?

Our expectation is that you and your partner are jointly working on the whole assignment together. To that end, you will get the most out of your LaIR/Office Hours visit if you come together. If you cannot come together, make sure to document your interaction very carefully so that your partner can get caught up conceptually and so that they are fully aware of exactly what kind of help their assignment recieved.

How Do I Submit Work With a Partner?

You must make a single joint submission. The good news is that Paperless makes this easy – one partner uploads the joint submission, then adds the other person as a partner. The partner then accepts the invitation to be partners. If you forgot to add your partner’s name when making the submission (please try to avoid this, though it’s less uncommon than you’d think), ping your section leader to let them know.

What Happens If We Can’t Agree on Something?

It sometimes happens that you and your partner won’t be able to agree on something. If this is something of a technical nature (one person says “I think we’re supposed to do this in way X” and the other says “I think we’re supposed to do this in way Y”), you can always ask on EdStem or stop by office hours. Disputes based on a factual question are often easy to resolve, and you’ll both learn something from the process. Often times, we find that when there’s a genuine factual disagreement, it’s on a nuanced point and we’re very glad people asked!

In other cases, these disagreements can be a bit harder to resolve. For example, imagine that your partner shows up to a meeting completely unprepared, or that your partner has simply stopped responding to texts or emails, or that your partner just plain isn’t nice to you. It’s not fun when that happens.

So what should you do? This will ultimately be specific to your situation, but you have some options. One option would be to try to patch things up with your partner. That’s a great life skill to develop. You can get advice about how best to do this by talking to your dorm staff, to your academic advisor, by taking a class in negotiation or interpersonal dynamics (we have them here, and they’re great!), or by doing some searching online.

Another option would be to make it to the end of the week’s assignment through whatever compromises are necessary and then stop working with the person. Sometimes you and the other person just don’t work well together, and it’s good to move on. If so, we’re sorry the experience didn’t go well, but hopefully it serves as a good learning experience for future partnerships. If you do this, though, don’t ghost the other person. Make sure to (civilly!) tell your partner that you won’t be working with them so that they can plan accordingly.

Partners and Retaking CS106B

If you are retaking CS106B, or if your partner is retaking the class, make sure that you and your partner comply with the appropriate Honor Code policies regarding past work and reusing work.