Pair programming is a software development technique where two engineers work together either remotely (through screen-sharing) or in person (at the same work station).
Engineers pair up, often at random, to implement or investigate a specific code change. One, the driver, writes the code, while the other, the passenger, reviews each line of code as it's typed.
Though most engineers would agree that they enjoy pair programming, it can be easy to lose sight of its true benefits.
In the short term, pairing may not always seem like the most efficient way to accomplish a task, but it's important to remember that pair programming helps keep all team members up to speed. It also fosters good communication, knowledge transfer, and provides a way for remote workers to really stay connected. It even tends to result in fewer defects.
I have been exploring ways to maximize my pairing sessions. Here are some of the best practices that I like to stick to:
It's important to know when to plan your sessions so you can make the most out of them. Every task is different, so use good judgment and meet as often as is necessary. At times, it may be appropriate to work independently for a while before getting together again. In any scenario, plan to meet at least twice – as soon as a task is picked up, and just before it's ready to be deployed.
Alternate drivers as often as possible (without losing momentum). Otherwise, even the most well-intentioned engineers may find themselves dozing off mid-session or losing track of progress. As a rule of thumb, alternate every hour or every session.
If you're the one driving, facilitate cooperation by checking in with your pair from time to time and requesting their input or code review. Ask questions, like "what should we focus on next?", and always be sure that you and your pair are on the same page.
As a passenger, if the direction the driver is taking is not clear, or if something is generally not making sense to you, intervene early and often. It's important to know where you're going.
Sometimes those interventions provide you with clarification, other times they may be needed to put the driver back on the right course. If you feel you need to do something in order to stay focused, taking notes is always helpful.
Before ending your pairing session, always make it a point to recap on what you have accomplished during that session, what you plan to accomplish independently, and what you plan to accomplish in your next pairing session (if you're having one). If you do need a follow-up session, schedule it then and there.
And whatever you do – don't forget to push your changes!
Want to know more about what it's like to work in tech at Simply Business? Read about our approach to tech, then check out our current vacancies.Find out more
We create this content for general information purposes and it should not be taken as advice. Always take professional advice. Read our full disclaimer
6th Floor99 Gresham StreetLondonEC2V 7NG
Sol House29 St Katherine's StreetNorthamptonNN1 2QZ
© Copyright 2021 Simply Business. All Rights Reserved. Simply Business is a trading name of Xbridge Limited which is authorised and regulated by the Financial Conduct Authority (Financial Services Registration No: 313348). Xbridge Limited (No: 3967717) has its registered office at 6th Floor, 99 Gresham Street, London, EC2V 7NG.