Return-Path: Delivered-To: apmail-incubator-geronimo-dev-archive@incubator.apache.org Received: (qmail 92501 invoked by uid 500); 13 Aug 2003 12:48:10 -0000 Mailing-List: contact geronimo-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: geronimo-dev@incubator.apache.org Delivered-To: mailing list geronimo-dev@incubator.apache.org Received: (qmail 92444 invoked from network); 13 Aug 2003 12:48:09 -0000 Received: from unknown (HELO vsgw.ferguson.com) (65.207.58.147) by daedalus.apache.org with SMTP; 13 Aug 2003 12:48:09 -0000 Received: from fei0018m020.hq.ferg.com ([172.16.105.19]) by vsgw.ferguson.com with SMTP id M2003081308480900712 for ; Wed, 13 Aug 2003 08:48:09 -0400 Received: from fei0018m001.hq.ferg.com ([172.16.105.14]) by fei0018m020.hq.ferg.com with Microsoft SMTPSVC(5.0.2195.6713); Wed, 13 Aug 2003 08:48:09 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Suggested coding convention: sort methods Date: Wed, 13 Aug 2003 08:48:09 -0400 Message-ID: <12699E67B31DA44EBC6EFBB4C62F45355B64E7@fei0018m001.hq.ferg.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Suggested coding convention: sort methods Thread-Index: AcNhmCPG4DR6ghX3STWH58iF1BCKLAAAEp0QAAARG7A= From: To: X-OriginalArrivalTime: 13 Aug 2003 12:48:09.0966 (UTC) FILETIME=[2675F0E0:01C36199] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N One convention I've grown fond of is placing declaring an instance = variable immediately preceeding its' getter and setter. I find it = speeds the refactoring of beans. > -----Original Message----- > From: Adrian Jackson [mailto:adrian@dynamicweb.co.uk] > Sent: Wednesday, August 13, 2003 8:44 AM > To: geronimo-dev@incubator.apache.org > Subject: RE: Suggested coding convention: sort methods >=20 >=20 > Eclipse users shouldn't care that much, since the outline view can be > sorted alphabetically anyway. :) I think it would be nice if=20 > there were > *some* logic at least to the code, but I don't know that I=20 > agree this is > the right approach to take - I quite like my accessor methods=20 > to be next > to each other, for example... >=20 > Adrian >=20 > -----Original Message----- > From: Alex Blewitt [mailto:Alex.Blewitt@ioshq.com]=20 > Sent: 13 August 2003 13:41 > To: geronimo-dev@incubator.apache.org > Subject: Suggested coding convention: sort methods >=20 >=20 > One coding convention I've used in the past is sorting the=20 > contents of=20 > a file into alphabetical order. Some may argue that it makes=20 > it easier=20 > to find things; some may not care. A few of you will probably say it=20 > makes it worse :-) >=20 > One good thing about such a standard is that it is a standard=20 > that can=20 > be followed (and/or applied automatically to existing code). In much=20 > the same way that everyone working on a common coding convention will=20 > find things easier if everyone does it, the same can also apply to=20 > sorting the members. >=20 > Eclipse provides a way of configuring the sort orders as follows: >=20 > static fields (*) > static initialisers > static methods > instance fields > instance initialiser > constructors > instance methods >=20 > A nice property of a sorted file when using a source code control=20 > system that diffs is that diffs between two sorted files are=20 > likely to=20 > be the smallest possible (and perhaps, easier to merge when conflicts=20 > occur). >=20 > Of course, I suspect that many people will not be using=20 > Eclipse (or one=20 > that doesn't offer such sorting functionality) so perhaps this should=20 > be a recommendation rather than a standard, but if people=20 > think that it=20 > will make sense then we can work towards it. And it means if=20 > you add a=20 > few methods, trying to put them in the right 'sorted' place will then=20 > help. >=20 > What do people think? >=20 > flameSuit.setEnabled(true) >=20 >=20