(Based on real events, exaggerated plot, please do not compare.)

It’s a sunny Friday afternoon. Ben and Martin are supposed to have a cup of tea at Costa Cafe and talk about their plans for the weekend. However, a wechat message from PM disturb everything. It turns out that there is a bug in the product that needs urgent repair and must be fixed before leaving work. Two people received the message quickly walked back to the post, also did not have the mood to drink just bubble good coffee, quickly open the mailbox to view the problem report.

start

Ben: It seems that this is either a big problem or handling an exception from a remote service. The current situation is that BFF(Backend for Frontends) has anomalies in its internal remote services, and the anomalies are directly returned to the client, so that if one policy fails, all front-end policies become unusable.

Martin: So how?

Ben: It feels like we can add an exception handler where the exception is. This involves RxJava and Java8 stream features, I am not familiar with, let’s Pair together

Martin: good.

The two sipped their sizzling coffee, set up their keyboards and mice, and turned on project IntelliJ. A few minutes later, the glitch recur.

Martin: Failures that can be reproduced are usually easier to fix. Let’s do a try here… Catch a try. The duo seemed confident, but after restarting the project, the glitches did not stop as expected.

Ben: HMM, why can’t we stop here?

Martin: Maybe it was RxJava’s delayed processing that didn’t catch it properly. So, you write another logic here, and set a breakpoint here…

anxious

All Martin did was point at the screen, check his phone and chat on wechat. Ben was not familiar with RxJava, and he wanted to follow Martin’s lead, but after adding more logic, he still couldn’t solve the problem. Ben: Fifteen minutes have passed. Now I’m wondering if I’ve got something wrong.

Ben: Let’s get our heads together.

Martin: Well, come on, let’s look at the code.

Martin took Ben through the code and kept him on hand to step through it. Breakpoints are difficult to set due to the delayed nature of RxJava. And the call stack that throws the exception appears in some unexplained place, which makes it impossible for them to know how to put the try… Where the catch works.

Ben: Maybe so, so let’s put an OnError here and see if that works.

It looks like the problem can be solved, but it is another failure. In the heated discussion between the two people, time passed quickly. After an hour, the coffee was already cold. However, the two people were completely in no mood and even forgot the existence of coffee.

Ben grew less and less confident in Martin’s solution, and the two began to discuss the solution again. However, the more complicated the discussion, it seems impossible to solve the problem before the end of the day, all night is inevitable.

To simplify the

Zen is the Tech Lead in the group and is busy with another thing today. This Friday is really not quiet, I can’t wait to spend yesterday in America.

Zen listened to the discussion and, without knowing the details of the problem, had a hunch that it was off the rails. Quick reminder to Ben and Martin:

It’s not a hard question, I think you’re getting too complicated, right? Is it going sideways? Can you tell me what you think?

Martin, interrupted by Zen, talks about the previous solution and explains that he has tried other solutions, but none of them work. Since Zen doesn’t know much about this either, it’s just a warning:

“Keep it simple. Don’t make things complicated.”

As the discussion continued, Ben struggled to keep up with Martin’s ideas and struggled to write the code, but every time he got it wrong. The atmosphere of the Pair is as frozen as coffee in winter, and I don’t know what is right or wrong. Ben is already upset, and Martin is still pointing but not doing anything.

Zen looks at her watch and says, “It’s three o ‘clock.

Martin, since you’re more familiar with this, you can do it. You write the code.

Perhaps because of the heated discussion, Martin retorts Zen:

We are in Pair, he is not familiar with RxJava, I should mentor him. I’ll just watch him write.

Zen says,

What’s your solution? Show me.

After explaining this, Zen doesn’t have any more ideas, so let them move on. But Zen suggests:

At this critical juncture, we should change the way of Pair. It’s not about teaching, it’s about solving problems efficiently. In this kind of stressful situation, you can just go ahead and fly with someone else.

differences

Martin calmed down a bit, grabbed the keyboard, and proceeded to fix the problem. At this time, Ben was observing and taking a proper rest. The frantic pressing of F8 and F9 calmed down.

Ben: I don’t think so. Let’s go over the code again.

Martin: I’ve tried all these things before and they don’t work. This is the way it works.

Ben: I’m talking about doing this, but since we haven’t discussed it clearly, let’s look at the code again.

Ben and Martin took out a pen and paper and drew and discussed on the screen. However, Ben didn’t agree with Martin’s plan and said he would adopt another plan. Martin insisted that it was a viable solution and had to be tried. Ben took the keyboard and started to code according to Martin’s plan, but he was very upset. He was trying to convince Martin to try his plan.

anger

By this time, two hours had passed without notice, and the problem seemed to be getting closer and closer to the truth. The weariness of both men, coupled with conflicting solutions, began to show some anger in their words.

Zen interrupts in between running the tests to suggest:

Now that we have a disagreement, why don’t you split up, implement one, see who can do it first, and then discuss.

Martin disagrees with Zen, who accuses him and Ben of not being as good as a Pair.

Zen explains:

In fact, I heard the disagreement between the two of them, and there was some anger in the words. In this way, the efficiency of the Pair is very low. First, people come to work in a bad mood, questioning each other. More importantly, it has taken more than two hours to solve the problem. We are all tired and can take a proper rest. The whole point of separating you is to calm down, work alone for a while, it might make a difference.

calm

Martin went back to the computer and followed his thought step by step. Ben went to the bathroom, dumped his cold coffee and made a hot cup of tea. Go back to the computer and focus on following his thought step by step.

In fact, two people have been close to the truth, but this incessant dialogue between the attention consumed. The two attempt to reach a unity, but verbal dialogue does not solve the problem, but rather delays the process.

Ten minutes later, Ben said that he had come up with a working solution and asked Martin to come and have a look. Ben’s temporary solution is simple and understandable, but not perfect. Martin, who is familiar with RxJava, pointed out some areas where improvements could be made.

Then two people began a new round of Pair, to perfect this plan. With this basic solution, both are happy and are taking big steps in the right direction.

The end of the

At 6:30pm, the whole solution worked and the delivery task was successfully completed, although it was more than half an hour later than normal.

Ben and Martin both concluded that we should stop pairing when:

  • When two people are not on the same page but can’t convince each other: Consider taking a break, having some quiet time, and each proving the idea with working code. All you need here is relatively crude code.
  • Time has exceeded the tomato time and feel tired: people’s concentration is limited, very tired in Pair, especially when there is a big gap in ability. Try the Pomodoro technique to give your brain a rest.
  • When you are distracted or have other things to do: Respect each other while pairing. Do not play with your phone or read other irrelevant web pages. Unless you have the consent of the other person in advance, you should stop pairing and finish the transaction before continuing.

For more insights, please follow our wechat official account: Sitvolk

WeChat
Sina Weibo
Evernote
Pocket
Instapaper
Email
LinkedIn
Pinterest