Readplace

Don't repeat yourself

Wikimedia Foundation, Inc. 4 min read
View original
  • current
Summary (TL;DR)
The DRY (Don't Repeat Yourself) principle reduces repetition by representing knowledge once. Coined by Hunt and Thomas, it applies to code, schemas, tests, and docs. The single choice principle avoids listing alternatives in multiple places. WET (write everything twice) is the opposite. AHA (avoid hasty abstractions) suggests abstracting only when needed over duplicating or abstracting prematurely.