Rules of Progamming: Don't Repeat Yourself
If you have to write the same code or almost the same code more than once in a project, there's something wrong.
DRY (Don't Repeat Yourself) is one of the most important principles in software development, aiming at reducing code, making it easier to maintain code.
Next time, if you find yourself copying and pasting code, ask yourself: can I refactor this code and make it more efficient?
Rule #6 of programming:
Don't Repeat Yourself
Hey, you can even get this on a shirt!