Eliminate the Cruft

on 04 November 2009

Packing for a move across the country from Gainesville, FL to Indianapolis has got me thinking about something (other than the fact that I may be crazy for moving to Indianapolis in November). You see, in my past life, I was a pack rat. And I was that especially dangerous type of pack rat that's also an engineer and therefore finds it necessary to hold onto every piece of electrical or mechanical equipment that could one day be used to build an automated egg fryer (see "Honey, I Shrunk the Kids" for reference) or a scale replica of Beijing or whatever other “weekend” project I swear I'm gonna do one day. Needless to say, I had a lot of junk. But that's the old me. That was me v1.0, or maybe it was v1.5, but it wasn't the new(ish) me (with added cupholders!).

The new me hates all that accumulated shit. But unfortunately, the new me is still stuck with a lot of it. So I've spent the past few days going through it and getting rid of the stuff I truly don't need and setting aside the valuable stuff that I don't need to be sold later, and re-storing the stuff I may still need one day. And I feel much better about it. The new me can fit all of his possessions into a 4'x8' U-Haul trailer.

The reason I'm writing about this on a programming blog is because I've also spent the last few weeks eliminating cruft from the website of one of my clients. Having had several designers work on their site over the past few years, there was a lot of it. No one seemed to have taken the time to clean up their code, delete old files, reorganize the file structure, or anything like that. It was a mess. It took hours to clean it all up, and despite the fact that these fixes are completely unnoticeable to their customers, or even my clients to some extent, I feel great about it. The end result is that the site will now be much easier to maintain, and will save my client money in the long run.

The lesson here is not that we should go back and clean up all of our old, messy code (though we should), but rather that we shouldn't let the cruft accumulate in the first place. When a site needs to changes, it's easy to make the fix and tell yourself that you'll clean it up tomorrow when things have slowed down. But there's no shortage of fires to put out, and the chances you'll actually have time to get back to it later are next to none. And the more you put it off, the harder it gets to make changes in the future.So do yourself a favor and get rid of the cruft before it accumulates. We'll all be happier and more productive with less clutter in the world.