On 12/18/25 09:40, Peter Flass wrote:
On 12/17/25 20:10, c186282 wrote:
On 12/17/25 14:17, rbowman wrote:
On Wed, 17 Dec 2025 03:11:09 -0500, c186282 wrote:
Probably 50% of the text in my code - doesn't matter which lang
- is
'comments'.
I looked at some of my code and it's pretty much comment free. There
are a
couple of .c files with comments that I reused from another project that
have somebody's comments.
I had a tendency to clone similar projects and inherit some code that I
could tweak so the final executable did one thing well. We had a
couple of
nightmares that originally did one thing well but for the next
project the
programmer said 'That's close to what I need. A few configuration values
here and there and it will work.' The next time around it got some more
configuration values to do something else. I have a Swiss Army knife I
found; it's in the junk drawer.
Well ... I'll better understand, and be able to mod, my
old programs better than you. I find 'excessive' commenting
anything BUT 'excessive'. I *enjoy* writing out the meaning
and implications of almost every step.
I comment *A LOT*. When I had to go back and revisit some very old code,
I wished I had commented more. I've almost never looked at a program and
said "I wish it had fewer comments."
Ah, you live in the Real World :-)
Maybe SOME here have eidetic memory and have
crystal perfect comprehension about how their
huge 1975 COBOL opus worked ...
A few of us need enough detailed comments to
work us through the steps and reasoning again ...
Hmm ... have one Python function floating around
where the actual code is about 6 lines - but
there's about 30 comment lines above it explaining
how/why it works AND little helper comments after
every line :-)
It was a really crushed-down way of splicing one
directory tree into another at the exact right
place - string+math trix - came to me while riding
a motorcycle down an interstate highway. Good for
backup stuff.
BUT, needed to EXPLAIN it to myself, WHY it worked
before I forgot, and there's ONE little gotcha that
needed some elaboration. Did translate it into Pascal
and 'C', but it's bigger in 'C' because of the ruder
string-handling.
I think the Pascal version had a couple extra
lines to get around the gotcha. Gotta look up
some of my old stuff again .....
Anyway, FAR easier to UNDER-comment than OVER-comment.
--
https://mail.python.org/mailman3//lists/python-list.python.org