VMware sponsored this post.
In nearly every industry we look for ways to solve problems faster and deliver solutions quicker; and software development is no different. One technique quickly becoming mainstream is pair programming: two programmers work on the same problem, at the same time, on the same computer, with the goal of producing amazing software quickly. It has the potential to deliver significant benefits from a technical standpoint by increasing overall agility and software quality, while simultaneously solving for critical cultural differences at the developer level.
Pair programming is certainly not a new concept. I’ve been practicing this approach for nearly 20 years. But when it comes to software development, a common misperception is that if more than one person is working on a problem, the outcome must be twice as expensive and take twice as long.
The opposite is actually true. In the pair programming paradigm, two brains are better than one — especially when “done” means delivering high-quality software to customers. Pairing results in continuous code reviews and troubleshooting; plus it often results in software that is more flexible and can be adapted for various use cases. Pair programming also encourages a deep sense of collaboration and has been one of the best ways to promote team-based ownership of code. I’ve seen developers become better teammates by remaining deeply connected throughout the process, and many have learned new tools and acquired tangible skills they can use in the future.
The most common implementation 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.
And while pair programming can be an effective extension of your DevOps strategy under normal working conditions, it has an even larger role to play in our current climate. Most software development teams are now distributed and working from home. A recent Forrester report cited research that revealed remote developer teams are more likely to deliver poorer software quality, which highlights the need for more effective code review tools and procedures.
Thankfully, collaboration software like Zoom is making it possible for developers to experiment with the tenets of pair programming via high-quality audio, video, and seamless remote control screen-sharing capabilities. Sure, this might seem too simple an answer, but pairing is pairing — whether it’s done in person or involves remote interactions.
With that in mind, here are four key principles of pair programming along with how to apply those principles while remote pair programming, to help developers remain connected and cohesive while working from home:
1. Practicing Continuous Software Design
All software developers should spend time intentionally thinking about the design of their software. With pair programming, you and your pair are constantly bouncing ideas off one another, adjusting the software design directions to take. I often call this a continuous negotiation, but instead of “falling to the lowest common denominator” you “rise to the best solution,” an accumulation of the best ideas harvested from your combined experiences.
How to do it remotely: In an office setting, we’d likely be whipping out dry-erase markers and filling whiteboards with software designs. This can be easily replicated at home with one of the many online collaboration services (Miro, Whimsical, Jamboard, Diagrams.net) that support boxes and arrows and virtual sticky notes. As a bonus, the entire team can contribute at the same time using these apps.
Programmers often talk about being in the zone, a mental state where the problems fall before you one by one as you knock out solutions in quick succession. A fatal flaw inherent to the “zone,” however, is a natural tendency towards siloed thinking — developers may emerge days later and realize their solution absolutely will not work. Pair programming requires constant discussion and vocalization of ideas and actions to prevent this frustrating scenario.
How to do it remotely: With remote pairing, we need every bit of “high-fidelity” communication we can get, as we lose a lot of subtle visual and audio cues when our collaboration is confined to a small video image. Turn your video on, and invest in a high-quality headset with a microphone, or quality external microphone and speaker, for your remote collaborations. Not only are you vocalizing your intentions, but you’re also demonstrating them visually much more that you might realize, even via a video screen.
3. Programming by Not Programming
Our brains have extreme difficulty performing high-level strategizing 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. Don’t forget to switch roles! How often? As often as is needed, usually multiple times per hour. You’ll likely feel the ebb-and-flow of your energy levels.
How to do it remotely: Use software that allows both people to take control of the screen to code and use other shared tools. We want to enable seamless driver-navigator switching with remote pairing, just as two keyboards plugged into one computer supports seamless switching during in-person pairing. Clunky “request control” or “give control” handoffs add friction to the pairing flow and discourage a balanced driver-navigator dynamic.
4. Learning from and Teaching Others
A common complaint among programmers is that their skills are stagnating, that they’re not learning new technologies or techniques on the job. The best way to learn new hands-on skills is to work closely with a peer or someone more experienced than yourself. Pair programming presents an ideal scenario for knowledge sharing. Intentionally listen for when your pair says things such as “How did you do that?” and “I’ve never seen that before” and “That’s really cool!” Those are all indications that you know something important and your pair is likely inviting you to explain more.
How to do it remotely: To learn from others, do what you can to avoid distractions. Close or minimize other app windows, find a dedicated workspace if you can, and take breaks often, to keep both parties energized. When it comes to teaching others, don’t steamroll your pair. Be sure to check their engagement level and encourage them to turn on their video if they have not. Remember to vocalize everything in detail, such as, “We’re about to use the same pattern we see here on line 157,” rather than, “It’s like that thing we did over there that one time.”
As communities around the world continue to adapt to the changes brought on by COVID-19, it’s increasingly apparent that remote working, if not a permanent state for many of us, will certainly become part of the “new normal.” Many of the general principles outlined above will help improve the quality of software that’s developed by a distributed team — and now is an ideal time to begin testing the implementation of these tenets.
In a strange twist of fate, social distancing measures have afforded us the opportunity to become closer and more productive than ever. With remote pairing, your experience of working from home might be more collaborative, more productive, and more gratifying than your co-located programming experience, and help you all produce software you’re prouder of than ever before.
Feature image via Pixabay.