DRY Principle
ELI5 — The Vibe Check
DRY: Don't Repeat Yourself. If you're copy-pasting code, you're doing it wrong. Extract it into a function. But beware — not all similar-looking code should be merged. Sometimes duplication is better than the wrong abstraction.
Real Talk
A software development principle stating that 'every piece of knowledge must have a single, unambiguous, authoritative representation within a system.' DRY applies to code, documentation, and data schemas. However, premature DRY (creating abstractions to eliminate coincidental duplication) can lead to harmful coupling.
When You'll Hear This
"DRY doesn't mean never duplicate code — it means don't duplicate knowledge. Two functions can look similar and still represent different concepts." / "We extracted the shared validation into a utility function — DRY in action."
Related Terms
Abstraction
Abstraction is hiding the messy details and showing only what matters.
KISS Principle
KISS: Keep It Simple, Stupid. The best code is the code that doesn't make you think. No clever tricks, no over-engineered abstractions, no 'look how smart
Refactoring
Refactoring is improving the internal structure of code WITHOUT changing what it does from the outside.
YAGNI Principle
YAGNI: You Ain't Gonna Need It. Don't build features 'just in case.' That abstraction layer for a database switch that will 'probably' happen? It won't. Bu