The Don’t Repeat Yourself (DRY) principle
is another important principle that a professional coder must follow when he writes a piece of code for an application. The Single Responsibility Principle (SRP) and Open/Closed Principle (OCP) principles that you learned in Chapter
4 are related to the DRY principle. We came to know about this principle from Andy Hunt and Dave Thomas in their famous book,
The Pragmatic Programmer. In this book, the DRY principle is stated as follows:
Every piece of ...