To pair or not to pair? That is the question…
By Software Developer – Alex Connor
Pairing seems to be a topic that really sparks discussions as to whether we should or shouldn’t be doing it and it’s something I internally struggle with in terms of weighing up the benefits and drawbacks, so over the past couple of weeks I’ve been spending some time researching the various studies and opinion pieces on the topic to help me make my own decision.
What is pairing?
Pair programming is an agile software development technique in which two programmers work together at one workstation. One, the driver, writes code while the other, the observer or navigator, reviews each line of code as it is typed in. The two programmers switch roles frequently. Ideally the setup will be one computer, two monitors, two keyboard and two mice although it can be done on a single system through rotation.
Why wouldn’t you pair?
I wanted to focus on some of the complaints that people have around pairing in the hope of being able to dispel most, if not all of them by looking at the benefits that come with them.
- Time Cost
- There is always a cost in terms of developer time when it comes to pairing. From the studies I’ve seen it can be as high as 60% which is quite alarming and would probably put a lot of people off pairing. However, that initial 60% figure is generally what you’d be looking at when first introducing pairing; the study showed that over time, once developers were used to pairing all the time, this cost dropped as low as 15%! Obviously in a perfect world we would see this drop to a negative percentage, but velocity isn’t the main goal of pairing and the other benefits it provides make this 15% negligible. One more thing to consider is the fact that Code/Peer review is being completed as the work is being done which saves time for the whole team having to review it after it’s been done; especially if changes are then required.
- A common theme amongst developers is confidence when pairing with someone who they perceive as “more intelligent”. This is more of a general confidence issue that humans suffer from throughout life rather than being specifically related to pairing; when we first do something, we’re not going to be very confident. Over time however we build our knowledge and confidence hand in hand and this allows us to be able to share this knowledge with others. There is no easy or quick fix for this other than getting stuck in; you’ll probably find out you know a lot more than you think!
Why should you pair?
- Shared Knowledge
- This is an easy benefit to outline; if you pair with people your chances of picking up new techniques or tricks to complete tasks increases massively with each different “pairer”. When you work through problems and implement solutions you get the benefit and confidence of knowing your pair partner either agrees the solution is the best way or they can have their own input, perhaps using a different technology or methodology to complete it. Now you’ve gained that knowledge and can use it either for future projects yourself, or by showing it to somebody else through pairing!
- Now this one can be massively mood or even personality dependant but in general humans are happier when they’re working together on something. I know from personal experience trying to problem solve on your own for hours at a time can be quite depressing, especially when you never really find a suitable solution to the problem. When pair programmers come up against a problem they can bounce proposed solutions off each other and make sure that any benefits/drawbacks of each proposal are understood – a problem shared is a problem halved.
- Less Distractions
- Another easy benefit to outline; get a text? Your best mate posted something on their Instagram story? Fancy checking if your favourite team have signed anyone? (If you’re a united fan like me forget about that last one..). Good news, none of this will matter to you when you’re pairing! These little distractions can and will be easily ignored while pairing as you wouldn’t want to be wasting your partners time.
Although there are initial drawbacks and there’s always going to be that first day apprehension; I think pairing can be a huge benefit to any dev team. There are times where it’s going to be a bit more difficult such as when you look at pairing with someone of a much higher or much lower skill level than your own but this should be seen as an opportunity to succeed either through learning or teaching rather than an opportunity to fail.