The D.R.Y Principle.

The D.R.Y Principle. You read that 3 times. And if you haven’t guessed yet, the acronym stands for Don’t Repeat Yourself. Which at this point, is an oxymoron. But now hopefully you’ll remember it because although in coding repeating your code is bad practice, for us humans repetition is key to learning. But a machine doesn’t Learn. We code so that the machine just does. So if you find yourself writing a function that does the same thing as another function you may have a problem. The only time it makes sense to write a function that does the same as another function is if that the two functions are in separate apps. If its something you can Copy & Paste then it isn’t something you need to Copy & Paste. So remember The D.R.Y Principle.