1. Preparing your defences
In this chapter, we are going to look ways of avoiding conflict.
2. Preparing your defenses
Basically, we want to avoid creating problems.
We all make mistakes. But let's not make silly avoidable mistakes.
3. Are you wet or dry
DRY is a standard software principal. It simply means: "Do not Repeat Yourself".
In practice, this means avoid copying and pasting. Reuse, where appropriate,
existing tools.
The WET principal - write everything twice - is something to be avoided. If we have the
same piece of code in two places and we find a bug, we have to remember to update both files.
4. The copy and paste rule
I try and follow the copy and paste rule. Doing it once is OK.
Pasting for the second time should raise concerns. On the third occasion something is
definitely up!
5. Functions and for loops
Typically, whenever you find yourself copying and pasting, it's a strong indication that you
should be using a function or a for loop.
6. Let's see this in action
Let's practice