• Bejesus (unregistered) in reply to Demanding Hypocrite
    Demanding Hypocrite:
    Beaver:
    Amen to that! Nothing like getting the code all pecker-tracked up with messy comments. Like throwing dirt in an engine.

    Fix it and test it. Use version control software for diffs.

    Absolutely! That way when a change elsewhere causes a break, you have no comments to understand the nuances of the original code and why it expected any particular set of conditions. Way to plan ahead and consider others at the same time!

    Apart from having a complete version history along with a record of who made what change and their commit reason, conveniently attached to the actual version the change was made in instead of obscuring your source and getting out of date with every further changed.

    Never used version control software?

  • (cs) in reply to Bejesus
    Bejesus:

    Why would you need a comment to explain the intent of a method named "calculateMonthlyInterest()" or "suspend()"?

    Simple or compound interest? American or Canadian compounding?

  • Bejesus (unregistered) in reply to AnnCoulter
    AnnCoulter:
    Bejesus:

    Why would you need a comment to explain the intent of a method named "calculateMonthlyInterest()" or "suspend()"?

    Simple or compound interest? American or Canadian compounding?

    If such distinctions are important then the name would reflect that.

    More likely calculateMonthlyInterest() is an interface method for which there are different implementations depending on what you want.

  • Mike (an WTF-Popup contributer - yea!) (unregistered) in reply to Synonymous Awkward
    What language do you use where you can have more than one entry point to a function/procedure? ;-o

    Fortran

  • Charly (unregistered) in reply to PACE
    PACE:
    commenter:
    In my opinion, when commenting code directly, just tell us why you're formatting a zipcode as a float or dividing the social security number by 6, or that a bug was fixed here. There is no real need to duplicate the line of code in English, regardless of what college teaches you. Simple methods don't need block in-line comments.
    I disagree. While simple methods like the one above would not need in-line comments, they're still helpful even if you are not doing something obscure, just toi describe WHAT you are doing - not HOW. So it is easier to find a specific position or work on someone else's code.

    benj

    Respectively but vehemently disagree...

    Comments that do not add content which is NOT easily discernable from the code itself by anyone with HALF the brains required to read code only adds obfuscation and extra redundant and therefore potentially inconsistent crap to what your eye and your brain have to scan over to actually READ the code.

Leave a comment on “The Road to Hell”

Log In or post as a guest

Replying to comment #:

« Return to Article