So I’ve been doing a lot of code cleanup as of late. Meaning I’ve been going through a rather large CSS file and trimming the fat, not to mention doing a bunch of theming changes. I really hate commenting things out as a regular practice, as it looks ugly and still takes up space. Now and then, sure, but when you’ve got hundreds of lines of code in a single file all commented out, I just can’t deal anymore. And, sometimes I realise there’s a bit of code that I dumped a month or so ago that I’d like to find again. In theory, version control should save the day. Course, looking at my commit messages in Git is all like “Fixed layout on landing page!” with changes to a bunch of different files (yeah, I’m super organized).
I’m doing some fairly major reskinning in an area of a site right now, and while there’s code I’m perfectly happy to just delete, there are some styles that I get paranoid I might regret sticking on the ole chopping block. Also, I’m paranoid of someone above me down the line getting reminiscent for a certain look that I killed off. So I came up with the idea for graveyard files. I’ve got a file, graveyard.css, where I’ve started pasting in CSS classes I no longer have a need for, but am not ready to just delete yet. Graveyard.css isn’t loaded by any page, it just hangs out in the CSS directory with the rest of the files and keeps them company. It caters to my natural packrat instinct, and helps cut down the anxiety that comes with deleting several hundred lines of code.
I’ll be starting a graveyard.js pretty soon as well, as I’ll be cleaning up from some functionality that’s been disabled. And, because every JS directory needs a spare closet.