Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/18/05 18:15
Read: times


 
#85211 - Comments good and evil
Responding to: ???'s previous message
I agree with Erik that the comments should indicate more of the big picture explaining the authors intentions, rather than an explanation of what an instruction does. Also, my own rule is to attempt to use proper English (insert your native language here) including punctuation and capitalization. I'm not an English major, but I prefer the same kind of language in a comment that this message board tries to enforce.

There are two other points to be made about this example though.

  • The first is that since this example is a fairly generic function, the comments by Jan are probably suitable, since there is little more we can infer about the pointers or the function (maybe that's comment enough). If it has more specific characteristics, such as accessing I/O, then that should be explained.
  • The second is that when debugging code, especially someone else's, one needs to take the comments with a grain of salt. The code is really the only truth. The comments might explain what the author is doing, or they might be out of synch, especially after many revisions.


GB


List of 36 messages in thread
TopicAuthorDate
simple serial programs examples            01/01/70 00:00      
   Hello, World            01/01/70 00:00      
      Well, yes but            01/01/70 00:00      
         very basic            01/01/70 00:00      
            My point            01/01/70 00:00      
               basic            01/01/70 00:00      
                  but...            01/01/70 00:00      
         Dear oh dear            01/01/70 00:00      
            Impossible!            01/01/70 00:00      
               Avoiding mistakes            01/01/70 00:00      
                  'C' - the sloppy programmers choice            01/01/70 00:00      
                     bloatware in Pascal, too!            01/01/70 00:00      
                        Go on then....            01/01/70 00:00      
                     Horrible C            01/01/70 00:00      
                        Horrible programmer            01/01/70 00:00      
                           If that's you...            01/01/70 00:00      
                     Author, not the language            01/01/70 00:00      
                        Caveat            01/01/70 00:00      
                        language wars            01/01/70 00:00      
                           Bloat or bugs            01/01/70 00:00      
                        singer, not the song            01/01/70 00:00      
                           verbosit/clarity            01/01/70 00:00      
                              Poor, deluded hackers...            01/01/70 00:00      
                              Commented! :-)            01/01/70 00:00      
                                 re commented            01/01/70 00:00      
                                    Comments good and evil            01/01/70 00:00      
                                    comments            01/01/70 00:00      
                                    A quote from some wise people            01/01/70 00:00      
                                       Good but...            01/01/70 00:00      
                                          why...            01/01/70 00:00      
                                             Very true            01/01/70 00:00      
                                                been there, done that            01/01/70 00:00      
                                    Correct comments :-)            01/01/70 00:00      
                                       fishing in Minnesota            01/01/70 00:00      
                                 Author, not the language            01/01/70 00:00      
                                    bounds checks, error testing, comments            01/01/70 00:00      

Back to Subject List