Skip to content

DRY and Code Reuse Principles

Tool-agnostic, language-agnostic development principles for understanding DRY, code reuse, and abstraction strategies.

I need to...

I need to... Guide
Understand what DRY actually means DRY Overview
Know when duplication is acceptable Four Types of Duplication
Choose between DRY, WET, or AHA approaches DRY vs WET vs AHA
Identify code duplication in my project Code Duplication
Ensure single source of truth for business rules Knowledge Duplication
Learn abstraction strategies Abstraction Strategies
Know when it's safe to abstract Rule of Three
Apply DRY to configuration DRY in Configuration
Apply DRY to documentation DRY in Documentation
Apply DRY to tests DRY in Testing
Apply DRY across system boundaries DRY Across Boundaries
Avoid over-abstraction Over-DRY Anti-Patterns
Get a practical decision framework Best Practices Decision Framework
Detect duplication in my codebase Code Smells and Detection
Find authoritative sources Code Reference Map