Re: comments (was Re: A critic of Guido's blog on Python's lambda)





Takehiko Abe wrote:
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.

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. 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

--
Cells: http://common-lisp.net/project/cells/

"Have you ever been in a relationship?"
Attorney for Mary Winkler, confessed killer of her
minister husband, when asked if the couple had
marital problems.
.



Relevant Pages

  • Re: comments (was Re: A critic of Guidos blog on Pythons lambda)
    ... Recall that most people write borribly, ... Finally, if I am now the maintainer of a project, guess what? ... Just reading it puts one to sleep. ...
    (comp.lang.lisp)
  • Machine code for farmers who want their heads to spin.
    ... As I recall sometimes ... > if I wanted to be sure of the representation. ... completely unfit for any form of commercial programming. ... machine code. ...
    (uk.business.agriculture)
  • Re: Non-Scientific Survey of Scientific Calculators
    ... "Chairman" posted this link: ... Mine was the "Sears C2", a 5-function job that ran on house current ... and as I recall I really liked ... I really do use the programming capabilities on my current ...
    (sci.electronics.design)
  • Re: fig-FORTH 1.1 8080 Assembly listing available?
    ... > Silicon Valley FIG meetings every few months as I live 160 km away, ... As I do mostly statistical programming I've moved to MatLab, ... I recall your FIG 6502 listing was a steady seller when Mountain View Press ...
    (comp.lang.forth)
  • HDTV Programs
    ... I finally took the jump off the cliff and picked up a Big Screen DLP HDTV. ... If I recall someone posted a site that lists all programming that is being ...
    (rec.music.artists.springsteen)