What is DRY (Don't Repeat Yourself)?
A software development principle that aims to reduce code duplication by abstracting common patterns into reusable components.
DRY states that every piece of knowledge should have a single, unambiguous representation in a system. Duplicate code means duplicate bugs and duplicate maintenance effort. Extract common logic into functions, classes, or modules.
However, premature abstraction can be worse than duplication. The "Rule of Three" suggests abstracting only after seeing the same pattern three times. WET (Write Everything Twice) and AHA (Avoid Hasty Abstractions) are counterbalancing principles that warn against over-abstraction.