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
From test cases to AI-ready quality data: why structure matters image
Learn how to structure and organize test management data as an AI-ready foundation that gives AI systems richer context for testing insights and workflows.
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.
This Week in Quality image
Debrief the week in Quality via a community radio show hosted by Simon Tomes and members of the community
Subscribe to our newsletter