The Roleplay Refactor — Same Module, Four Famous Engineers
Refactor this module four ways: as if Linus wrote it, as if DHH wrote it, as if Carmack wrote it, as if a junior on day two wrote it. Side by side. Find your codebase's real voice.
Why this exists
Most codebases are voiceless. Not because the engineers lacked taste, but because nobody decided. A function written on Tuesday by someone reading Rails docs sits next to a function written on Thursday by someone who just watched a Carmack talk. The result is a dialect spoken by no one. You only notice the absence when you put real voices next to it. Forcing the same module through four distinct engineers makes the missing center visible — and gives you something to commit to.
What you get back
- Four refactored versions of the same module, side by side, each fully committed to its voice.
- An analysis of what each voice prioritizes — and what it refuses to spend lines on.
- A verdict on which voice your codebase has been quietly imitating without naming.
- A direction to commit to, so the next function you write sounds like the last one on purpose.
When to reach for this pattern
Use it for taste calibration when a team has stopped agreeing on what "clean" means. Use it for teaching, when a junior needs to feel — not be told — the difference between defensive and decisive code. Use it before a rewrite, to decide whether your team actually has a coherent aesthetic or just a collection of personal preferences wearing the same lint config. The point is not to pick Linus or DHH. The point is to stop pretending you have not been picking already.
Refactor this module four ways. As if Linus Torvalds wrote it: terse,
unforgiving, every line earns its place. As if DHH wrote it: opinionated,
conventional, framework-blessed. As if John Carmack wrote it:
performance-first, comments that explain the algorithm not the code.
As if a junior on day two wrote it: verbose, defensive, every edge
case a function. Show me all four side by side. Then tell me which
voice my codebase has been pretending it doesn't have.
Paste this into Claude, Cursor, or Copilot. Change one thing that matters to you.
What I learned shipping it
- Every codebase has a voice it has been impersonating without admitting it.
- Reading your code through other voices is the fastest way to hear which one is actually yours.
- Good code is not universal. It is a coherent voice, consistently held.