DRY (Don't Repeat Yourself) Principle

DRY (Don’t Repeat Yourself)

Applying the DRY principle is pretty simple. If you find yourself writing the same code more than once, refactor it into an external function or class.