A Pairing Session Template

Here’s a template for your next pairing session:

  1. [ ] Agree on the high-level goal out loud.
  2. [ ] Break the work into a handful of tasks and prioritize them.
  3. [ ] Decide your driver/navigator swapping strategy.
  4. [ ] Configure git to share credit.
  5. [ ] Eliminate distractions.
  6. [ ] Work.
  7. [ ] Analyze the session with a mini retro.

Let’s talk more about each step.

1. Agree on the high-level goal out loud

State out loud what you hope to accomplish at a high level.

You wouldn’t think it’d be possible for two people to start pairing without agreement about where they’re headed, but it’s surprisingly easy.

2. Break the work into a handful of tasks (and prioritize them)

It’s worth trying to break your high-level goal into a handful of smaller steps.

This has a number of benefits:

Some folks like to write each task on its own index card. The stack of them lives in front of the navigator. Each card can be a nice home for notes or ideas to bring up when there is a break in the action.

3. Decide what will trigger a driver/navigator swap

Unless you already know what works best for you, I strongly recommend the Pomodoro Technique:

  1. Code for 25 minutes.
  2. Take a 5 minute break.
  3. Switch drivers.

Other pair programming styles exist if you wish to try them.

4. Configure git to share credit

If two of you work on some code, both your names should appear on the commit.

Here’s a handy guide to configuring git appropriately.

Bonus: GitHub understands this natively and will give you both credit for the commit.

A few tools exist to make this even easier:

5. Eliminate distractions

Show respect for your pair and the work you’re about to do.

6. Work

Do the work!

Don’t forget:

7. Perform a mini retro

Spend a few minutes after your session reflecting on the experience.

First, discuss what went well.

Then, consider what would make the next session 1% better.

Possible areas for improvement: