• (nodebb)

    No, no, no, no, no, no. Purge the evil from among your codebase.

    If you leave it there, then one day someone will have a problem, find this code, and the frist thing they'll say is "That can't be right. Some fool named GRH commented out the code and then forgot to reinstate it."

  • (nodebb)

    For shame, GRH!

    To be clear, without the commented out lines, the last part of the function is this:

            Try
            Catch ex As Exception
    
            End Try
    
  • Zatapatique (unregistered)

    Smart move to keep these plain text passwords in the code base, GRH! What can be more secure?

  • (nodebb) in reply to Paddles

    Yeap. But I have seen people say it's easier (WTF???) to see commented out code in the file than to just go back in version control. Same with people who insist on having changelogs in the code because you don't have to look into version control to see who changed what.

  • (nodebb) in reply to DocMonster

    In my experience, those people are also ones who learned programming before version control was a thing. You never delete; Only comment it out. Because learning how to search the history is harder than just reading the comments.

  • (nodebb) in reply to colejohnson66

    The problem is that when code is deleted, you don't know there used to be something there, so you wouldn't even know to run blame on that block of code to see who removed it.

    A compromise could be to replace it all with a comment saying "Removed a bunch of useless code here".

  • DQ (unregistered) in reply to colejohnson66
    Comment held for moderation.
  • (nodebb) in reply to Barry Margolin

    Sometimes I do see the benefit of the change log (in stored procedures for example it's MUCH easier to see a comment up top what was changed than dig through version control) but a lot of times it's just an excuse to keep old code "in case we need it"

  • (nodebb) in reply to DocMonster

    To which the answer is "well, if we need it, we'll dig it out of the old versions in version control."

Leave a comment on “Trophy Bug Hunting”

Log In or post as a guest

Replying to comment #:

« Return to Article