DRY Principle

What Does DRY Principle Mean?

The DRY principle is one of those long-standing ideas in computer science that is talked about with a bit of humor. DRY stands for "don’t repeat yourself," and a corresponding WET principle stands for "write everything twice." The DRY principle is often attributed to Andrew Hunt and David Thomas, whose book, the Pragmatic Programmer, came out in 2000.

Advertisements

Techopedia Explains DRY Principle

The idea of the DRY principle is that, using efficiencies and eliminating redundancies, programmers can make code more efficient and easy to change. At the heart of the DRY principle is the re-use of code modules. For instance, coding a repeatable task as a function means that function can be inserted and re-used anywhere in the code, and does not have to be re-written for various calls. Benefits of using the DRY principle include code readability and ease of maintenance.

Advertisements

Related Terms

Latest Software Development Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…