Reasons for code bloat

Maintaining the code in projects that have been in the hands of several people before you is almost always a pain. Trying to make sense of the front-end code used by a CMS is, in my experience, always a huge time-waster. Cleaning up HTML, CSS, or JavaScript created by people who don’t know HTML, CSS, or JavaScript is another non-favourite pastime of mine.

The reason all those things are no fun is very often code bloat. We’ve all seen it, and we’ve all been guilty of creating it.

What causes code bloat though? I haven’t thought a whole lot about that, but Chris Heilmann apparently has, since he held a presentation on the subject at the Web Standards Group London Meetup on May 16, 2007.

In the presentation, which by the way is so funny I laughed until my stomach hurt, Chris brings up the following reasons for BECS - Bloated Embarrassing Code Solutions:

  1. Wrong perception of time needed to accustom ourselves to a project
  2. Maintenance without using the right tools
  3. Bad or non-existent documentation
  4. People do not read or look before they start
  5. Lack of awareness
  6. Failure to specialize
  7. Lack of a front-end build process

Links to the slides, speaker notes, and a podcast can be found in Chris’ post Seven Reasons for Code Bloat - My presentation for the WSG London Meetup.

Posted on June 4, 2007 in Coding, JavaScript, CSS, (X)HTML