Code Commenting

by Scott Saad - April 21, 2011

Coder 1: Hey there! Noticed you commented out some code with your recent checkin.

Coder 2: Yes, the code was ancient and not even being used anymore. I whacked it! (karate chop motion)

Coder 1: Well, you commented it out and then added your own comment about why you commented it out.

Coder 2: Yes…?

Coder 1: …

Coder 2: What?

Coder 1: Why didn’t you just delete the old code and be done?

Coder 2: Then the future maintainers of it wouldn’t realize what I had done.

Coder 1: But we’re using source control management… history is preserved for you!

Coder 2: I know, but how would they really know? You know?

Coder 1: … (karate chop motion)

Discussion, links, and tweets

I'm a software geek living and working in Boulder, Colorado. Follow me on Twitter; you'll dig my tweets if you're into that sort of thing.