16 September 2021

DRY Principle

DRY Principle

  • Functionality Flow principle is a coding principle.
  • Dry refers to the existence of minimum duplication in a code :
    • DRY is the principle to avoid repetition of the same information in one system, preventing the same code from being produced multiple times on code base.
  • Don’t repeat yourself (DRY) is a principle of software development aimed at reducing repetition and duplication of software codes :
    • Don’t repeat yourself (DRY, or sometimes Do not Repeat Yourself) is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy.
    • The DRY principle is stated as “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system”.
    • The principle has been formulated by Andy Hunt and Dave Thomas in their book “The Pragmatic Programmer”.

DRY Benefits

  • It saves overall development time and effort
  • Code is easy to maintain
  • It reduces the chances of bugs

DRY and WET solutions

  • Violations of DRY are typically referred to as WET solutions.
    • Wet Solutions which stands for either “write everything twice”, “we enjoy typing” or “waste everyone’s time”.
    • It is difficult to manage such code and if the logic changes, then developers have to make changes in all the places where they have written the code, thereby wasting everyone’s time.

More informations for Scrum Testing

More informations for the Scrum PSD certification here.

Leave a Reply

Your email address will not be published. Required fields are marked *