In programming, a rule of thumb that says if you
need to write the same piece of code twice, you should extract it into a separate method that
you can call from multiple places so you don’t have to write it a third time. (Or a fourth time,
or a fi fth time, and so on.)