Here are the best practices for pair programming

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:

1. Meet at the beginning and meet at the end

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.

2. Alternate drivers

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.

Pair programming

3. Be a good driver

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.

4. Be a good passenger

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.

5. Recap, recap, recap

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!

Ready to start your career at Simply Business?

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.

Regina Ranstrom

This block is configured using JavaScript. A preview is not available in the editor.