Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 91794 invoked from network); 24 Feb 2006 10:22:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 Feb 2006 10:22:14 -0000 Received: (qmail 41609 invoked by uid 500); 24 Feb 2006 10:22:13 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 41551 invoked by uid 500); 24 Feb 2006 10:22:12 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 41541 invoked by uid 99); 24 Feb 2006 10:22:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2006 02:22:12 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.43] (HELO brmea-mail-2.sun.com) (192.18.98.43) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2006 02:22:11 -0800 Received: from phys-gadget-1 ([129.156.85.171]) by brmea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id k1OALo8u013410 for ; Fri, 24 Feb 2006 03:21:50 -0700 (MST) Received: from conversion-daemon.gadget-mail1.uk.sun.com by gadget-mail1.uk.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) id <0IV600K01SRV5Z@gadget-mail1.uk.sun.com> (original mail from John.Embretsen@Sun.COM) for derby-dev@db.apache.org; Fri, 24 Feb 2006 10:21:50 +0000 (GMT) Received: from d-etro01-112-161.Norway.Sun.COM (d-etro01-112-161.Norway.Sun.COM [129.159.112.161]) by gadget-mail1.uk.sun.com (iPlanet Messaging Server 5.2 HotFix 1.24 (built Dec 19 2003)) with ESMTP id <0IV6004D5SSCXH@gadget-mail1.uk.sun.com> for derby-dev@db.apache.org; Fri, 24 Feb 2006 10:21:50 +0000 (GMT) Date: Fri, 24 Feb 2006 11:20:52 +0100 From: John Embretsen Subject: Derby code convention (was: Re: [Db-derby Wiki] Update of "DerbyContributorChecklist" by RichardHillegas) In-reply-to: <43FE1484.8010401@Sun.com> To: derby-dev@db.apache.org Reply-to: derby-dev@db.apache.org Message-id: <217121167.20060224112052@Sun.com> MIME-version: 1.0 X-Mailer: The Bat! (v3.60.07) Professional Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Priority: 3 (Normal) References: <20060223193928.8637.18255@ajax.apache.org> <43FE1484.8010401@Sun.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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