Pair programming is a method of programming in which two people work together at a single computer. One person as ‘the driver’ and the other person as the ‘observer’ who reviews each line of code as it is typed. Usually in TDD pair programming is formed as ‘ping pong pairing’, for example one person write the test and the other one write the implementation to make the test pass.
Pair programming has some benefits: fewer bugs (increased quality), improved skills, and faster delivery. With increased quality comes big savings later in the project. It takes time to get used to pair programming so don’t worry if it feels awkward at first.
Based on my experience, the best way to pair program is to use 1 computer, 2 monitors, 2 keyboards and 2 mice just like what i’ve learned from neo guys.
But what happens when you want to pair with someone in another city or country? or when there is a time that you can’t come to office but still want to do pair programming with your pair buddy? the answer is Remote pairing.
Things that you need to prepare for remote pairing:
- a good headset with microphone: it will be much better if there’s a noise cancelling feature.
- a reliable internet connection: you know what this one is for.
- a great voice, video and screen sharing tool: Skype is my favorite tool for it.
- a great tool to interact with code: tmate and vim are my choices.
##Remote pairing with tmate
Using tmate for remote pairing is easy:
- Launch: run tmate
- Share: share the session with your partner
- Pair: done! you can start pairing
##tmate installation and usage
You can see clear explanation on how to install it at http://tmate.io
Basically there are two types of usage after you finished installing tmate:
- Using tmate.io server : what you have to do is just run the tmate and it will give you tmate session using tmate.io server
- Using your own hosted tmate server : you need to install tmate-slave on your server and connect to it by setting up your ~/.tmate.conf file