Glossary · Patterns

DRY (Don't Repeat Yourself)

Every piece of knowledge should have exactly one authoritative representation in the system.

DRY (Don't Repeat Yourself) states that every rule and every piece of knowledge should be represented exactly once in a system. The principle is often misread as a ban on any repetition of text — but what it targets is the duplication of knowledge that has to change together. Unifying two pieces of code that happen to look similar but evolve independently creates the wrong abstraction and costs more than the duplication. The litmus test, therefore, is not whether code looks the same but whether it changes together.

Read on

Related topics.

Guides, decisions, services and case studies connected to this page.

From theory to production.

We apply these concepts in real systems — and keep running them for years.