Resources – Practical Pair Programming

Resources

Agile and XP

In this book, I’ve assumed you’re at least a little familiar with Agile and XP. If you’re not or you want to dig in deeper, I recommend the following resources:

  • In Rachel Davies’s XP talk at NewCrafts 2017, “What Ever Happened to Being eXtreme?”, she discussed what modern Extreme Programming includes, where it came from, and its most important aspects. She also revisited old-school XP and what it has to offer even though it’s been forgotten by the mainstream (http://bkaprt.com/ppp/06-01/, video).
  • Though things like continuous integration (CI), small feature branches, and test-driven development (TDD) are the modern norm of effective engineering teams, Extreme Programming Explained: Embrace Change by Kent Beck and Cynthia Andres remains a great reference and an important read if you’re coming from a background where XP principles aren’t practiced.
  • ExtremeProgramming.org has an interactive map that puts pair programming in the context of an Extreme Programming project. You can zoom out to see its relationship to testing, refactoring, standups, and Agile processes (http://bkaprt.com/ppp/06-02/).
  • Build confidence in your test-driven development (TDD) skills and practice ping pong pairing with some TDD katas (http://bkaprt.com/ppp/06-03/).

Pair programming under a microscope

  • The book Pair Programming Illuminated by Laurie Williams and Robert Kessler devotes a whole section to various combinations of expertise, introversion, gender, culture, ego, and so on. If you’re struggling to make a particular pairing relationship work and the basic habits of humility, confidence, receptivity, communication, and compromise aren’t working for you, perhaps consult Chapters 12–23 for advice!
  • If you really want to get into the economics of pair programming, the same book has an Appendix B that presents a detailed economic analysis. For a broader look at academic pair programming studies, see this meta-analysis (http://bkaprt.com/ppp/06-04/, PDF).

Managing resistance and anti-patterns

  • “Does Pair Programming Have to Suck?”, Alex Harms’ talk at Ruby Midwest 2011, is an accessible and frank look at how pairing can either go really well or really badly, depending on how it’s practiced. (http://bkaprt.com/ppp/06-05/, video).
  • “10 Reasons Pair Programming Is Not For The Masses” by Obie Fernandez looks at why pair programming, though highly effective at Hashrocket, isn’t more widely practiced (http://bkaprt.com/ppp/06-06/).
  • Framed as “etiquette,” this article by training site Techtown lists sixteen behaviors that help pair programming go well (http://bkaprt.com/ppp/06-07/).
  • The Recurse Center’s social rules (not to be confused with their Code of Conduct) help create a “friendly, intellectual environment where you can spend as much of your energy as possible on programming” (http://bkaprt.com/ppp/06-08/).

Code quality

These books will help you be a better navigator as you continuously review the code you’re writing.

Pair rotation

  • This pair programming matrix Google Sheet created by Pivotal Labs can be used to highlight hot spots if two people pair disproportionately often. Copy the sheet and replace the cartoon characters with your faces or names (http://bkaprt.com/ppp/06-12/).
  • Git Pair Trix is one example of an automated matrix that reads the git authors from commit messages in your repository (assuming you’re using the pivotal git-pair script) and produces text output showing the matrix (http://bkaprt.com/ppp/06-13/).

Pair code authorship

Git version control is designed for collaboration but assumes that a single person is making the commits. Since that isn’t the case when pairing, we might want to give the credit—or blame—to the right people. Here are a couple tools that will let you temporarily make commits as a pair.

  • git-duet: Both your names will go on the commit messages—one as author and one as committer. You can set it up to alternate who is who if you wish. You can use git duet-install-hook pre-commit to set a hook that reminds you if you haven’t specified who is pairing for a while. Note that you have to use git duet-commit, git duet-revert, and git duet-merge to get both names on the commit unless you set GIT_DUET_SET_GIT_USER_CONFIG to 1 (http://bkaprt.com/ppp/06-14/).
  • pairwith: This simple utility just adds a Co-Authored-By line to the body of your commit messages (http://bkaprt.com/ppp/06-15/).

Collaborative editors

Terminal sharing

  • tmux is a terminal multiplexer that lets you have multiple windows and panes in one terminal session. If this interests you beyond checking out a primer online, pick up the Pragmatic Programmers book tmux: Productive Mouse-Free Development by Brian P. Hogan, because tmux and the customization thereof is a deep, deep subject (http://bkaprt.com/ppp/06-20/).
  • Many people prefer iTerm over the Apple-provided Terminal app. It has more configuration options and integrates nicely with tmux. With this integration in place, you can almost forget tmux is running because you don’t have to use tmux commands to manage your windows. Just click, scroll, highlight text, split, and resize windows like you’re used to and your partner’s will, too (http://bkaprt.com/ppp/06-21/9)!
  • tmate is a fork of tmux that makes sharing a breeze. When you start the session, it gives you an SSH connection string you can share with your pair. They just paste it in their terminal and they’re connected to your session without any VPNs, SSH tunnels, or fixed IPs (http://bkaprt.com/ppp/06-22/).

Screen sharing

  • Zoom is a market leader in video meetings for good reason. Zoom’s video and audio compression is fantastic, their echo cancellation is second-to-none, and you can actually see your partner and their screen at the same time if you have multiple monitors. We’ve done side-by-side comparisons with Google Meet and vastly prefer Zoom. It’s free for one-to-one meetings of unlimited length. We have Zoom integrated with Slack, so the /zoom command pops open a new Zoom meeting in an instant. From there, you can share your screen and give your partner control. Either person can type or run the mouse, but there’s just one mouse cursor. The shared whiteboard is easiest to use when you have a tablet with a stylus (http://bkaprt.com/ppp/06-23/).
  • We used to use Screenhero all the time for remote pairing. It was low lag, included audio, and allowed each person to have their own mouse pointer, which was handy for trading control back and forth quickly. Then Slack bought it in 2015 and turned it into their video chat feature, killing off some of the best functions before removing screen sharing entirely in 2019. Fortunately, the original authors have written new software to fill the Screenhero void. It takes some cues from Zoom (like scheduling meetings, using meeting codes, and showing a live thumbnail of your partner’s face) but puts collaborative screen sharing at the center of its feature set. Screen is available for Mac, Windows, Linux, iOS and Android (http://bkaprt.com/ppp/06-24/).
  • When Screenhero was dissolved, three French devs built USE Together. It’s reasonably priced (free for students!) and is available in an on-premises solution if your organization is cloud-averse. The chat is voice-only, though, so you won’t be able to see your partner (http://bkaprt.com/ppp/06-25/).
  • If you’re in a Mac-only environment, check out Tuple, screen sharing software made explicitly for pairing. It tucks away in the menu bar, automatically enables Mac’s do-not-disturb mode, and gives you loads of insight into and control over your stream quality (going up to 5k resolution with very low latency). As of this writing, it’s a little more expensive than the others, but highly endorsed by respected engineering teams. The developers say Windows and Linux support is coming (http://bkaprt.com/ppp/06-26/).

Pairing servers

  • You can use Amazon WorkSpaces (http://bkaprt.com/ppp/06-27/) to spin up Windows or Linux desktops in a nearby datacenter. There are similar offerings on Microsoft Azure (http://bkaprt.com/ppp/06-28/) and Google Cloud (http://bkaprt.com/ppp/06-29/).
  • macOS and iOS developers have fewer virtual desktop options, but a few include MacinCloud.com (worldwide datacenters), MacCloud.me in Cleveland, and xcloud.me in Zurich. MacStadium (US and Europe) is doing some cool stuff with Kubernetes to manage macOS VMs (http://bkaprt.com/ppp/06-30/). If you’re doing iOS development, it’s not a bad way to go.

Keyboard tools

  • Karabiner-Elements is useful for keyboard remapping, needed if one of the pair uses a different keyboard layout (e.g. Dvorak) or is used to just a few keys being remapped—such as swapped Control and Caps Lock or the backtick as escape. I’m grateful that Takayama Fumihiko implemented my feature request to allow mappings to only apply to specific keyboards. It’s saved many in-person pairs from fighting or struggling with different keyboard preferences (http://bkaprt.com/ppp/06-31/)!

Network tuning

  • PacketLossTest.com will test your upload and download speeds, lost or late packets, and jitter (the variation in packet delay) to help you figure which part of your network connection might be to blame for poor performance (http://bkaprt.com/ppp/06-32/).
  • iPerf is a sophisticated command-line app. If you’re remote pairing, run it in server mode on one end and client mode on the other. Test with UDP packets to measure jitter. You can use a public server, but they’re often busy. iperf3 -u -i 1 -c bouygues.iperf.fr is an easy way to start (http://bkaprt.com/ppp/06-33/).
  • The Zoom desktop client provides network statistics, which are described in this article. The article lists acceptable ranges for latency, jitter, packet loss, and video resolution and framerate that make good guidelines for any remote pairing with audio, video, and screen sharing (http://bkaprt.com/ppp/06-34/).
  • If you’re toying with different Wi-Fi routers, repeaters, or mesh networking, the tools and techniques Jim Salter has developed at Ars Technica can be useful, especially if your Wi-Fi has other simultaneous users that put pressure on your pairing bandwidth. Access point placement is way more important than the top speed numbers on the product box or your internet plan for minimizing glitches when remote pairing. He has ten rules for getting the most out of your Wi-Fi (http://bkaprt.com/ppp/06-35/). If you really want to optimize, his testing tools and techniques can help you figure out the best equipment and layout in your own home or office (http://bkaprt.com/ppp/06-36/).
  • At a network level, remote pair programming looks a lot like online multiplayer gaming. League of Legends ranks hundreds of internet providers by latency, packet loss, and jitter and provides many suggestions for troubleshooting your connection and reducing lag (http://bkaprt.com/ppp/06-37/, http://bkaprt.com/ppp/06-38/).