Skip to content
BENIBIX Learn

Pair Programming

Development🧩 Programming ConceptsDevelopment Practices

Also known as Pairing, Pair Coding, Driver and Navigator

Two people write the same code together. One types and one checks.

Think of it like

Think of it like a rally car with a driver and a map reader. One steers. The other looks ahead.

Example

Jack is new to the payment code, so he pairs with Lucy for a week. By Friday he can change it alone, and they found two bugs on the way.

Why it matters

Bugs found while typing are the cheapest bugs there are. And no part of the code is known by just one person.

Definition

Pair programming is two developers working on the same code at one screen. One person, the driver, types. The other, the navigator, reviews each line and thinks about the bigger picture. They swap roles often, every 15 to 30 minutes. It catches mistakes as they are made and spreads knowledge across the team.

Common mistake

Letting one person type all day while the other just watches. Swap often, or the helper stops paying heed.

Key takeaways

  1. 1
    Driver and navigator. One types, one guides.
  2. 2
    Swap often. Every 15 to 30 minutes.
  3. 3
    Share what you know. Knowledge spreads.

Compare

Learn it properly