Words of wisdom

rob_au on 2003-02-18T11:20:55

Some words of wisdom from Dan Sugalski on PerlMonks ...

  1. If you're going to do something more than twice, make it a function
  2. If you're going to use it in more than two programs, make it a module
  3. If doing it even once made your head hurt, throw it in a module
  4. If it has data you don't want to change yourself, make it work from template files
  5. If the code is could be generated from some sort of parameters, use a templating code generator for it
  6. If it feels like a monkey could do it, check the above list to see what you missed