DRY Principle

Why Trust Techopedia

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

Margaret Rouse
Technology expert
Margaret Rouse
Technology expert

Margaret is an award-winning writer and educator known for her ability to explain complex technical topics to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles in the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret’s idea of ​​a fun day is to help IT and business professionals to learn to speak each other’s highly specialized languages.