DRYEdit

DRY, or "Don’t repeat yourself", is a development design principle which aims to minimize repetition and duplication. If the same information is repeated at multiple places within a code base then change is difficult because multiple sites must be altered in order to effect that change; performing the same edit multiple times is error prone and may lead to inconsistency if not all sites are included in the change.

Although DRY is generally a sound idea, it shouldn’t be taken to such extremes that clarity suffers. For an example of where this might be the case, see "Fixtures considered harmful?".

See also