A couple of weeks ago I transitioned a project I was working on to a pair in our office in Chile. When coming into a new project there is always that uphill battle of stuffing the domain into your head. You could read through the stories in Pivotal Tracker to learn the domain, and we do that. But the best way really is to just dive in and start pairing with someone who's already got the knowledge. In doing this you also pickup on the style and techniques that have become patterns in the project.
This process is natural and relatively easy when the person or pair you are transitioning to are located in the same building. But in this case the other pair was located in a completely different hemisphere. Thankfully they are currently in the same timezone so we were able to work together during normal office hours. How do you pair program though when when you are thousands of miles away? Well, thanks to Oliver Laumann and Carsten Bormann way back in 1987, we can achieve this modern miracle through the GNU Screen terminal multiplexer. The great thing about screen is when someone else is attached to your screen session you can see what that person is typing as they type it. This combined with skype voice or video and it's almost like the two of you are in the same room. I said almost!
All you really need to get started is a UNIX like operating system. SSH and screen ae typically part of the base install. Here's how to do it.
On your machine or possibly some remote machine you both have access to:
me@mymachine:~$ screen
You'll probably get a splash screen of sorts. Just press space or enter. You're now in a screen session. Your pair can then ssh into the same machine and type:
them@mymachine:~$ screen -x
to attach to the same screen session. You can create new terminal windows in screen with Ctrl-a n. To switch between window sessions you can type Ctrl-a [n] where n is the window number. So Ctrl-a 0 would be the first window you created Ctrl-a 1 would be the second and so on. Alternatively you can type Ctrl-a n or Ctrl-a p for the next and previous windows respectively.
You can also emulate a tabbed MacVim or Terminal window by creating tabs in your local terminal and attaching to screen via screen -x for each new window that you create and moving to the appropriate window number. This way you can just tab through the windows in the same fashion you would if you were working locally. I like having WEBrick in the first tab, irb in the second, watchr or rspactor in the third, and the code in the fourth for example.
For the remote pair to see the application you're working on in the browser you can port forward an external port like 3000 to port 3000 (or whatever port you're using for development) on your router. If you can't do this you could use Skype or some other screen sharing mechanism to share your local browser with your pair.
So that's how we do it.
Q:How do you handle remote pairing? Any ideas on how we can improve the process?
Comments # add a comment
Add a comment