Development and Project Management Principles
85. Boy Scout Rule
Definition. Leave the codebase cleaner than you found it; make small improvements whenever you touch code.
Rationale. Small, continuous improvements prevent decay without dedicated refactoring projects. Over time the codebase gets healthier.
Example. Rename a confusing variable or extract a method while fixing a bug in the same file.
Anti-pattern / failure mode. “Not my code” attitude; leaving messes for later. Review signal: code quality only degrades over time.
Related. Continuous Refactoring (#86), Small Batch (#87), small slices (Vertical Slice).
86. Continuous Refactoring
Definition. Improve internal code structure without changing external behavior; refactor steadily rather than in big batches.
Rationale. Big-bang refactors are risky and hard to review. Small, frequent refactors keep code healthy and changes reviewable.
Example. Extract a helper and add tests in the same PR as a feature, not a separate “refactor sprint.”
Anti-pattern / failure mode. Deferring all cleanup to a “refactor phase” that never happens. Review signal: large, scary refactoring PRs.
Related. Boy Scout Rule (#85), Small Batch (#87), template stability (Template Method).
87. Small Batch Principle
Definition. Deliver changes in small, manageable increments; small batches reduce risk and speed feedback.
Rationale. Large changes are hard to review and risky to deploy. Small batches are easier to test, review, and roll back.
Example. Ship a feature behind a flag in several small PRs instead of one huge one.
Anti-pattern / failure mode. Long-lived branches with massive PRs. Review signal: reviews that take days and deployments that fail.
Related. Feedback Loop (#88), Continuous Integration (#76), one-deployable flow (Modular Monolith).
88. Feedback Loop Principle
Definition. Shorten the time between implementation and feedback; faster feedback enables faster correction.
Rationale. Long feedback loops delay learning and let defects compound. Short loops catch issues while context is fresh.
Example. Fast local tests, preview deployments, and quick code review.
Anti-pattern / failure mode. Waiting days for CI or review. Review signal: developers context-switch away before feedback arrives.
Related. Small Batch (#87), Automation First (#89), observable broadcasts (Observer).
89. Automation First
Definition. Automate repeatable and error-prone processes; prefer scripts and pipelines over manual steps.
Rationale. Manual steps are slow and inconsistent. Automation makes processes reliable, fast, and auditable.
Example. Automate builds, tests, and deployments via CI/CD instead of manual runbooks.
Anti-pattern / failure mode. Manual deployment checklists and hand-run migrations. Review signal: “it works on my machine” deployments.
Related. Feedback Loop (#88), Continuous Integration (#76), repeatable pipelines (Builder).
90. Single Source of Truth (SSOT)
Definition. Maintain one authoritative source for each piece of information; avoid conflicting copies.
Rationale. Multiple copies drift and cause confusion about which is correct. A single source keeps data consistent and trusted.
Example. Store a user’s email in one place; other systems reference it, not copy it.
Anti-pattern / failure mode. Duplicated configuration or data across services that drift. Review signal: “which value is correct?” debates.
Related. DRY (#6), Event Sourcing (#51), canonical store (CQRS & Event Sourcing).
91. You Build It, You Run It
Definition. Development teams take responsibility for operating their software; ownership includes production health.
Rationale. When builders also operate, they feel the pain of poor operability and improve it. It aligns incentives and shortens feedback.
Example. The team that ships a service also owns its on-call and dashboards.
Anti-pattern / failure mode. Handing off to a separate ops team with no shared ownership. Review signal: production issues bounce between teams.
Related. Feedback Loop (#88), Evolutionary Architecture (#92), owned single writer (Single Writer).
92. Evolutionary Architecture
Definition. Design architecture to support continuous change; favor reversible decisions and fitness functions.
Rationale. Requirements change; architecture must adapt. Reversible decisions and automated fitness functions let the architecture evolve safely.
Example. Use fitness functions in CI to enforce architecture rules (e.g., no domain-to-infra imports).
Anti-pattern / failure mode. Big up-front design that cannot change; architecture decisions that are costly to reverse. Review signal: architecture that fights every new requirement.
Related. Separation of Architecture and Implementation (#21), Small Batch (#87).