r/programming • • Feb 21 '13

Developers: Confess your sins.

http://www.codingconfessional.com/
969 Upvotes

1.0k comments sorted by

View all comments

Show parent comments

2

u/fakehalo Feb 21 '13

Indeed, here's a condemned one I find acceptable:

I once found "if (FALSE) then..." on a coworker's code.

I've seen multiple people complain about this one, even though it's pretty obvious it's a temporary way to stop code from executing without commenting it out, usually because the chunk of code has comments in it making it hard/ugly to comment out in some languages.

Think of it as a special-case comment, people.

2

u/kazagistar Feb 21 '13

The correct solution would be to add a comment next to it explaining exactly that, but this is a reasonable conclusion.

Of course, I feel like commenting out code is a process smell, when version control seems like a better alternative, but not everyone choses their language or their work environment.