October 1999
Hunt & Thomas coin DRY — "Don't Repeat Yourself"
Andy Hunt and Dave Thomas introduce the DRYDon't Repeat Yourself — avoid duplicating logic; one authoritative source for each piece of knowledge. principle in The Pragmatic Programmer — later shortened to 'Don't repeat yourself.'
Quote
“Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.”
What it was for
DRYDon't Repeat Yourself — avoid duplicating logic; one authoritative source for each piece of knowledge. became a battle cry against copy-paste code and duplicated business rules. It is often misapplied to any repeated line of code — the authors meant duplicated knowledge, not literal character matching.
People
- Andy Hunt — author
- Dave Thomas — author
Why it's here
The principle behind every 'extract shared module' code review comment.
Why it mattered
It gave teams vocabulary for eliminating dangerous duplication of logic.
What it solved
Copy-pasted code let bugs live in multiple places and drift out of sync.
Media
ImageAndy Hunt (author)Photographer: Kittie Rue - Model: Andy Hunt, CC BY-SA 3.0, via Wikimedia Commons