Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I Ban the Second Way of Doing Anything: What That Costs

Описание и применение

Разработчик внедрил правило «один путь реализации» для устранения дублирования кода, что привело к снижению технического долга и повышению надёжности сборки.

Задача

Developers often create duplicate implementation paths for the same meaning, leading to maintenance overhead and hidden bugs.

Результат

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.

Рабочий процесс

  • 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.

Доказательства

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.

Источник

  • Дата записи: 2026-09-11T04:46:25.808Z