Hi Sebb,

As requested, I have produced a first stab at some coding conventions at 
http://wiki.apache.org/HttpComponents/CodingConventions

Please feel free to modify as you see fit.  There is still some work to be 
done, most notably for me adding the Eclipse code formatting (if there is no 
objection then I will add the ones Oleg sent earlier, until the appropriate 
body comes up with the official one)

On your point about being consistent in a file being more important than across 
the project, I would disagree.  If these conventions (and the code formatter) 
become the official project standards, then they are exactly that, and all 
files in the project should adhere to them by definition.  After the single SVN 
commit to clean up all the code, then both file and project consistency will be 
maintained forevermore.

Regards,
Tony

> Message du 15/01/10 14:12
> De : "sebb" 
> A : "HttpComponents Project" , "Tony Poppleton" 
> Copie à : 
> Objet : Re: Code formatting and standards
> 
> 
> On 15/01/2010, Tony Poppleton wrote:
> > Thanks Oleg.
> >
> > I would certainly encourage you to try again at enforcing both code 
> > formatting and coding standards. The top committers on this project should 
> > get together, come up with something they agree on, and then simply enforce 
> > it on everyone else.
> 
> The PMC (who may or may not be "top committers", or even commit to the
> HC codebase) are the only group who can make such decisions.
> 
> Given that the PMC may change over time, the standards may also change
> over time.
> 
> However, I agree that it would be sensible to look at producing some
> coding recommendations, as those should help new contributors.
> 
> Why don't you start a Wiki page with your suggestions?
> Or perhaps two, one for formatting, and another for coding (final vars etc)
> 
> > The Eclipse code formatter settings should be made available on the 
> > website, as well as the "Clean Up" settings. Eclipse can be used to apply 
> > the settings on the whole project, so you can commit one revision where 
> > every class will adhere to the new standards.
> 
> That's rather drastic.
> 
> As far as code layout is concerned, I take the view that changes to
> existing code should generally adhere to whatever scheme that file
> currently uses. Consistency within a file is more important than
> consistency across all files.
> 
> > Thanks,
> > Tony
> >
> > > Message du 15/01/10 11:59
> > > De : "Oleg Kalnichevski"
> > > A : "Tony Poppleton"
> > > Copie à : [email protected]
> > > Objet : Re: Code formatting and standards
> >
> > >
> > > On Fri, 2010-01-15 at 03:29 +0100, Tony Poppleton wrote:
> > > > (this was previously posted on the users mailing list by mistake, 
> > > > reposting to the correct channel...)
> > > >
> > > > Hi,
> > > >
> > > > I use the Eclipse IDE for all my development, and one useful feature is 
> > > > the code formatter to ensure standardization. Does anyone have a 
> > > > premade Eclipse IDE formatter for HttpCore/HttpClient that they could 
> > > > send me please?
> > > >
> > >
> > > Hi Tony
> > >
> > > Here is the file containing code formatting settings that I use.
> > >
> > >
> > > > Is code formatting enforced in these projects?
> > > >
> > >
> > > No, not really. The only hard requirement is the use of spaces instead
> > > of tabs and indentation with 4 spaces.
> > >
> > >
> > > > On a related topic, is there a coding standards document, for example 
> > > > on the usage of the "final" keyword, to ensure coding is consistent 
> > > > between developers?
> > > >
> > >
> > > Historically there used to be too many developers with completely
> > > different tastes for the code formatting standards, so any attempt at
> > > coming up with a common policy could easily escalate into a full scale
> > > 'food fight'. I personally have fairly bizarre preferences for code
> > > formatting and therefore do not find it possible to impose them onto
> > > other fellow human beings.
> > >
> > > We could try, though, given the fact that the code base is becoming
> > > stable and major cross cutting changes are unlikely.
> > >
> > > Oleg
> > >
> > > > Many thanks,
> > > > Tony
> > >
> > >
> >
> > > ---------------------------------------------------------------------------------------
> >
> > > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail.
> > > Aucun virus connu a ce jour par nos services n'a ete detecte.
> > >
> > >
> >
> > > [ (pas de nom de fichier) (0.2 Ko) ]
> > > [ oleg's (28.3 Ko) ]
> ---------------------------------------------------------------------------------------
> Orange vous informe que cet e-mail a ete controle par l'anti-virus mail.
> Aucun virus connu a ce jour par nos services n'a ete detecte.
> 
> 
> 

Reply via email to