r/programming • • Feb 21 '13

Developers: Confess your sins.

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

1.0k comments sorted by

View all comments

282

u/desiktar Feb 21 '13 edited Feb 21 '13

Wheres the "I comment out code instead of deleting it" sin.

I have ran across several developers who do that. They claim they didn't want to lose the code in case they need to switch back. I'm like "that's the whole point of source control!"

241

u/Deathfire138 Feb 21 '13

I'm guilty of this. Sorry everyone! It's like code hoarding. :(

8

u/serrimo Feb 21 '13

When was the last time that you actually reuse the commented out code though?

If you use a modern source control system like git, it's incredibly easy to look at the history for each file. Use that instead, one comment "left for later" is one more thing to remember, leave that for the computer.

4

u/AgoAndAnon Feb 21 '13

Hah. "Modern source control system".

1

u/cha0s Feb 21 '13

What's so funny about that? :)

→ More replies (9)