Commenting - good or bad?

Results 1 to 5 of 5

Thread: Commenting - good or bad?

  1. #1
    Join Date
    Dec 1969

    Default Commenting - good or bad?

    Hi,<BR>Any suggestions on how many lines to limit comments to in asp pages and vb components - is there any effect of extensive commenting on the speed? <BR>Thanks,<BR>Rosa.<BR>

  2. #2
    Join Date
    Dec 1969

    Default Both

    I&#039;ll get crap for this, but this is what I do:<BR><BR>Only comment things that aren&#039;t blatantly obvious. For instance:<BR><BR>Dim x &#039;intialize variable<BR><BR>Can you say "duh"??? There are some tricky things the program does, and I will comment them heavier. A judgement call. Oh, and before every function or sub, I describe it like so:<BR><BR>&#039; Function Name: blah<BR>&#039; Input Parameters: None<BR>&#039; Function Returns: integer, number of beers<BR>&#039; Description: Calculates how much beer I need<BR><BR>As with all things, it&#039;s personal preference though.

  3. #3
    Heaven's Martini Guest

    Default RE: Both

    Whoa,<BR><BR>You overcommenting bad speller, *intialize*<BR><BR>I would say, if you like inflicting pain on yourself and others, comment as little as possible.<BR><BR>DG the "KB" look alike over comments. the function name is pretty frickin obvious, what the parameters are supposed to be has some relevance. Anything *tricky* should be commented.<BR><BR>but initializing variables is not *tricky*

  4. #4
    Join Date
    Dec 1969

    Default Didn't see this one

    Until now.<BR><BR>Of course I don&#039;t comment variables... that&#039;s what I was pointing out.<BR><BR>I got the function naming thing from the javadoc... wish VBScript had it (the /** */) syntax.

  5. #5
    Heaven's martini Guest

    Default RE: Didn't see this one

    Hmm<BR><BR>Well, nonetheless, in my c++ days we had header files, it the made sense to explain the function completely, but i simply hate writing header files until my project is done, they become incorrect , just like comments in code do over time, unless you are extremely disciplined to always remember to change your comments

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts