Commenting out unneeded code instead of deleting it.

  • 7
    Ha I'm with you on that, or should I say the team I work with is, we have 1.5 million lines of code for our web app and probably 1 mil+ of commented code, or code we move into a retired folder lol
  • 8
    @Nojil yikes! You could repackage it as it's own product 😀
  • 4
    Okay, why is this bad? 😐
    I've been doing this, like forever.
  • 1
    That would be great if my small company wasn't so attached to coldfusion :/ lol
  • 5
    @A-0-C Best practice is to use git
  • 1
    @Jasey or when the client will (cause he WILL) change his mind after having changed his mind after having changed his mind.... Oops sorry forgot a nested call inside a while true there :P
  • 2
    You'll need it some day.... or it gives the next poor soul who takes over the code an easy way to see how the code came to be so messed up... wait #2 might not be a good thing but I've seen it all the time in the code I have to fix....

    I'm usually the poor soul :(
  • 1
    "since I know they are going to want this later"
  • 1
    OMG, this one drives me crazy. Delete it already :)
  • 0
    I do this too! I think it's OK if you also write in an expiration date.
  • 4
    the moment when you know git can easily bring up that code portion, but psychologically you just can't move on and delete it
  • 2
    Holy shyt i could not think of a single bad habit all last week and i am sooooooo guilty of this, its my favorite thing to do.
  • 2
    Git much?
  • 1
    "I might need you later" or "I can't leave you behind now old friend" or something like that is along the lines of what I always think when I can't bear to just get rid of the old code
Add Comment