> For the complete documentation index, see [llms.txt](https://heronyang.gitbook.io/clean-up-your-spaghetti/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heronyang.gitbook.io/clean-up-your-spaghetti/3_ideal_coding_process_and_principles/duplication.md).

# Duplication

DRY Principle (Don't Repeat Yourself).

* Duplication = missed opportunity for abstraction
  * make it subroutine / another class / etc

## Why

* raise abstraction level: faster / fewer bugs
* design for change
* design for reuse

## More?

Avoid doing duplicated things is the purpose of inventing computers.
