Pair Programming is an Investment

28 Jul 2016

You might be thinking that pair programming takes time that could be put to much better use by just coding individually. After all, how could it be more productive to have two engineers working on one problem, when there is still the bottleneck of only one person actually doing the coding? Well you’re right - it isn’t more productive in the immediate sense. The real benefit of pairing with a senior engineer, as a junior engineer, is what you learn and take away from that time.

Time with Senior Engineers

Many of the greatest benefits of this exercise come as a function of just increasing the amount of time spent with a more experienced engineer. For example, it opens up potential for a closer relationship with your manager or mentor, which can lead to opportunities for deeper mentorship. It will also let your manager know how you approach various problems which can help them better guide your technical development. You may often end up talking about personal passions and motivations, especially during longer sessions, which again will help your manager drive your personal and career development as well.

Software Design Learnings

Beyond personal development, pair programming will also provide you with technical learning. While tackling any challenging software problem, you can go in many different directions with a specific implementation. Thinking through such design decisions with a senior engineer is a powerful learning experience. My manager handles it by first asking me to come up with a variety of alternatives and then weigh them against each other and explain why I think a certain option is best. He helps me through the whole process, and then explains what he would do and why he would do it. Often, this involves deciding between an Object-Oriented vs functional approach, or understanding how we can maintain separation of concerns. Moreover, we think about how other teams across the company may benefit from the code we’re writing and try and make our code general enough for them to use.

Document Your Learnings After Each Session

The main focus of pairing is learning as much as possible, so it’s important to note down what you’ve taken away from each session and what drove the decisions you made (and maybe even write a blog post about it!). Here are some questions to think about while you document your session:

Practice What You Learned

After learning all these lessons from pairing, it is important to put them to use in the code you write. Think deeply about design decisions before jumping in. Be proactive about asking for feedback from your manager during code reviews, and try and make sure that these code reviews are happening frequently, so that you can continuously improve your skills as a software engineer.