Don't Repeat Yourself (DRY)

Don't Repeat Yourself (DRY) image
A coding principle stating that every piece of knowledge should have a single, authoritative representation in a system. When logic is duplicated across a codebase, any change must be made in multiple places, increasing the risk of inconsistency and bugs. 

Illustrated this with a value-added tax example: rather than scattering a raw multiplier throughout the code, extracting it into a named method means the logic lives in one place and can be updated once. The opposing backronym is WET (Write Everything Twice), used humorously to describe code that violates DRY.
Explore MoT
MoT Athens image
Fri, 5 Jun
MoT Athens Meetup #18: Summer meetup 2026
MoT Software Testing Essentials Certificate image
Boost your career in software testing with the MoT Software Testing Essentials Certificate. Learn essential skills, from basic testing techniques to advanced risk analysis, crafted by industry experts.
Into The Motaverse image
Into the MoTaverse is a podcast by Ministry of Testing, hosted by Rosie Sherry, exploring the people, insights, and systems shaping quality in modern software teams.
Subscribe to our newsletter