I'm willing to admit, after reading the recent posts, that
comments
and documentation can be extremely useful. Also that maybe
I
should write them occasionally.
But there seems to be a lot of variation between individual
programmers
which determines their feelings regarding comments. It also
depends on
the language (high or low level -- I can imagine why assembly
language
would require natural language explanations), and the
domain.
The domains I usually work in (e-publishing, e-commerce and
intranet)
may be simpler than domains like graphics or engineering. That
might
explain why I don't need comments or documentation to understand
or
remember my own programs.
Recently I lost an entire program because of a bad disk drive and
had
to re-write it, and I seemed to remember almost every line. No,
I
don't have a photographic memory, but I do have a good memory
for
things that I have focused attention on, even years later. I get
a
sort of holistic, general impression of the entire program
that
stays in my mind, maybe permanently.
Reading another person's code is of course more difficult, and
of
course certain kinds of comments can be useful. But the kind
that
paraphrases the code I consider useless. The examples I gave
were
meant to be parodies, but I have seen some almost that bad
--
not at work, but in free scripts that I had to use and
modify.
Ok, here's are a real example I happened to have around:
' Check if any
files were uploaded
If Uploader.Files.Count = 0 Then
Response.Write
"File(s) not uploaded."
Else
' Loop through the
uploaded files
For Each File In
Uploader.Files.Items
'
Check where the user wants to save the file
If
Uploader.Form("saveto") = "disk" Then
'
Save the file
File.SaveToDisk "E:\UploadedFiles\"
If Uploader.Files.Count = 0 Then
Else
- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED] unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED] help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]
