Re: comments (was Re: A critic of Guido's blog on Python's lambda)
- From: keke@xxxxxxx (Takehiko Abe)
- Date: Tue, 16 May 2006 00:17:17 +0900
Ken Tilton wrote:
Absolutely. When I take over someone else's code I begin by deleting all
the comments. Then I read the code.
Is this a great programming tip I've never heard before? Or
a mere joke?
Somewhere in between. I do not recall ever sweeping through an entire
code base deleting all the commnets, I just delete them from stretches
of code on which I have to work so I can see the damn code.
Somehow I thought you wrote that you delete code without reading
them. But you didn't. It was in my head.
Recall that most people write borribly, and that natural language is
anyway naturally ambiguous. Note also that comments do not run, code
runs. Comments do not always (often? ever?) get maintained. Some
comments state the obvious, especially for folks from the
comment-every-line school, and do no more than obscure the landscape.
Finally, if I am now the maintainer of a project, guess what? If there
is any non-obvious code I need to understand it, and, yeah, I know how
to read code.
Code only tells what it does. Sometimes it doesn't tell (or is not
obvious) why it does what it does.
Recently I put lots of comments to explain why those ugly codes are
necessary -- it's because of buggy API calls. (They are not my faults.)
And you delete them? I weep. You must give me a chance to explain!
As I said, if the code is not readable, rectification of.
names is an entertaining and insanely productive way of studying code.
Just reading it puts one to sleep.
kenneth
- References:
- comments (was Re: A critic of Guido's blog on Python's lambda)
- From: Takehiko Abe
- Re: comments (was Re: A critic of Guido's blog on Python's lambda)
- From: Ken Tilton
- comments (was Re: A critic of Guido's blog on Python's lambda)
- Prev by Date: Re: Lisp as an Operating System (was: ... as a Scripting Language)
- Next by Date: Re: Lisp as an Operating System (was: ... as a Scripting Language)
- Previous by thread: Re: comments (was Re: A critic of Guido's blog on Python's lambda)
- Next by thread: Re: comments
- Index(es):
Relevant Pages
|
|