I Ban the Second Way of Doing Anything: What That Costs
Description and use
A developer enforced a "one path" rule across multiple repos, eliminating duplicate implementations and catching hidden bugs, improving maintainability and build reliability.
Problem
Developers often create duplicate implementation paths for the same meaning, leading to maintenance overhead and hidden bugs.
Outcome
Duplicate implementation paths were eliminated across five repositories, reducing maintenance effort and catching hidden bugs. The rule enforcement also revealed the author's own mistakes.
Workflow
- Define a rule: one meaning, one implementation path.
- Add rule text, enforcement matrix, and build check to the repo.
- Validate docs and matrix against each other in the build.
- Implement a conformance checker that rejects disallowed patterns.
- Add proof documents that quote real output for each gate.
- Run the build to ensure all rules fire.
- Iterate on rules, marking them as mechanical, partially, planned, or impossible.
- Maintain the rule set with human oversight where needed.
Evidence
I tested how far this goes by starting five small repositories in six days — Kotlin, C#, Go, Rust, Java — each with the same constitution, the same rule IDs, the same demand that every rule declare whether a machine enforces it or a person does. Five languages, one rule, 159 merged pull requests.
Adding a rule touches three places. The rule text, the enforcement matrix that says how it's held, and the actual check.
The second path stopped appearing. Not because people got better — because the build got red.
- Record date: 2026-09-11T04:46:25.808Z