The Best Remote Pair Programming Setup

Sep 5, 2014 • Brett Chalupa

At FullStack, we often pair program on Ruby code. We have tried out various pair programming toolchains, but have struggled to find a responsive solution. After trial and error, we have found a setup that works for us.

First, let’s define some common terminology. When remote pair programming there is a host and a guest. The host is the person who starts the session. The guest is the one who joins the host’s session. The driver is the person who is actively typing. The driver can and should change throughout the session.

Here were our requirements for the ideal remote pairing setup:

This guide assumes three things:

  1. You and your pair are comfortable with Vim or another terminal based editor like Emacs.
  2. You and your pair are using OS X or another UNIX based operating system.
  3. You and your pair are capable of using the terminal and tmux.

If any of those pose a problem, check out Screenhero. The guest using Screenhero may experience some lag when typing, which makes it a less than ideal solution. However, it is still the best non-terminal based solution we have used.

The setup consists of:

tmate makes it easy to share a tmux session with other people. On OS X with Homebrew, brew install tmate will install tmate. If you do not use Homebrew, read the tmate documentation on how to install it. Once tmate is installed, enter the tmate command into the terminal. This will start up tmate and let you know the ssh command to send to your pair. It looks something like: ssh SOMEKEY@SOMESERVER. Once your pair enters that into their terminal, you should both be able to see the text entered into the terminal. When both the host and guest can enter text, it opens up opportunities for swapping the driver, pair ping pong, and experimentation with implementations.

Google Hangouts lets you or your pair share your screen if you need to show them something outside of the terminal, like your web browser. Any video/voice/screen sharing chat program will work for this, but starting a new hangout with the Hangout Button and sending the link to your pair is awfully easy.

Vim makes it easy to efficiently navigate files, open splits, and edit code. If you are not comfortable with Vim, pairing with a Vim user is a great way to get more comfortable with it.

There is not much to it other than that. Start up a hangout, launch tmate, and fire up Vim. It is free and fast. Whether the host or guest is driving, the text input is snappy and responsive.

Give it a shot and let us know how it goes. Happy pairing!