🍫 CocoaPatterns — iOS & Mac Development Since 2009 RSS
🍫 CocoaPatterns
Because someone has to write this stuff down
"We ship apps. Sometimes they even work."

Chess Clock Pair Programming: Accountability in 10-Minute Increments

Regular pair programming has no time pressure. That's the problem.

YA
Yusra Al-Amin
@yusra_eng · CocoaPatterns

Traditional pair programming rotates the keyboard every few minutes through social consensus — a system that, in practice, means one person holds the keyboard for 90 minutes while the other offers increasingly passive suggestions and then checks Twitter. Chess Clock Pair Programming solves this with a $30 piece of chess equipment and a healthy fear of the timer running out.

"In chess, when your clock runs out, you forfeit the game. In CCPP, when your clock runs out, your partner takes the keyboard mid-sentence. Sometimes mid-method. Sometimes mid-variable-name. That's their problem now."

The Protocol

Each developer gets 10 minutes per turn. The chess clock runs while you hold the keyboard. When your time expires, you slap the clock, pass the keyboard, and your partner inherits whatever state you've left the codebase in — compiling or not, making sense or not, named correctly or not.

⏱️ CCPP Rules
  • No pausing the clock to "think." Thinking happens on your time.
  • No explaining what you were doing. The code explains itself. Or it doesn't.
  • Using your remaining time to rename variables out of spite is technically within the rules.

Outcomes

  • Average variable name quality: decreased (tmp2, x, theThing)
  • Comment frequency: zero. No one has time for comments.
  • Interpersonal conflict: moderate. Inheriting a broken build mid-function is emotionally activating.
  • One developer named Jonah used his 10 minutes exclusively to write tests for the previous developer's code. Every turn. We haven't asked why.
// Written across 7 clock turns by 2 developers.
// Neither of them will claim it.
- (BOOL)doTheThing:(id)x   // Sarah named this. 40 seconds left.
         withThing:(id)tmp2 {  // Marcus inherited it. He was not pleased.
    if (x && tmp2) {   // Jonah added this guard. Didn't say why.
        return [x isEqual:tmp2] ? YES : [tmp2 isEqual:x]; // ???
    }
    return NO; // Clock ran out. Ship it.
}
3 Comments — Powered by Disqus
JM
j_marcus_dev · 5 weeks ago
I am Marcus. I was not pleased. tmp2 haunts me.
YA
yusra_engAuthor · 5 weeks ago
@j_marcus_dev Nobody knows what that last line does either. It passes the tests.
JO
jonah_only_tests · 5 weeks ago
I'm Jonah. I'm making a point.