By Joseph Moore and Derek Lee Boire– Principal Software Engineers, VMware Tanzu
Some of the greatest achievements in history were produced by pairs of great minds working side by side on the same task. Software is no exception.
In an era of extreme programming, where communication is fundamental to developers working collectively towards the success of a project, the symbiotic nature of software development has never been more apparent. With the ongoing pandemic catalysing a shift toward flexible and remote working, many software development teams are now distributed and working from home office environments instead. So, how does pair programming work under such circumstances?
Remote pairing enables teams to remain deeply connected, while allowing them to work with new tools and acquire tangible skills they can put to good use in the future. As people adhere to mandatory quarantine orders, teams need to carefully consider how to stay cohesive and connected.
Here are five key principles to bear in mind:
- Practice continuous software design
All software developers should spend time intentionally thinking about the design of their software. They should ask themselves; which architectures make sense for the problem at hand? Do common design patterns apply? Are there existing libraries and frameworks that help solve this problem?
With pair programming, a team are constantly bouncing ideas off one another, adjusting the software design directions to take. Pair programmers go through a continuous negotiation, but instead of “falling to the lowest common denominator” they “rise to the best solution,” an accumulation of the best ideas harvested from combined experiences. If pairs rotate on a regular basis, this continuous software design continues to evolve as the sum total of the team’s experience is put to task on the problem at hand.
- Vocalise intentions
Programmers often talk about being ‘in the zone’, a mental state where code just seems to pour out, and where problems fall before them one by one with the accompanying solutions knocked out in quick succession. But have you ever emerged from hours (or even days) of being in the zone, gathered a team together to tell them what you’ve been doing, and realised as soon as you say the first few words that the solution is actually flawed? This is the trap of being in the zone – having mental blinders on.
So how does pair programming help with this? A team has to talk about what they are doing as they’re doing it. The process of problem-solving is different when verbalised versus done in isolation. Exercising those “external” verbal as well as “introspective” mental pathways helps people see the flaws in solutions and invites the pair in the team to contribute.
Turning audio and video on too helps. Taking collaboration to the next level can be challenging in person, and even more so remotely. High-quality audio and video are almost always a must to ensure intentions are clear and logic is robust.
- Programme by not programming
Pair programming is two programmers solving the same software problem at the same time, on the same computer. But what happens when they plug two keyboards into the same computer and start coding at the same time? Chaos. Computers don’t work that way. Luckily, that’s the point of pairing.
While there are many pair programming styles, one of the most common is the driver/navigator style. At any given moment, one person is primarily coding and thinking about the next logic statement (the driver) while the other (the navigator) is looking back at what was just done, suggesting the next course of action, and strategically thinking further ahead. Our brains have extreme difficulty performing high-level strategising and detailed execution at the same time, which is why two brains are better than one in complex problem-solving situations. Pairing addresses this conundrum by having one person for each role.
When working remotely, use software that allows both people to take control of the screen to code and use other shared tools. Enable seamless driver-navigator switching with remote pairing, just as two keyboards plugged into one computer supports seamless switching during in-person pairing.
- Learn from others
A common complaint among programmers is that their skills are stagnating, that they’re not learning new technologies or techniques at work.
The best way to learn new hands-on skills is to work closely with a peer or someone more experienced. For programmers, pair programming is unmatched as a method of upskilling, usually for both parties.
- Teach others
Be generous with knowledge and help the pair along the steep developer learning curve. Since we often look for those moments to learn more ourselves, ask a partner if in those instances they’d like you to teach them more in turn.
While remote pairing, inquire often and intentionally about how the other person is doing and whether they have questions, especially if there is a senior/junior dynamic, such as the onboarding of a new team member. Be sure to check their engagement level and encourage them to turn on their video if they haven’t.
Central to remote pairing is the idea of communicating effectively, whilst remaining true to the programming values. This allows for seamless integration, in real time. As pairs move from the ‘I do’ part of coding, where they lead by example through to the ‘ you do’ phase, where the customer is ready to own the project and take it forward completely on their own, following these five principles can enable everyone to embody pair programming at its finest.