False Laziness

"False Laziness" inverts the proper "pay me now or pay me later." Just like mortgages, if you pay the prices up front the your later costs are reduced. You can slap together something quickly that will pain you for years, or you can spend the marginally greater effort required to build the process up correctly.

I've inherited code from contractors who obviously have never had to maintain their own work. Of the many mistakes they've made (e.g. copious use of cut and paste), the one that shows up false laziness best (IMHO) is their build process.

To change a single HTML page, you need to

  1. check out the code locally.
  2. make your change
  3. copy the code to the dev server because the COM objects don't work right locally
  4. repeat until you're happy.
  5. check in the code
  6. copy your new file into the build directory
  7. modify some XML file in the same directory. Make sure you spell everything right.
  8. run the build "process" and fix the problems.

This is to build a single new HTML file. The benefit, of course, is that you are only blasting one file across the net. One (much) better solution is:

% rm -rf *

% cvs get HTMLproject

and you're done. Yes, you're getting out all of the source at one time, but we're talking about 15MB's at a time... it takes maybe 90 seconds and it can be run from cron or scheduler or whatever.

By being "lazy" in only copying over one file, I pay the price of a fragile, eight step process. By being "unlazy" and copying over everything, I can be truly lazy and never have to touch the process again.

CopyAndPaste is a very common form of FalseLaziness. Rather than stop and ReFactor, just copy and paste, and modify maybe a bit.


EditText of this page (last edited November 26, 2014) or FindPage with title or text search