What is Pair Programming?
Pair programming puts two developers on one problem at one screen: the driver types, the navigator reviews continuously, thinks ahead, and questions design — roles swapping often. It looks like double cost; the evidence says modest extra hours buy fewer defects, better design, and knowledge spreading through the team as a side effect.
Applied with judgment, not dogma: pairs shine on complex, risky, or unfamiliar work; rote tasks pair badly. Its group form is mob programming.
Worked example
The payment-refund logic — the code that moves real money — is written by a pair: the senior who knows the ledger, driving; the new hire navigating and asking "what happens if the currency changed between charge and refund?" That question becomes a test case, a bug that never existed, and the fastest onboarding week the team has run.