You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2006/02/23 20:39:28 UTC

[Db-derby Wiki] Update of "DerbyContributorChecklist" by RichardHillegas

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by RichardHillegas:
http://wiki.apache.org/db-derby/DerbyContributorChecklist

------------------------------------------------------------------------------
  ||Copyright Notice||Every java file in your patch must start with the Apache [http://www.apache.org/licenses/LICENSE-2.0.html#apply  copyright notice]. See the existing Derby Java files for examples. ||
  ||Tests||Don't forget to include regression tests with your patch.||
  ||Coding Standards||The Derby community has not approved a common body of coding standards. Individual contributors have found the following standards useful: [http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html  Java Coding Standards] and [http://wiki.apache.org/geronimo/CodingStandards  Geronimo Coding Standards].||
+ ||Comments||Make sure you comment your code.||
+ ||Tabs||Set your tabs at 4 spaces. This was the original Cloudscape convention. With this setting your code should look readable.||
  

Derby code convention (was: Re: [Db-derby Wiki] Update of "DerbyContributorChecklist" by RichardHillegas)

Posted by John Embretsen <Jo...@Sun.COM>.
Thursday, February 23, 2006, 9:01:08 PM CET, Kristian Waagan wrote:

> Apache Wiki wrote:
>> Dear Wiki user,
>> 
>> You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.
>> 
>> The following page has been changed by RichardHillegas:
>> http://wiki.apache.org/db-derby/DerbyContributorChecklist
>> 
>> ------------------------------------------------------------------------------
>>   ||Copyright Notice||Every java file in your patch must start with the Apache [http://www.apache.org/licenses/LICENSE-2.0.html#apply  copyright notice]. See the existing Derby Java files for examples. ||
>>   ||Tests||Don't forget to include regression tests with your patch.||
>>   ||Coding Standards||The Derby community has not approved a common body of coding standards. Individual contributors have found the following standards useful: [http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html  Java Coding Standards] and [http://wiki.apache.org/geronimo/CodingStandards  Geronimo Coding Standards].||
>> + ||Comments||Make sure you comment your code.||
>> + ||Tabs||Set your tabs at 4 spaces. This was the original Cloudscape convention. With this setting your code should look readable.||
>>   

> Hi,

> I know the issue has been discussed before, but is it deliberate that 
> the checklist does not specify whether it is preferred to use tabs or 
> spaces for indentation?


I think the checklist comment on tabs needs to be changed/improved. In
fact, although we have not agreed upon a coding standard, I believe
there are some elements of such a standard that we definitely should
discuss and make "recommended practice" for derby contributors. Some
elements are (IMHO) ready for inclusion on the wiki (I'll add them later
if somebody else does not beat me to it, or disagree), while others are
subject to further discussion:


* White space - Tabs vs. spaces, length of tabs/"tabs", new code vs.
existing code (mixing tabs and spaces, or stick to whatever is in
there), etc.

* Line lengths - It seems that some reviewers/committers strongly
encourage contributors to wrap lines that are longer than 80 characters.
I think we should decide whether or not this should be a general policy
that we want to follow, and let people know by including this on the
wiki and/or the website.

* Comments/JavaDoc - Proper (up-to-date and correct) JavaDoc for all (?)
modified/added methods, classes, fields, including @param and @return
tags where appropriate, should be encouraged. I think it is necessary to
be this specific since people tend to forget these things, causing
delays and distracting the reviewers from the actual code changes.
Simply saying "Comment your code" on the wiki is not enough, in my
opinion.

* Copyright notice - It seems to me that we need to add some information
to the wiki checklist about updating the year in the copyright
statement, depending on when the file was created and last updated.

* No author tag - I guess everybody agrees on this now?


I think deciding upon a "recommended practice" to follow will save us
all some time in the long run, especially as we are getting closer to a
new release. I'll appreciate other's opinions on this.


-- 
John


Re: [Db-derby Wiki] Update of "DerbyContributorChecklist" by RichardHillegas

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Kristian,

Some responses follow. Cheers-Rick


>>
>> ------------------------------------------------------------------------------ 
>>
>>   ||Copyright Notice||Every java file in your patch must start with 
>> the Apache [http://www.apache.org/licenses/LICENSE-2.0.html#apply  
>> copyright notice]. See the existing Derby Java files for examples. ||
>>   ||Tests||Don't forget to include regression tests with your patch.||
>>   ||Coding Standards||The Derby community has not approved a common 
>> body of coding standards. Individual contributors have found the 
>> following standards useful: 
>> [http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html  Java 
>> Coding Standards] and 
>> [http://wiki.apache.org/geronimo/CodingStandards  Geronimo Coding 
>> Standards].||
>> + ||Comments||Make sure you comment your code.||
>> + ||Tabs||Set your tabs at 4 spaces. This was the original Cloudscape 
>> convention. With this setting your code should look readable.||
>>   
>
>
> Hi,
>
> I know the issue has been discussed before, but is it deliberate that 
> the checklist does not specify whether it is preferred to use tabs or 
> spaces for indentation?

The checklist is trying to stay neutral and not recommend policies which 
the community hasn't agreed yet.

>
> While I'm at it, if we say spaces are preferred over tabs, is it okay 
> to contribute patches that (only) fix indentation for individual files?
> The primary reason for doing this (for me) is that files that mix 
> space and tab indentation can result in very ugly diffs.
>
> As mentioned earlier, most editors/IDEs are able to cope with this 
> issue, so it's no problem when working with the code in these tools.
>
I seem to recall from the last discussion of this issue: There was some 
concern that large-scale cosmetic changes would complicate the porting 
of bug fixes from unscrubbed branches and from other in-flight 
subversion clients. Maybe we could address this problem by homogenizing 
the mainline just before we cut the next branch. We might have enough 
time to agree on a policy by then.

Re: [Db-derby Wiki] Update of "DerbyContributorChecklist" by RichardHillegas

Posted by Kristian Waagan <Kr...@Sun.COM>.
Apache Wiki wrote:
> Dear Wiki user,
> 
> You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.
> 
> The following page has been changed by RichardHillegas:
> http://wiki.apache.org/db-derby/DerbyContributorChecklist
> 
> ------------------------------------------------------------------------------
>   ||Copyright Notice||Every java file in your patch must start with the Apache [http://www.apache.org/licenses/LICENSE-2.0.html#apply  copyright notice]. See the existing Derby Java files for examples. ||
>   ||Tests||Don't forget to include regression tests with your patch.||
>   ||Coding Standards||The Derby community has not approved a common body of coding standards. Individual contributors have found the following standards useful: [http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html  Java Coding Standards] and [http://wiki.apache.org/geronimo/CodingStandards  Geronimo Coding Standards].||
> + ||Comments||Make sure you comment your code.||
> + ||Tabs||Set your tabs at 4 spaces. This was the original Cloudscape convention. With this setting your code should look readable.||
>   

Hi,

I know the issue has been discussed before, but is it deliberate that 
the checklist does not specify whether it is preferred to use tabs or 
spaces for indentation?

While I'm at it, if we say spaces are preferred over tabs, is it okay to 
contribute patches that (only) fix indentation for individual files?
The primary reason for doing this (for me) is that files that mix space 
and tab indentation can result in very ugly diffs.

As mentioned earlier, most editors/IDEs are able to cope with this 
issue, so it's no problem when working with the code in these tools.




--
Kristian