Clearing Clutter

Last night I spent several hours in my basement.  I’m at the point now where I am thinking of trading in my beloved truck for something more… economical and earth friendly.  I was thinking a nice mountain bike.  Unfortunately for me, my commute to work involves roads that I barely trust driving on, let alone riding a bike on.  Though I bet I’d get here almost as fast when there’s an extra 15 minutes worth of traffic to battle like this morning.  Like I was saying, I spent several hours in my basement, going through boxes and throwing things away I wouldn’t use again, and generally organizing the things I have left, all in search of the dreaded truck title.  I know what you’re thinking, why is your truck title in boxes in your basement when it should be somewhere safe?  Well, honestly I believe it was either never sent when I paid off my truck or it was stolen from the mailbox (there were quite a number of thefts in the neighborhood at the time), so I was only searching with the idea that maybe I was wrong.  I didn’t find it, which means I’m going to have quite the hassle trying to sell my truck.  Oh well, at least I got a small chunk of my basement mess cleaned.

As I work on my intranet project for DDA, I feel the same way.  I go through lines of ColdFusion code and decide what to throw out, what to save and what to make available for someone else to use.  Lumping together several custom programs into one mega application of usefulness takes a lot of decluttering and rewriting of old code.  Most of what I have, I tend not to throw away, but it will get moved or reworked to fit the style of programming we are going to need for this application to grow.  Since my plan is to make everything except the basic security modular, it means cutting out overhead code and keeping it all neatly packed into its own folder.  This means splitting up my all encompassing CFC files into smaller chunks that I can store with each module, and then called on only the pages that need them.  This way I don’t have to rely on the giant file to contain everything I need, and I don’t have so much overhead as having everything always available.  I’m sure this was the way CFCs were meant to be written, but we can’t always be perfect on the first try…. or sometimes even the second or third.  So as the decluttering goes, it will leave a clean neat base code where custom ColdFusion modules can be added by anyone, as long as they follow some basic rules.  This will help move our programming department toward the goal of a larger, more productive system.