Sometimes your pair is uninterested in the task at hand. It's never fun for either person when working with an Uninterested Pair.
There are several reasons that a pair can be uninterested, but that isn't going to be the focus of this entry. Addressing why a pair is uninterested is a people question that I'm not interested in addressing in a general way.
A benefit of pair programming is getting the best solution when two developers collaborate. Clearly, an uninterested developer is not collaborating, thus the solution is likely inferior. At a minimum, the solution is as good as it would have been and 1 person's time was completely wasted.
The problem with uninterested pairs is that they can spend an entire day paying little attention and contributing almost nothing. If you find yourself stuck with an uninterested pair there are a few things that can help. Dealing with an uninterested pair is very similar to dealing with a Distracted Pair. Ping Pong Pair programming helps turn an uninterested pair into a contributing pair; however, often their level of contribution isn't up to their full potential. I've found that when dealing with an uninterested pair it's actually more beneficial to feign confusion.
Feigning confusion can be boring, really boring. You generally have a grasp on what needs to be done. You also generally have the solution in your head. You can implement this solution on your own and bring the uninterested pair along for the ride; unfortunately, in my experience that's exactly what happens. But, simply taking the uninterested pair along for the ride isn't the best long term solution. That pair may someday be asked to improve the existing solution. If they can't, because they weren't paying attention, you may be taken away from your task. Worse, you may be off the team and the context of the code is permanently lost.
So, feigning confusion is boring, but it is also in the best interest of the team. Instead of implementing the solution, ask your pair: How we are going to get this done? Don't accept their first answer. Their first answer is likely going to be fast, but incredibly ugly. Provide your own input, but don't let on that you have a solution. Instead, stick to asking questions. Chances are, you are going to understand their solution. It doesn't matter if you understand their solution, pretend that you don't. Force the uninterested pair to write the first 3 tests and implement the code that causes the tests to pass. At that point, take over and write a test, but force them to implement the solution. Then slowly proceed into Ping Pong Pair programming, but don't jump straight into it. Instead, force the uninterested pair to do about 65% of the coding. It shouldn't take long for the uninterested pair to be a fully contributing pair, which benefits everyone.
Why not ask the person why they're uninterested? "Feigning confusion" seems like it would be tiring for the feigner and annoying to the other person. And once people on your team know you're doing that, you're going to be seen as Machiavellian.
ReplyDeleteI don't practice pair programming, but in my experience direct, honest communication always works best.
Plus 1 to the recent pairing posts.
ReplyDeletePing pong and feigning confusion are good techniques. I believe they work because they encourage the pair to take intellectual ownership/responsibility for the code.
Another technique is to start talking about rolling yourself off the story leaving the uninterested pair to work with someone else. This ties into the "Student to Teacher" mentoring approach as discussed by The Kua. You probably don't have to roll off but the understanding that they may need to teach another dev about the story often makes someone take more interest.
But why does the pair not feel they have intellectual ownership in the first place? Time to look closer to home?
I'm looking forward to your post on "Hungover Pair"
ReplyDeleteAt times, this happens when you and your pair aren't in agreement on the way to progress. Both can be driven by hunch. Unless they are mature enough to try out both ideas one after the other, the experience doesn't turn out to be good.
ReplyDelete