Reference
How pair-reading works
Programmers read code in pairs because one reader misses things a second reader catches. PairForge gives the two of you the two classic roles and one shared program. Here’s how to run it — and the reading moves the puzzles drill. Open the pair lab →
The two roles
- 🧭 Navigator
You read the program out loud, line by line, and propose what it prints. Saying it out loud is the whole trick — you catch your own slips, and your partner can follow your thinking.
- 🚗 Driver
You check the Navigator’s read against the code. If you read it the same way, agree. If not, say so and show the read YOU see. A fresh pair of eyes catches the misread the first reader glides past.
Pair-reading habits
- One screen, two roles
Real pair programming is two people at one screen — not two people racing. You’re on the SAME puzzle, helping each other read it right.
- Agree before you reveal
You never reveal a read nobody predicted. Predicting first is what makes your reading get better — the reveal just checks it.
- Say WHY, not just what
When you disagree, don’t just repeat your answer — trace the line that decides it. Whoever explains the WHY usually spots the truth.
- Swap roles every round
Take turns navigating and driving. Reading and checking are different skills — you want both.
- A miss is a good catch
When the Driver catches a misread, that’s a WIN, not an “ah-ha, you were wrong.” Two sets of eyes exist to catch exactly that.
The reading moves you’ll drill
A half-open range (1..<4) stops just BEFORE the last number.
Whole-number (Int) division drops the remainder — no decimals.
A var changes line by line, in order — newest value wins.
A loop can build up a running total; print the total, not the loop variable.
For text, + joins strings end-to-end (it does not add).
A strict > excludes the number itself (5 > 5 is false).
Nested loops multiply — the inner loop runs fully for each outer pass.
A while loop stops the instant its test is false — trace the counter alongside.
The puzzles are original teaching examples in a teaching subset of the Swift language — a teaching dialect, not real Apple code. Nothing you read leaves your device. Read one together →