What is Pair Coding?
by Makers
Quite simply, pairing is a way of working where two people actively collaborate on a single piece of work. It’s not about 2 people working together on different parts of the same project — it’s literally 2 people working on the same piece of work, often sharing a screen, a keyboard, even a mouse. You don’t have to be spooning when you do it, but, when done properly, it’s a pretty intense experience (read on for why…).
What’s so great about Pair Programming
A lot of people (myself included!) react negatively when they first hear about the pairing. We’re used to the belief that we do our best work when there are no distractions — when your headphones are turned up loud or when you’re at home working late at night. The theory of pairing can’t really be reconciled with this intuition.
But that’s because most people haven’t had the chance to pair well. When done right, pairing can lead to:
Improved code quality: The code is the combined product of 2 heads, rather than 1, and QA is baked into the process.
Significant gains in team communication and collaboration: Unlike coding alone, you’re constantly trying to communicate your ideas, explain your decisions, and defend your solution against other solutions. Communicating about code becomes much easier once you get used to this.
Amazing multipliers in your speed & depth of learning: There is a constant transfer of knowledge between both parties in the pair. No-one can rest on their existing knowledge for long as their pair will be pushing them to explain the nuances in the code, which may also help to uncover knowledge gaps that they may have been unaware of.
Improved focus and motivation: Having another person working with you helps keep your focus on the task at hand and stops the inevitable ‘quick’ look on Facebook!
More fun! Let’s be honest. Learning on your own can be a solitary, depressing, and demotivating experience at times. Having someone there with you, in the trenches, sharing your lows as well as your highs, just makes the whole thing more enjoyable.
Last — but by no means least — being great at pair programming makes you super hireable! Being able to express your opinions, debate alternate solutions, help even senior colleagues shape their thinking & push them to use best practices — all of these are incredibly valuable skills that you can bring to your first dev role that are over and above your ability to write high-quality code.
If it were that good, wouldn’t everyone be doing it?
Yes and no. Firstly, many still question the claim that pairing is more efficient than working solo. It boldly contravenes our deep-seated beliefs on how work gets done. We’re so used to only achieving the ‘flow’ state when working alone that we struggle to see how it can happen when closely collaborating with other people, so we reject the idea of pairing off-hand.
Secondly, many people argue that quiet reflection is an essential part of the creative process (if you’ve got this far, I’m assuming I don’t have to defend why coding is creative!?). People need time to stew on a problem, to research potential solutions, to play with ideas until something starts to emerge from the chaos of the subconscious. When pairing, it’s difficult to allow for this part of the process, and it’s rare for both parts of the pair to be so in synch that they don’t hold each other back at this stage. This is a fair criticism until you simply accept that it’s totally okay for one or both of a pair to request 5…10… even 20 minutes of quiet to do some research and toss an idea around and explore a few potential solutions.
Lastly, it’s natural for an untrained person to fall into certain traps when pairing which will totally ruin the experience. You can look at the relationship between the pair as one between a driver and a navigator. But if the driver is uncommunicative and refuses input from the navigator, it’s likely that the navigator will lose interest and zone out, totally losing all the things that make pairing so valuable. On top of all this, even when pairing is done well, it can be exhausting, requiring extroverts to be self-disciplined and introverts to push themselves out of their comfort zone.
Last updated
Was this helpful?