If pair programming isn’t the default way a development team works, developers can lose loads of time and effort by forgetting how to most effectively collaborate. As we constantly look to best support each other and those we work with, we think these are the most effective working patterns and behaviours to establish before, during and after a pairing session.
Before you start typing
Over-communicate just a little to ensure you can start working without unnecessary confusion.
Agree on scope
When will you be done? Unless you’re both clear about when you’re finished, you won’t able to work at a sustainable pace. Are you time-boxing your session until lunch? Is there a feature you’d like to complete? Or a particularly stubborn bug that needs two heads?
Agree physical/virtual location
Everyone needs to be comfortable. If you’re cramming into a single small cluttered desk in the corner, move to somewhere bigger. Consider framing it this way, “Will we both be comfortable here?” You need to consider your pair, not just yourself.
Agree on the working environment
Each person needs access to help drive or navigate. If you’ll both drive from your own machines, can the navigator follow what you’re doing? If one machine, do you have two keyboards? What text editor are you going to use?
Agree Pairing Style
This is a kicker. Are you going to strictly switch after 20 minutes? Ping pong? Have. Clear. Expectations.
During the session
The hard bit isn’t the code, it’s supporting your pair.
Keep the chat going
It’s important to vocalize your thinking process. Your pair will benefit from hearing your thoughts and feel encouraged to express their own thoughts.
Follow the pairing style you agreed to and keep the switching going to keep your energy up - it’s very easy to get lazy and stick to one role because you’re making progress.
Keep both involved
If you seem to be doing most of the talking, ask questions. “Could we do this another way?” “How was that?” Try to regularly reflect on what you’re doing and get feedback from your pair. Even if it’s just to check with each other that you’re both working perfectly.
Have a break, have a… We’re not the machines, we just work with them. Sustainable work requires sustainable breaks. Take five every couple of switches to stretch your legs, grab a snack or even (SHOCK HORROR) play on your phone. Whatever works to temporarily take your mind off the work.
Keep checking in
Some work may be easier to accomplish separately. For example, If you find you’re both staring at Stack Overflow, ask the question “Could we search for this separately?”.
After the session
If you’re not getting feedback, you’re limiting your growth as a developer.
Ask for Feedback
What did we do well? What could we have done better? It’ll feel weird at first, do it anyway