When Pair Programming Goes Wrong / Weird

Since pairing is a relational practice relying on imperfect communication, misunderstandings and slights can emerge.

What could go wrong with pairing? Here are some situations that have bothered me.

  • You come across some code that is difficult to read. Your partner tells you not to refactor the code.

  • Your partner dominates the keyboard for most of the day.

  • Your partner does all the work without involving you.

  • Your partner tells you how horrible is the code that you helped work on the previous day.

  • You discuss a situation and agree to a plan, but then your partner starts doing his / her own thing anyway.

In this section, I list out several strategies for coping with a situation that is getting tense, de-escalating a situation that is tense, and how to re-engage with your partner after a tense situation.

This is Part Three in a three part series covering strategies, techniques, and tips for Considerate Pair Programming.

Part One covers Why We Pair and Setting up the Work Environment for success.

Part Two covers Strategies for Success including

  • welcoming interactions at different parts of the day,

  • reflecting on the pair programming experience, and

  • reframing interactions for growing collaboration.

Part Three covers what to do When Things Go Weird

Remote pairing presents its own set of challenges. See my remote pairing blog post for techniques to improve remote pairing effectiveness.

Choosing to pair program makes the fundamental assumption that each person in the pairing brings value. Because technology changes so frequently, even someone new to a technology brings value because an expert programmer could not have seen everything. The “magic” of pairing is bringing together the disjoint experiences and knowledge. If one person is not fully engaged (either by choice or by exclusion) then the pair is not likely getting the value of the investment.

Taking a genuine interest in the other person is a key take-away from this section. Sometimes this is easy. With some people we have an obvious overlap of personality, perspective, experience, or values. Sometimes this is hard. Your pair is not your enemy. We might need to make some conscious effort, e.g. focusing on the most respectable thing about that person and make many of your interactions with them about that.

Remember that our overarching goal is to to create a welcoming and safe environment for both pairs.

Here are playing cards that cover these techniques:

Improving communication when things are starting to get tense

Repeat to understand

What: Take a moment to make sure you understand your partner’s idea. Repeat back or summarize what you just heard. “I hear you saying that we should….”

Why: This technique helps me understand if I am hearing what my pair is trying to say. I have experienced several cases where each of us thinks we are clearly communicating an idea, but one of us is fundamentally misunderstanding what the other is saying. People have different communication styles. Some prefer precise, detailed language while others prefer abstract communication. This technique can help bridge a communication gap when people of different communication styles pair.

When: Try this technique when you and your pair are not on the same page. If my partner says something that I think is utterly ridiculous, I might use this method to verify that I heard the suggestion correctly. In this situation, I do try to embrace empathy and not be sarcastic in repeating back what was said.

Summarize current situation or review how we got here

What: Describe where we are at or recall the journey.

Why: Sometimes it is easy to get caught up in arguing about the trees without seeing the forest. By reviewing our thought process on how we got here, we recall our decision-making process and refocus on our goals.

When: When the path forward is not obvious or we are no longer certain which problem we are solving.

Advocate your partner’s solution

What: Articulate your partner’s solution and describe what you like about it.

Why: This will showcase that there are merits in what your partner’s solution. By taking your partner’s point of view, you adopt a more flexible position and might let go ownership of your solution.

On several occasions, my partner and I have switched positions when I have used this technique. I want to do their idea, and they want to do my idea.

Explore alternative solutions

What: List out everything that could possibly work. Verbalize half-baked ideas.

Why: We want to find the best possible technical solution. Premature convergence happens when we latch onto an idea before we have explored many divergent ideas.

When: Sometimes we get bogged down on own perspective on how to solve an idea. By exploring alternative approaches, we unstick ourselves.

Bring in the team

What: Ask your team for their opinion. Try to present both ideas fairly. Experiment with each person advocating for the other person’s idea.

Why: Involving multiple perspectives shifts the focus from “you versus me.” The team may bring additional insights and solutions. If two people cannot agree, it is probably worth taking the time for the team to help solve it.

If five people on a six-person team agree on a solution, there’s more weight behind the team making the decision. For the dissenting point of view, mention that the team will try the solution and revisit the decision later if it does not work out. View this situation as a learning opportunity. On several occasions, I have thought something could not possibly work only to be pleasantly surprised that I was wrong.

When: After exploring alternative solutions, if the pair cannot agree on how to make forward progress. I tend to reach for this technique first when the decision affects everyone on the team.

One software engineer said, “I have found bringing in the team works in principle for building consensus. I once had an issue where it left the dissenting developer feeling bitter, and resentful. He went behind everyone’s backs to reverse the team design decision.”

Try one solution or try both solutions

What: Trying one or both solutions.

Why: We can waste time in over-discussing solutions. Implementing a solution reveals new information. Sometimes we can quickly realize that a solution will need additional adaptations or simply will not work.

When: If it is easy to try one or both solutions and there is no clear winner.

De-escalating a tense situation

“I could really use a break.” / Take a Break

What: Suggest taking a break.

Why: If your pair pushed one of your buttons, you might need some time to decompress.

When: If you find yourself getting annoyed or your pair getting annoyed with you. If you see a pair on your team struggling with cooperation, suggest that the entire team take a break. “Let us all play ping pong.”

Example: In the Palo Alto office, it is super easy to get outside and enjoy nature. Sometimes I just need to sit in the sun, feel its warmth, and realize that this moment will pass. When my partner pushes one of my buttons, I might use an affirmation to ground myself: “I add value to the team” or “I am wonderfully made” or “My opinions have merit.” For me, the best affirmations are ones that I know to be true, but I am not feeling it to be true right now.

“Tell me about one of your passions.”

What: Get to know your partner in a different setting.

Why: Often we are so focused on delivering stories, that we do not take the time to know our pairs. Find a neutral topic on which you can relate. Reframe the situation to realize that you are pairing with a human, full of aspirations, goals, and needs. Connecting helps us see our partner as a person and grounds us in their humanity.

Example: When I taught at Carnegie Mellon University, two of my master students struggled with collaborating. One evening they had dinner and discovered that they loved the same sports team. Building connection points can shift the relationship from “me versus them” attitude.

By using this technique, I have learned how to brew coffee, how the bitcoin block-chain works, and my pair’s dream to work at Space-X.

Talk to a trusted friend

What: Sometimes venting to a friend helps.

Why: I am biased by my own point of view and I can lose perspective. Talking to a friend helps separate my hang-ups from the dynamic with my pair. Our friend may provide perspective that we are missing.

How to re-engage

Bring it up. Acknowledge the situation.

What: Have the courage to discuss the issue with your pair.

Why: Discussing an issue allows you both to work through it. Your pair might not be aware of the issue. Your pair might have been ok with the dynamic. Discussing it allows you both to resolve the problem.

When: Talk about it later when you and your pair are in a good space.

Example: “Earlier today it seemed like you and I were not on the same page. For me, it felt awkward. Is there anything we could have done differently?”

“When you… I make up … And I feel…”

What: In the first blank, you specify the observed behavior. In the second blank, you describe how you interpret the situation; since this is all in your head, you likely are projecting motive onto the other person. In the third blank, you describe how this makes you feel.

Why: This technique initiates the conversation about an observed behavior, but instead of blaming the other person, the technique focuses on how the behavior is affecting you. Talking about yourself, using “I” language, hopefully reduces the chance of putting the other person on the defensive. We are experts of our experiences.

Example: “When you interrupt me before I have made my point, I make up in my head that you don’t care about my point of view, and I feel disrespected.”

See the person’s strengths

What: List out the skills that your partner brings to the relationship.

Why: The pairing relationship is probably not all negative. Try to reframe the problem into an opportunity. How can we leverage each other’s strengths? We each bring so much to the pairing relationship.

Example: I enjoy trying a solution and when it is not working moving onto another solution. One of my pairs loves going deep into solving any technical problem. He enjoys figuring out how everything works. I quickly get frustrated when things do not work. At first, this dynamic caused tension. When something was not working, he wanted to go deep into the bowels of the technology to solve it whereas I wanted to move onto a more promising idea. In time, I learned to see the benefit of combining our strengths. I learned to be more patient, trusting my partner’s strength. We would explore a topic more than I was comfortable. Likewise, I could also serve my partner by suggesting it was time to try a new idea. I could pull the “ripcord” and abort an idea that was no longer promising. We successfully combined his strength of a “deep dive” with my strength of “generalizing for the big picture.” Once I saw how we complimented each other, I began to enjoy this aspect of our pairing dynamic and looked forward to pairing with him.

Example: On one project, I noticed that my pair was not listening to me and literally did all the typing. I felt discouraged and invaluable. (I call this dynamic “Performance Pair Programming” where one person performs coding for the audience of their pair.) One day while remote pairing, I was curious how long he would go on before noticing that I was not involved. I started to solo on my computer working on chores that needed to get done. Several hours past and my pair never noticed that I was disengaged. Later in the day, I mentally rejoined what he was working. As I was feeling guilty about what I had done, I acknowledged to my pair what happened and how I was not proud of my passive-aggressive behavior.

However, things did not get better. I still did not want to pair with him. Because of the large team size, I successfully navigated the pair rotation so that I did not pair with him for a couple of months. To help my attitude, I started praising to the team his contributions. By vocalizing his contributions, I eventually realized that this individual was incredibly smart. 99.5% of what he said was accurate, and he was often 5 steps ahead of everyone else in his thinking. I started paying attention to his perspective. When he disagreed with the team, I would want to know why. I became grateful that he was on our team. I made a special trip to his office to pair with him in person. Because my attitude had shifted so much, I had a fantastic time pairing with him that day and for the remainder of my time on that project.

**Antipattern - Ignore it. **

What: Pretend that it did not happen.

Why: This is a tempting technique because it seems the easiest. Sometimes things can resolve themselves. However, small issues tend to grow into large issues.

Lacking Emotional Intelligence (EQ)

If you are not aware of how your actions affect the mood of emotions of your partner, then I would recommend training. I have paired with some super smart people who were blind to how their actions caused me pain.

While I was pairing with someone with low emotional intelligence, he did all the typing and this made me grumpy. When I realized that my pair was unaffected by my mood, I discovered that I had to do less emotional work. If I was having a bad day, my pair was not bothered.

Amazon sells Enhancing Emotional Intelligence: Mindfulness-Based Strategies for Success & Happiness

Stanford University has a course called Enhancing Emotional Intelligence.

One Pair Teams

Sometimes it is necessary for two people to pair for long periods of time. Perhaps there are only two developers on the team or there are two product designers collaborating together. In these “pair marriages” extra attention to these techniques is helpful.

One software engineer said, “I have found it almost always leads to some tense periods throughout the project and makes everything this article says even more relevant. It is important for the pair going into a single pair project to know what they are getting into. It makes it easier to realize that things will be rough not because of you or your pair, but because being pair-married is inherently rough. However, I have also been rewarded with some great, lasting relationships from single pair projects.”

Summary

By using these strategies, some of my most challenging pairing relationships transformed into my most delightful and treasured relationship. Deep pairing trust forms when I can work through hard conversations successfully. We learned how to utilize our mutual strengths compensate for our individual weaknesses.

If you have had a challenging experience, I would like to hear what it was like for you and how you went about solving it. Email me at professor@gmail.com

You might enjoy the book I’m working on. The book describes how Pivotal leverages pair programming and several other practices so that its teams can survive major disruptions. Brady Bunch View

Surviving Disruption with Sustainable Software Development ™


© 2009-2022. All rights reserved.