Are comments read-only?



  • Found today after looking at a script for the first time:

    # PROCESS_MODE must be CRL
    export PROCESS_MODE=DRT
    

    Are comments read-only or something? I assume a developer modified the value from CRL to DRT at some point in the past, but why didn't they update or remove the comment?



  • Pretty common, I've seen comments that refer to code that, according to our SVN repo, was removed ages ago. Bad comments are usually worse then no comments at all because they are misleading, and people have a tendency to think they're missing something if the documentation and the code don't appear to jive instantly. 



  • @Michael Casadevall said:

    Bad comments are usually worse then no comments at all...

     

    Maybe if you're a bad programmer and don't know what the hell you're doing!



  • @TheDude said:

    @Michael Casadevall said:

    Bad comments are usually worse then no comments at all...

     

    Maybe if you're a bad programmer and don't know what the hell you're doing!

    Haha!  Funny, The Dude!  Now just remind me what CRL and DRT represent.  Make sure the door doesn't hit you on the ass when you leave.



  • @TheDude said:

    @Michael Casadevall said:

    Bad comments are usually worse then no comments at all...

     

    Maybe if you're a bad programmer and don't know what the hell you're doing!

     

     

    So you'd perfer downright wrong and misleading information compared to no information (aside frm the source code itself?) 



  • Bah, who needs comments anyway?

    The code is the documentation! 



  • @Michael Casadevall said:

    @TheDude said:

    @Michael Casadevall said:

    Bad comments are usually worse then no comments at all...

     

    Maybe if you're a bad programmer and don't know what the hell you're doing!

     

     

    So you'd perfer downright wrong and misleading information compared to no information (aside frm the source code itself?) 

     

    I'd say the OP's original comment would be pretty useful in assessing the cause of a bug....



  • Sorry, offtopic: No, it's just another troll. Reminds me an awful lot of that other troll "Dude" that was active a few weeks ago (and probably banned).



  • @Kefer said:

    Sorry, offtopic: No, it's just another troll. Reminds me an awful lot of that other troll "Dude" that was active a few weeks ago (and probably banned).

     

    FTFY



  • @mxsscott said:

    # PROCESS_MODE must be CRL
    export PROCESS_MODE=DRT

    Are comments read-only or something?

     

     Without knowing any context I’d rather assume that this comment is write-only.



  • @ActionMan said:

    Bah, who needs comments anyway?

    The code is the documentation! 

    I tend to say that, too. But not because nobody might need comments, but rather because very often, comments are out-of-date almost as soon as you finish typing -- and, worst of all, are very rarely revisited and corrected (well, the compiler doesn't care about misleading comments, right?)

    I particularly hate comments that are automatically generated by some IDE such as

    // Method Xyz:insert witty description of the purpose of this method here

    because these comments tend to NEVER be replaced with witty descriptions of the purpose of said method...



  • @TheRider said:

    @ActionMan said:

    Bah, who needs comments anyway?

    The code is the documentation! 

    I tend to say that, too. But not because nobody might need comments, but rather because very often, comments are out-of-date almost as soon as you finish typing -- and, worst of all, are very rarely revisited and corrected (well, the compiler doesn't care about misleading comments, right?)

    I particularly hate comments that are automatically generated by some IDE such as

    // Method Xyz:insert witty description of the purpose of this method here

    because these comments tend to NEVER be replaced with witty descriptions of the purpose of said method...

     

    No matter what you all say, I stand by my original comment.  If you don't have the skills to figure out the logic involved, maybe you should go back to school and pay attention next time you take a CIS 101 class. 



  • @TheDude said:

    No matter what you all say, I stand by my original comment.  If you don't have the skills to figure out the logic involved, maybe you should go back to school and pay attention next time you take a CIS 101 class. 
     

    Still nothing but a moronic troll, I see. Maybe this incarnation of "Dude" will get banned soon too.

    I really don't know why idiots like you who obviously know nothing about programming even bother to come here. Maybe you're hoping you can get some skills by just pretending? It won't work. You don't have the brains for it.

    Give up and go on back to whatever you did before you learned about this site and started trolling here. 


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.