commenting code (was Re: [thelist] Tip)
Erika Meyer
meyer at up.edu
Thu Feb 15 15:02:33 CST 2001
><tip>
>For HTML'ers (and others), comments are great, but don't over do it. If you
>comment your code a lot, END comments are not needed, because the next start
>comment should serve that purpose. Comments should be descriptive, but not
>verbose, and asteriks should be used sparingly.
></tip>
>
>??????????????????
>michael mcglynn
>interface designer
>www.blueripple.com
>??????????????????
Why?
I comment copiously, myself.
I chunk my text (rarely indent) & do beginning & ending comments. I
do ending comments because when you have nested tables, it isn't so
clear where tables are beginning and ending.
For sites that have areas of changing content, I use lots of "plus" signs
like this:
<!-- +++++++++++++++++++++++++++++++++++++++++++ -->
to show a division between dynamic and static content.
but I could use asterisks or even question marks.
I think people have different code commenting & chunking styles...
the goal of course, is clarity & guidance. How the goals are
achieved can differ.
Erika
http://www.seastorm.com/
PS Maybe you don't want to do this on a corporate site, but I
personally like the way sites like http://www.alistapart.com/ are
commented, with curses at Netscape and so forth.
More information about the thelist
mailing list