Click here to Skip to main content
15,887,214 members

Survey Results

Are you a Code Hoarder?

Survey period: 24 Jun 2013 to 1 Jul 2013

Do you have difficulty getting rid of unused or obsolete code? (Suggested by Andreas Gieriet)

OptionVotes% 
inactive code can be useful in the future, so I comment it out instead of removing46340.51
Inactive code clutters up active code, so I remove it instead of simply commenting it out68059.49



 
GeneralRe: I've seen worse... Pin
Nelek23-Jun-13 23:42
protectorNelek23-Jun-13 23:42 
GeneralRe: I've seen worse... Pin
Ashley van Gerven24-Jun-13 15:34
Ashley van Gerven24-Jun-13 15:34 
GeneralRe: I've seen worse... Pin
AlexCode24-Jun-13 23:46
professionalAlexCode24-Jun-13 23:46 
GeneralRe: I've seen worse... Pin
dan!sh 24-Jun-13 23:07
professional dan!sh 24-Jun-13 23:07 
GeneralRe: I've seen worse... Pin
AlexCode25-Jun-13 0:07
professionalAlexCode25-Jun-13 0:07 
GeneralDoes it what is Source Control for... Pin
n.podbielski23-Jun-13 21:55
n.podbielski23-Jun-13 21:55 
GeneralBoth... Pin
Mehdi Gholam23-Jun-13 21:10
Mehdi Gholam23-Jun-13 21:10 
GeneralNo no no no no no no no no... Pin
Sander Rossel23-Jun-13 20:12
professionalSander Rossel23-Jun-13 20:12 
I have some co-workers who do.
It bugs me a great deal seeing commented out code and it makes me think "is this obsolete or is this intended to be used at a later time?".
It obfuscates code that does matter, especially other comments.
There's a reason it's commented out and that reason is probably that the code didn't work or that the specs have changed and you don't need it anymore. There is no reason to keep it around.
Old code will always be available through source control.

Please just delete old and unused code. If you really think you'll need it someday again just keep it in a personal text file or something.
It's an OO world.
C#
public class Naerling : Lazy<Person>{
    public void DoWork(){ throw new NotImplementedException(); }
}

GeneralThat's what version control is for Pin
CDP180223-Jun-13 19:04
CDP180223-Jun-13 19:04 
GeneralRe: That's what version control is for Pin
AlexCode23-Jun-13 22:59
professionalAlexCode23-Jun-13 22:59 
GeneralRe: That's what version control is for Pin
ed welch24-Jun-13 10:12
ed welch24-Jun-13 10:12 
GeneralRe: That's what version control is for Pin
CDP180224-Jun-13 10:48
CDP180224-Jun-13 10:48 
GeneralMake a dated backup first Pin
DaveX8623-Jun-13 18:50
DaveX8623-Jun-13 18:50 
GeneralHow many times we follow commented code ? Pin
koolprasad200323-Jun-13 18:20
professionalkoolprasad200323-Jun-13 18:20 
GeneralRe: How many times we follow commented code ? Pin
CDP180223-Jun-13 19:10
CDP180223-Jun-13 19:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.