jordan.terrell
Just trying to make sense of things...

Please, Delete Your Code

Wednesday, 5 September 2007 15:45 by jordan.terrell

I'm on a project right now that is very large and take quite the mental footprint to wrap your head around it.  This is exacerbated further by the fact that over the years (yes, I said years) that the majority of the developers who have working on the project have a fear of deleting any lines of code or code files that are no longer in use, but instead leave them in place, commented out.  Sometimes there are entire files and entire SUBSYSTEMS that have been commented out, and left to rot in the project tree.

Now, before you start to call me crazy, I'm not talking about permanently loosing code.  That would be foolish and irresponsible.  I'm talking about source code that is stored on a version control platform (e.g. Subversion, CVS, Perforce).  If your not using version control, I recommend you start using it immediately - even if you are a one-developer team. But if you are using version control, there is no point in keeping thousands of commented lines of code in a project files when you can go into version control and retrieve code that you've deleted at a later time.

So here is my plea: PLEASE, delete (not obliterate) the code you are no longer using!