Millions of people around the world have been forced to work remotely due to the COVID-19 pandemic, and while working from home is arguably better than working at the office with flexible working hours, no daily commute and optional showering, many challenges lie beneath the convenience.
Remote working offers a huge range of challenges, from distraction and constant project switching, to a lack of supervision and oversight, and most significantly blurred lines between your personal and professional life. For those working in Agile software development, a technique called Pair Programming, which can help overcome some of the challenges of working from home.
What is Pair Programming?
Imagine that two people in a car heading to a place they have never been before, working together as a driver and a navigator. On their way to the destination, they switch roles frequently, with one taking over the driving for a period and the other moving to navigate, allowing for rest and breaks and switching up the tasks required. This is how Pair Programming works. It’s a widely-used programming technique that was adapted out of Extreme Programming, where two developers work together on the same coding tasks, and most importantly, sharing the same computer screen during pairing. The driver is the person who works on the implementation, while the navigator is the person who is focussed on the direction and ensuring the implementation meets the requirements. Within this method, there is an expectation that the programmers will swap roles frequently, allowing both to take time in the role of navigator and driver.
Why Pair Programming?
A common cause of remote working issues is failing in collaboration and deep thinking. Deep thinking is one of the core skills and requirements for programmers as they continuously debug and unravel complex problems discovered in the coding process. Distraction is the biggest barrier of deep thinking, as it crowds the minds with inferior thoughts. Failing on deep thinking while encountering complex issues will result in downtime where most people will reach their phone and get addicted to distraction, leading to inefficiency and costly time-wasting. As two is better than one, according to Taylor Swift, having a coding partner and supervising each other will allow programmers to succeed in deep thinking, removing distractions and committing together to finishing the task, allowing the programmers to delve into the root of the problem more effectively. By default, the code and outcome will be of a better quality, but other more intangible benefits are improved, like greater communication, enhanced problem-solving abilities, and shared business knowledge and technical skills across the team.
Generally, Pair Programming is used alongside TDD (Test Driven Development), with the navigator expected to code the test scenario before the driver creates the implementation. Ensuring that fail tests are completed before the implementation is coded is mandatory to confirm the coded implementation is meaningful and has the desired impact on the business process. After the implementation is coded, it should pass all tests with flying colours.
Finding Coding Partner
It is extremely important to find the right Pair Programming partner to ensure success with this method. Most importantly, you must look for commitment to the method in your partner, but it’s also key to look for someone who has great collaboration skills and the specific code writing and testing skills for the role. By pairing with someone with more experience or who is more highly skilled than you, it will allow you to learn a lot and upskill quickly. However, by working with a programmer at an equal level or who has less experience than you will teach you greater collaboration and training skills. There are benefits to all partnerships, provided everyone comes to the table wanting to collaborate and work hard.
Quick tips for Best Pair Programming Practices
- Being passive throughout a paired session will not result in a positive experience for the programmers or the business. Both programmers must be actively engaging with the task and communicate openly. Otherwise, the pairing will result in “double costs”, with each partner in the pair completing the same task. By being present and committed, everyone benefits in this method.
- Both programmers are expected to think out loud during the Pair Programming process. Encourage partners to be more vocal and provide a running commentary on the tasks they’re working on, rather than being silent. Speak up!
- Finding the right partner is key. Developing a strong relationship with your Pair Programming partner will ensure greater outcomes from the method. If the partnership isn’t right, look for a more appropriate match.
Remote Pair Programming
Now is a great time in history for collaborative technologies, with many players in the market allowing Pair Programming to occur even in remote working situations. So long as both parties are working with a tool that allows communication and screen sharing, your partner can be located anywhere in the world.
Some of our favourite Pair Programming tools include:
- Motepair by Atom
- Teletype for Atom
- Microsoft Visual Studio Live
- USE Together
To Pair or Not to Pair
Being in a constant pairing with your partner during development can be draining. Most people also need some time on their own throughout the day to work on other projects or other parts of the project. Allocate a few hours of self-learning time for research into problem-solving as different issues crop up. By allocating specific time to pairing and to time apart, you reduce the risk of a partnership becoming contentious or simply burning out.
Pair Programming helps developers to gain focus and can have significant positive impacts on product quality and teamwork across a project. However, implementing it has some challenges, such as finding the right partners and coordinating and managing time. While Pair Programming is a technique that takes time to learn and perfect in your team, the benefits can be significant both for the professional development of your programmers and for your business. Find the right implementation methodologies and watch those pairs create magic in your code.
Hafieludin Yusuf Rizana – Programmer