opinion on coding standard

T

Tim

"Comments" does not denote fully what you or I mean. Most CSci
curricula discourage any commented text that duplicates what one can
express in code; in contrast, comments that actually convey the purpose
of the code are needed. It is the lack of good design documents that
can be addressed by proper JavaDocs. In a time of Extreme Programming
mythodology, meaningful comments are neccesary to provide design
information due to lack of complete and updated design documents. The
need for development by prototyping is more from bad, new, and unweildy
tools and frameworks rather than any effort at better software
engineering. A lack of comments leaves the follow-on programmer the
detective's task of analyzing the code, the design documents, and other
sources to determine what the author tried to do with the code.

I agree that good variable names are preferable. I cannot defend Java's
naming standards other than say they impose consistency and work with
most word combinations. Other than that I cannot see how they are
better or worse than other coding standards.

For those that support programming without design (programming by
prototyping, extreme programming, or whatever the current fad calls
it), here is a counter argument:
http://www.cs.utexas.edu/users/EWD/videos/NoorderlichtVideo.html

Another statement that is more general to all science is by Tesla that
Edison would, when asked to find a needle in a haystack, prefer to pick
up each needle one by one to see if it were the needle or hay rather
than perform a few basic calculations and determine the probable place
to find the needle. Of course, Edison made a lot more money, is better
recognized, and was one of the most proliferate patenters of US history
while Tesla did not need to employ hundreds of people and has
contributed at least as much to our every day lives as Edison.
TimJowers
 
A

Ann

Tim said:
"Comments" does not denote fully what you or I mean. Most CSci
curricula discourage any commented text that duplicates what one can
express in code; in contrast, comments that actually convey the purpose
of the code are needed. <snip>

One study I heard about several years back demonstrated
that the number of comments per line of code correlated with
the number of errors per line of code independent
of the content of the comments. The study was done on a production
system of over 10M lines.
 
S

steve

One study I heard about several years back demonstrated
that the number of comments per line of code correlated with
the number of errors per line of code independent
of the content of the comments. The study was done on a production
system of over 10M lines.

that could have just been crap programmers, was it microsoft?

personally, I comment such things as:

passed parameter requirements
to do's
possible improvements or expansions to the code block.

does that mean my code is highly bug ridden?
does it mean people using java doc , also write above average bug ridden
code?

don't generalize.

steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,270
Latest member
TopCryptoTwitterChannels_

Latest Threads

Top