Pairing Up

Regardless of who you’re partnering with or what you’ll be working on, each pairing session should begin with the following three steps.

Step One: Establish a Communication Channel

The communication channel can be as simple as an instant-messaging program, but it’s usually preferable to have an audio and even a visual connection. You can use any of the many voice- and video-communication tools available, but we won’t explore those in detail. If you don’t know where to start, use Skype.[24] Its reputation as a user-friendly tool is weak, but its ubiquity and even the reliability of the voice over IP technology underlying the clunky client interface is unparalleled. We’ll discuss Skype and some alternatives in more detail later in the chapter.

Regardless of the voice software you choose, it’s also important to have a good microphone. The mic included in your laptop or display will probably reduce the likelihood of your partner understanding your every word—and your partner should be able understand every word. If you’re going to pair-program often, then get a moderately good microphone such as the Blue Snowball.[25] If you prefer a headset, consider the Logitech H390, which is affordable and has a good reputation.[26]

After getting connected, do a quick mic check. Make sure there is no background noise, static, lag, echo, or anything else that might make the other person difficult to hear. If you find a problem, address it immediately. Once you’ve established a good communication channel, you’ll need to discuss a few things with your partner.

Step Two: Get Comfortable

If this is the first time you and your partner are pairing, you’ll need to define your expectations well. You should discuss your experiences with remote pair programming and be clear about things that might make the process difficult for you. If you need to take frequent bathroom breaks, make it known. If you have low bandwidth or your connection is laggy, then tell your partner. Both you and your partner must be comfortable.

With the basic housekeeping out of the way, the next thing you’ll need to establish is your goals. Be specific about what code you want to work on, and what you expect to accomplish. Many programmers like to identify specific tests that need to be fixed. Other times, the goal is to write tests to replicate bugs or define new features.

Step Three: Agree on Your Tools

Before you change a single line of code, you and your partner need to agree on the tools you’ll use to do it. This includes operating system, text editors, integrated development environments, testing tools, debugging tools, and more. Choosing the right tools might be the most important part of pair programming, and that’s why the majority of this book is dedicated to understanding the pros and cons of each option.

Regardless of your choice of development tools, you should be using a version-control system (VCS) for your code. Most VCSs record each commit, along with the author who made it. That is author, not authors. The first order of business is telling your VCS that you’re pair programming. Some excellent tools make this easier, but most of them work only with Git. Two such Git-based tools are Hitch and Sprout.

Hitch is a Ruby Gem for easily setting and resetting your configuration.[27] You can run commands like hitch jane john to get started and hitch -u to return your configuration to its defaults. The Sprout project from Pivotal Labs is a set of Chef cookbooks that include a pairing recipe.[28]

Tools like Hitch and Sprout are making it convenient to run these commands:

 
$ ​git config --global user.name "Jane Doe and John Smith"
 
$ ​git config --global user.email [email protected]

You can always resort to running them yourself. You’ll need to do something similar for Mercurial, svn, or whatever VCS you’re using. But even after your VCS is set up, you still aren’t ready to code. You need some remote-pairing development tools. Fortunately, that’s what the rest of this book is about.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.109.8