You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Kathey Marsden <km...@sbcglobal.net> on 2006/08/10 19:01:40 UTC
Upcoming code convention vote (was Re: [jira] Commented: (DERBY-1363)
Derby should publish a well defined coding convention per the db project
guidlines)
Kathey Marsden wrote:
> Do we need a formal vote?
I think that we should probably have a formal vote now on the wording
and at least get formal +1 votes from a few committers. If later there
are changes to the code that make the note about the existing code not
necessary, then that code change can go through the normal code
submission channels and that wording removed without controversy or vote
I think. The vote text will look like this:
Subject : [VOTE] Approve coding conventions for the Derby project
This is a vote to define the coding conventions for the Derby project
per the db project guidelines http://db.apache.org/source.html
Derby uses the "Code Conventions for the Java Programming Language"
(http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html) with space
indentation (no tabs). One variation is that Derby does not discourage
deferring variable declaration to the first use. Lines should be
limited to 80 characters and @author tags should not be used at all.
Note: There is a great deal of existing code that does not match this
convention. Changes to existing code should match the surrounding code
for readability, matching tabs or spaces as appropriate (see Tabs) .
Patches should not have white space diffs. Code and diffs should be
readable in context.
[+1] Adopt the coding convention described.
[-1 ] Do not adopt the coding convention described.
Any objections to the content or wording that need further discussion?
Any objections to starting a vote tomorrow morning and closing Tuesday
4pm PST?
I'll post for vote tomorrow if I don't hear anything.
Kathey
Re: Upcoming code convention vote
Posted by Yip Ng <yi...@gmail.com>.
I think this is fine. Once this coding convention is finalized, the wiki
page http://wiki.apache.org/db-derby/DerbyContributorChecklist should be
updated.
Yip
On 8/10/06, Bryan Pendleton <bp...@amberpoint.com> wrote:
>
> > I think that we should probably have a formal vote now
>
> This seems fine to me.
>
> I suggest reformatting the main paragraph to make it slightly more
> explicit
> that we are adopting these conventions incorporating these amendments. So
> I am suggesting something like this:
>
> Derby uses the "Code Conventions for the Java Programming Language"
> (http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html) with these
> amendments:
> - space indentation (no tabs).
> - Derby does not discourage deferring variable declaration to the first
> use.
> - Lines should be limited to 80 characters
> - @author tags should not be used at all
>
> Note: There is a great deal of existing code that does not match this
> convention. Changes to existing code should match the surrounding code
> for readability, matching tabs or spaces as appropriate (see Tabs) .
> Patches should not have white space diffs. Code and diffs should be
> readable in context.
>
>
> thanks,
>
> bryan
>
>
Re: Upcoming code convention vote
Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I think that we should probably have a formal vote now
This seems fine to me.
I suggest reformatting the main paragraph to make it slightly more explicit
that we are adopting these conventions incorporating these amendments. So
I am suggesting something like this:
Derby uses the "Code Conventions for the Java Programming Language"
(http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html) with these
amendments:
- space indentation (no tabs).
- Derby does not discourage deferring variable declaration to the first use.
- Lines should be limited to 80 characters
- @author tags should not be used at all
Note: There is a great deal of existing code that does not match this
convention. Changes to existing code should match the surrounding code
for readability, matching tabs or spaces as appropriate (see Tabs) .
Patches should not have white space diffs. Code and diffs should be
readable in context.
thanks,
bryan
Re: Upcoming code convention vote (was Re: [jira] Commented: (DERBY-1363)
Derby should publish a well defined coding convention per the db project
guidlines)
Posted by Kathey Marsden <km...@sbcglobal.net>.
Suresh Thalamati wrote:
>
> Is it really necessary to use TABS on an existing code files with the
> tabs. I am wondering if it would be ok to use 4/8 spaces instead to
> match the surrounding code.
>
Most folks set their editors to have 4 space tabs , so if you use a 4
space tab it looks ok, but if you cat the file or look at a visual
diff the tabs are 8. So, we end up with patches like the one I just
looked at, DERBY-1456 where the indentation is off when you diff the
files. If you used 8 spaces instead of a tab, of course things would be
ok for the cat or the diff, but off for the folks that set their tabs to
4. The procedure outlined in the Tabs section of the
ContributorChecklist[1] I think will work to make sure that code looks
ok in both contexts.
The mixed tab/space mess is what Francois calls an "infection" and I
agree. My hope is that after the convention is approved, we can go on
to talk about an ultimate resolution for that problem . I think this
means reformatting the code on all the branches and removing the Note in
the convention, but that is a fodder for a subsequent discussion and
*not* part of this vote, just a bit of hope I have for the future.
Kathey
[1] http://wiki.apache.org/db-derby/DerbyContributorChecklist
Re: Upcoming code convention vote (was Re: [jira] Commented: (DERBY-1363)
Derby should publish a well defined coding convention per the db project
guidlines)
Posted by Suresh Thalamati <su...@gmail.com>.
Kathey Marsden wrote:
> Kathey Marsden wrote:
>
<snip ..>
> Note: There is a great deal of existing code that does not match this
> convention. Changes to existing code should match the surrounding code
> for readability, matching tabs or spaces as appropriate (see Tabs) .
Is it really necessary to use TABS on an existing code files with the
tabs. I am wondering if it would be ok to use 4/8 spaces instead to
match the surrounding code.
Thanks
-suresh