Software Engineering · Code Quality
"Don't Repeat Yourself" — any piece of knowledge or logic should exist in exactly one place in a system.
Example: Writing shared logic once and reusing it instead of copy-pasting it.
In practice: Applied too aggressively, DRY can create unwanted coupling between unrelated parts of a codebase that just happen to look similar today; the 'rule of three' — duplicate twice before abstracting — is a common guardrail.
Debated: Increasingly criticized — Sandi Metz and others argue that deduplicating code that merely looks similar, rather than sharing a true business rule, creates false coupling worse than the duplication it removed.