Pair Programming

The Big Idea

Pair programming is a technique used in software development where two people work together at one workstation — one writes code while the other watches the big picture, catches mistakes, and thinks ahead. In this section you'll learn what it is and how it works — you'll get plenty of practice once you're in Bootcamp. If you want to try it out already, there's a stretch activity at the end.

Your Roadmap

SectionTimeRequired?
What pair programming is20 min⚑ Required
How to pair well10 min⚑ Required
Pairing environments5 min⚑ Required
Reflect10 min⚑ Required
Stretch — try it outVariable◎ Optional

What pair programming is

Show overview: the driver and navigator model

Pair programming uses two roles that you swap regularly:

RoleWhat you do
DriverTypes the code. Focuses on the current line and syntax.
NavigatorWatches the bigger picture. Spots errors, thinks about the next step, checks the approach.

Together, you maintain strong attention on the task. The navigator catches mistakes before they're embedded; the driver stays focused on execution.

Set a timer. Switch roles every 15–20 minutes so both people get practice in both roles.

Watch these videos to see pair programming in action. Yes, they're about 10 years old — but the core ideas are just as applicable today.

How to pair well

Before you write a single line of code, check in with your pair:

  • How did you sleep?
  • How are you feeling right now?
  • How comfortable do you feel with the code you're about to work on?
  • Is there anything going on for you today that might affect how you're working?

This check-in matters. Knowing where your pair is at helps you work together more effectively and avoid misreading each other's reactions.

During the session:

  • Assign roles before you start, and set a timer to swap.
  • Explain your thinking out loud as you work — narrating what you're doing helps the navigator follow along and helps you catch your own errors.
  • Listen to your pair's ideas with an open mind — there's usually more than one valid approach.

Pairing environments

In order of effectiveness:

  1. In person — arrange a time and place to meet. This is the best option if you can make it work.
  2. Video call + collaborative coding — use a tool like repl.it multiplayer or VS Code Live Share so you can both see and edit the code.
  3. Video call + screen share — one person shares their screen; the other watches and navigates verbally.

If you don't have a reliable internet connection for options 2 or 3, you can still get some of the benefit:

  • Use a phone call and Discord messages to discuss approaches and ideas.
  • Share pseudocode and code snippets on Discord or via GitHub.

How to know you've nailed it

LevelYou can...
🪨Intro ClimbExplain the driver and navigator roles in your own words⚑ Required
🧗Core AscentDescribe what a check-in looks like before pairing, and explain why it improves the session⚑ Required
🏔️SummitTry the stretch activity — pair with a fellow student on an exercise and reflect on how the session felt◎ Optional

Reflect

Open your my-reflections-sprint-5.md file in VS Code and add your reflection under the Pair Programming heading.

Commit and push to GitHub.

The Big Idea — revisited

Pair programming is a technique used in software development where two people work together at one workstation — one writes code while the other watches the big picture, catches mistakes, and thinks ahead. You now know what the roles look like, how to set up a session well, and why the check-in matters. These are skills you'll use from day one of Bootcamp.

Stretch — try it out

◎ Want to give pair programming a go now? Find a fellow student and pick any exercise you've already done — something with a bit of complexity works best, like revisiting a DOM challenge or going back through the JavaScript Cafe from the beginning. If you want more of a challenge, try the JS Calculator exercise together.