🎓 Why you should be pair programming more often.
Technical, soft skills, and career growth benefits are abundant when you pair effectively. Do it more!
Pair programming is an incredibly effective way to solve problems, improve productivity, and foster relationships and influence.
Do it more often!
Wow, that was an easy newsletter this week!
…Okay FINE, I suppose I can go into slightly more detail. 🙄
What is pair programming?
Pair programming is a collaborative coding technique where two software engineers work together at one workstation to develop software more effectively.
In modern remote environments, the shared workstation is replaced with screen sharing and real-time editor collaboration features, while the principles and techniques remain the same.
The most common method (one of many in use today), two engineers take on different roles: driver and navigator. The Driver writes the code, focusing on the immediate programming task. The Navigator looks at the big picture, thinks ahead, suggests improvements and alternative solutions, and reviews code as it’s written.
Importantly, the devs should regularly switch roles during a pair programming session. This encourages collaboration, mindset and perspective shifts, and learning.
Benefits
Technical Benefits
“Two minds are better than one” – combined wisdom and skills results in better technical solutions
Work gets done faster – two people are less likely to get blocked, and when it happens action is taken sooner and more effectively
Code reviews happen in real time, allowing code to be approved and integrated more quickly (which is HUGE for team velocity – more on those metrics in a future edition)
Soft Skill Benefits
Practicing collaboration results in greater empathy and bonding
Improved communication and listening skills
Career Growth Benefits
You learn more in a hands-on, practical way
Your work and collaboration is made more visible, and more likely to be recognized
You provide leadership and mentoring, even if you are the more junior engineer – everyone brings their unique perspective to the table, even if you only ask questions
All the stuff needed for Senior! ✨
Success Stories
Amit Masaun, VP of Engineering @ Deep 6 AI:
After decades of leading engineering teams, I've found no better approach than collaborative coding. Pair up ( or mob up ) and you'll write cleaner, more robust software while spreading that hard-won knowledge across the team. And when everyone's in the loop through that open dialogue, you move as one unified force towards your technical vision.
CJ Odina, Software Engineer and BASE subscriber:
I had the opportunity to engage in a series of pairing/mentoring sessions with a senior engineer at my job which, among other things, helped me better understand design and architecture patterns. As a result, I was able to build better, more resilient software as well as confidence in my skills.
And personally, my success stories are not one big moment but a lot of little ones like CJ’s. Pair programming was incredibly helpful when resolving a production outage, hunting an elusive bug, introducing new patterns or paradigms, or creating a consensus between two opposing ideas.
Any opportunity I can take to both solve a technical problem and grow my bonds with coworkers I will embrace and encourage.
Downsides & Gotchas
Pair programming has a ton of benefits when done well, but it is possible to pair in an ineffective way. If you’ve had a bad experience with pair programming, chances are you were burned by bad implementation.
First, it takes practice. You need a mindset of collaboration, focus, and knowing when to stop. Unequal or selfish participation, unbalanced roles, and a general unwillingness to collaborate are going to make pair sessions less valuable.
If there is a large skill gap between participants, a pairing session could be more training than collaborative problem solving. This can be slower than working individually. Incredibly valuable when onboarding and mentoring, less valuable when tackling a hard problem in a time crunch.
Similarly, pair programming is not always a time saver. If two devs are each assigned a task, pairing on both tasks fully may not deliver the tasks quicker. Focus your pair programming time on only the parts that are most effective – hard problems, questions, blockers, etc. Once you have a clear path, individual contribution is likely more effective.
How To Pair Effectively
Use pair time for items of substance: problems, decisions, mentoring. Once there’s a clear plan and only implementation steps left, revert back to individual contributions.
Switch roles regularly while pairing
Keep an open mind, avoid micro-managing, and allow your teammate’s style to influence your own rather than be incompatible
Talk often. Explain your thinking, ask questions.
Practice! Sometimes you will pair better with one person than another. Don’t let any frustrating experiences stop you from finding efficiency and enjoyment elsewhere.
On Pair Programming on MartinFowler.com goes into greater detail on different methodologies, tools, implementations, and gotchas. I highly encourage further reading if you want to pair program more often.
Do you have any success or horror stories with pair programming? How has it helped you? Hit reply, I’d love to hear about it!
Up Next
🎓 Why Seniors embrace bug bashing and site reliability duties.
Thank you as always!
Aken 💙