30

Keeping old and unused code blocks commented out and not deleting them immediately is the equivalent of leaving that bottle of soy sauce in the fridge even though you know very well that you won't use them ever again.

Comments
  • 2
    I had a manager that used comments for version control. For every change he would have a comment containing date and explanation coupled with a obsolete piece of code.
  • 7
    The fun part is running into someone else's code that they have abandoned and trying to figure out what they were thinking when they wrote that code. This is where a degree in anthropology could come in handy.
  • 0
    When rewriting code I sometimes wrap the old stuff in a function, which is way easier to read than comments. Then delete it later on.
  • 0
    @robbt my experience with both cases: no, it doesn't.
  • 0
    @siksik do you have a degree in anthropology ? I have basically finished my CS degree and only need to take a few courses to get an anthropology degree as well.
  • 1
    @pajaja that is great :D
  • 1
    @robbt I've done quite a bit of it, not completed it, tho :)
Add Comment