How to Use Negotiation for Healthy Pair Programming & Better Solutions

When pair programming on a task, there are always a ton of problems thrown at you. They can be as large as developing a database schema, to as small as naming a variable. When you’re solving these problems with another person, you’re bound to have disagreements.

You shouldn’t avoid these disagreements. In fact, you should welcome them. That’s because dissenting opinions and ideas can bring about the best solutions. But, how can we effectively disagree while keeping a healthy relationship with each other? If we treat each problem we come across like a negotiation, we can use a step-by-step process to turn these disagreements into solutions.

Use Negotiation for Healthy Pair Programming & Better Solutions

Separate yourself from your ideas.

When two people have different ideas on how to solve one problem, it’s easy to turn one idea into your own personal position. That can lead to waging a battle with the other on which idea would make the “right” solution. This position-based approach can be dangerous to our egos. When we stake a claim on our ideas and hold a position on a solution, we tend to associate our identity with the idea. This can lead to destructive outcomes, such as feeling let down when our idea isn’t used. Also, a new interest in “saving face” comes into play. In other words, we can fear that the outcome of solving the current problem will affect future decisions we are a part of.

We can avoid this by treating each idea you generate for a solution as a product of the pair, rather than as an extension of yourself. By doing this, we effectively separate our identities from our ideas and bypass any destructive outcomes. Furthermore, the ideas become more malleable, so you can form them together into a better solution.

Leave binary thinking to the computer.

Another reason positional negotiation is unfavorable is that it may prevent you from reaching the best solution. When we hold a position on an idea, we start to think in 1’s and 0’s. We become attached to our idea and our idea only and fail to consider any alternatives. More often than not, the best solution is actually a combination of both ideas or of many different ones. Remember that you and your pair have a common interest in solving the problem. State your objective: clearly identify the problem if it hasn’t been explicitly stated. Focus on your common interest of solving that problem. Then invent options to meet its needs as a pair, rather than sticking to one personal position.

Brainstorm, brainstorm, brainstorm.

When trying to form a solution to a problem, it’s important to generate as many ideas as possible. Then, you can cut and slice them away to come to one solution. If you’re struggling to come up with the best variable name to use, for example, one thing to try is to rattle off a bunch of potential names to one another. More often than not, the best name becomes clear once you say it. Or, it may be even a combination of multiple names. Even if a generated idea would be a grossly inaccurate solution, at least the pair can agree that it’s not suitable. That, in itself, becomes the criteria for selecting a better solution.

Rely on objective criteria.

When you and your pair have filled up a pool of ideas, it’s time to dive in and figure something out. It’s best to rely on objective criteria to decide which solution is best. These criteria can come in the form of documentation, blog posts from reliable sources, books, or even input from another team member. It’s important to stay objective so that each person stays separated from the problem, while both can still craft the ideal solution. Only when both agree on a solution should you move forward with it. And, if you hold any reservations, it’s important to speak up before moving on, or expect to bear the weight of your dissatisfaction. If either person needs further convincing, search for more objective criteria.

Use Negotiation for Healthy Pair Programming & Better Solutions

Solving conflicts for mutual benefit is something we are bound to experience while pairing. Use these negotiation tactics to make your conflict resolution more efficient, find better solutions, and keep the relationship with your pair and your team healthy and strong.

For further reading on negotiation tips and strategies, check out Getting to Yes – Negotiating Agreement Without Giving In.