Always the contrarian, I have a completely different view on
comments...

Comments are the things programmers write intending to make the code
clearer, but they wind up being WRONG most of the time.  Why?  Because
the code changes and the comments don't.

Many studies support this.  Comments that are misleading and wrong are
the norm, not the exception, in a typical software project.  The more
effort put into comments, the more likely they won't be changed as the
code underneath evolves.  "After all," the programmer thinks to
himself, "it's just a small change and the comments are so pretty and
well structured -- nobody will be confused by such a small change in
the code."

It's far better to write the code in as clear a way as possible and
let the code itself, along with carefully chosen variable names, BE
the documentation.  In my day job we have 500,000 lines of Smalltalk
and not one single comment.  Our "project" is small -- only about five
people have ever written code on this system, but we still manage to
handle our own code as well as suggest changes to other folk's by just
reading the code itself.

On Dec 3, 5:28 pm, waTR <r...@devshell.org> wrote:

> Comments in the code I see as the Achilles' heel of this project at
> the moment.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to