CSC/ECE 517 Summer 2008/wiki2 5 31: Difference between revisions
No edit summary |
|||
Line 5: | Line 5: | ||
The DRY code philosophy is stated as every piece of knowledge must have a single, | The DRY code philosophy is stated as every piece of knowledge must have a single, | ||
unambiguous, authoritative representation within a system. | unambiguous, authoritative representation within a system. | ||
= The Importance of the DRY Principle? = | = The Importance of the DRY Principle? = |
Revision as of 03:00, 25 June 2008
DRY Principle
The Don't Repeat Yourself (DRY) principle is basic to writing maintainable code. The purpose of this Wiki is to find Web sites that explain the importance of the principle by writing prose that summarizes their arguments. Examples whill be provided of where the principle should be applied. A checklist will be created for programmers to consider in determining whether their code is in conformance.
What is the DRY Principle?
The DRY code philosophy is stated as every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
The Importance of the DRY Principle?
DRY, is also known as Single Point of Truth. This process is aimed at simplifying the maintenance of code. The philosophy emphasizes that information should not be duplicated, because duplication increases the difficulty of change, may decrease clarity, and leads to opportunities for inconsistency. When the DRY principle is applied successfully, a modification of any single element of a system does not change other logically-unrelated elements. Additionally, elements that are logically related all change predictably and uniformly, and are thus kept in sync. http://en.wikipedia.org/wiki/Don't_repeat_yourself