Paul Dowman

/

Posts

PUBLISHED ON MAY 09, 2020

Effective remote pair programming

Pair programming is an old idea that’s counter-intuitive but refuses to go away because it actually works. And it can work just as well remotely so here are some tips.

pair programming Cartoon by @vincentdnl, used with permission.

When done effectively it brings new people up to speed more quickly, distributes knowledge more evenly, raises the bar of everyone’s ability, and you end up with better code overall. This means keeping your velocity high over time.

But there are ineffective ways to do it. If one person is just watching it’s not optimal. Pair programming should be two people solving the same problem at different levels of abstraction.

Programming requires dealing with both high-level abstractions and concrete details at the same time, but this is very hard to do, maybe because the two hemispheres of the brain are involved separately in each.

The closer you can get to sitting side by side sharing one keyboard and screen the better. This means you don’t just share your editor (for example using VS Code Live Share). If you do that you’ll soon be solving different problems, not solving the same problem at different levels of abstraction. You will also miss out on picking up your pair’s great time-saving habits and tools. Their scripts, command-line aliases, keyboard shortcuts, etc. This is one of the biggest benefits of pair programming.

Share the whole screen, with something that gives both people control. Both need to see the output, docs, terminal and editor. There are only two good options that I know of, Tuple and Screen. Currently I’m using Tuple, it works pretty well, and I have not tried Screen yet but their previous screen sharing product ScreenHero was absolutely fantastic (unfortunately it was acquired and killed by Slack).

This means you need some shared social cues for when to take over control. “Can I drive?” works well, but do it your way as long as it’s understood. You need to frequently swap back and forth with the minimum amount of friction. Be courteous.

If that doesn’t naturally work for you then pick another style.

This also means someone else needs to be able to operate your computer effectively. Maybe they want to learn Vim from you… otherwise compromise on an editor you both know well enough.

If you’re using someone else’s computer remotely then full-screen the Tuple app, and turn on the option to send Command-Tab so that you can feel like you’re directly using their computer. Don’t go off to look at docs or whatever on your own, do it together.

If someone else is using your computer remotely then have a clean environment where someone can feel comfortable taking control. Close all your personal stuff and anything not relevant to the work at hand.

Recognize that it’s more tiring. It can be an 8-hour day concentrated into 4. Take breaks, optimize for learning for both of you.

And, most importantly, be patient and kind.

Comments? Share it  or just comment.
2024 © Paul Dowman