Cruft is a term widely used in programming circles to indicate code that has gradually become cluttered with redundant or confusing material. It’s the kind of thing that happens when code passes through a succession of maintainers, each with their own particular view on the right way to do things and perhaps sometimes supplementing that with material copied and pasted from other coders. For a time it can work but eventually it makes fixing and adjusting things hard or impossible.
I’m working on an inherited website at the moment that shows some of those features. It is partly based on Bootstrap, a collection of CSS and Javascript that greatly speeds up many web design tasks. However, it was using an old version of the Bootstrap material, items drawn from a range of other sources and a lot of extra things bolted on. For example, many of the CSS classes (meant to apply to multiple elements over multiple pages) were only found bolted onto one element on one page, or even no elements anywhere across the site. I thought I’d got it tidied up enough to accomplish the visual update requested and then discovered that the menus stopped working when the screen was below a certain size.
Today’s task has been to rebuild the content on the most recent version of Bootstrap with very minimal customisations and no extra third-party content. I started by refreshing my Bootstrap skills and creating a template and then I’ve worked that across the pages of the site. Tomorrow, I think I can publish to a hidden directory, test online and make live… and hopefully the site will continue for a while longer in its rejuvenated, cruft-free shininess.