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:
- Wrong perception of time needed to accustom ourselves to a project
- Maintenance without using the right tools
- Bad or non-existent documentation
- People do not read or look before they start
- Lack of awareness
- Failure to specialize
- 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.
- Previous post: Why styling form controls with CSS is problematic
- Next post: Keep HTML and CSS out of my inbox. Please.