Don't Repeat Yourself (DRY)

Avoid Code Duplication & Reuse Code.

Definition

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

Benefits

  • Maintainability

  • Readability

  • Reusability

  • Cost

  • Testing

Dry & Wet

  • Don't Repeat Yourself (DRY)

  • Write Everything Twice (WET)