db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oystein Grovlen - Sun Norway <Oystein.Grov...@Sun.COM>
Subject Re: [VOTE] Approve coding conventions for the Derby project
Date Fri, 18 Aug 2006 13:20:56 GMT
Rick Hillegas wrote:

 > Clarity is the key goal of Derby's coding standards. The coding
 > guidelines at
 > http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html are a style
 > primer, not a law book. Mine this document for good examples but use
 > your common sense. Feel free to disregard any advice which is religious
 > in nature or which would make your code brittle. Above all else, write
 > clearly.

As others have stated, the reason for having coding standard is that
the code will be easier to read if the same style is used everywhere.
It is the same reason that words have a defined spelling.  It makes
documents much easier to read than if everyone came up with their own
spelling.  In that light, your statement is similar to the following:

            "The Webster's Dictionary is a spelling primer, not a law
            book.  Mine this document for good examples but use your
            common sense."

I think most people would accept this statement, but most people will
also feel that it is "common sense" to just follow the standard and
not come up with their own private spellings.

I do not agree that the coding guidelines contain "advice which is
religious in nature".  Coding guidelines are about picking one way of
many possible ways of doing things, and it is more important that one
single way is picked than that a particular way is picked.  In my
opinion, it becomes "religious" when people insist on doing it one
particular way and are not willing give up their ways for a common

Personally, I feel that the rule that tab and space usage should match
surrounding code is problematic.  It will create a lot of hazzle to
switch back and forth between tabs and spaces.  The argument seems to
be that this is necessary in order to be able to use tools where the
tab-width can not be configured.  However, for most tools one can
solve this by redirecting the output to a file and look at that file
in a editor that has a configurable tab-width.  Anyhow, I am willing
to adjust to that practice if that is needed to get a common standard.


View raw message