Hi all, Java Coding standards link above uses a wrong link to sun java coding standards. Correct link should be http://www.oracle.com/technetwork/java/codeconventions-150003.pdf . For some open source stuff, I have followed coding conventions at https://github.com/jruby/jruby/blob/master/docs/CodeConventions.txt . It was very easy to follow and gives easily readable code.
Thank You! On Sat, Sep 27, 2014 at 5:04 PM, Konrad Grochowski <hc...@minions.org.pl> wrote: > I hoped (when I could find anything in Thrift) that there is something > Apache wide. But it seems that all projects are on their own ;) > I was searching for Apache standards and I saw those: > https://wiki.openoffice.org/wiki/Cpp_Coding_Standards > https://wiki.openoffice.org/wiki/Java_Coding_Standards > (Java standards are much shorter/simpler == better imho) (BTW - wiki is > always a good idea ;) ) > I like them because they mention design etc, as coding style is not only > "where do I put this bracket", but more importantly "where do I put this > new feature". > Important part of coding standards should be examples: > http://portals.apache.org/development/code-standards.html > Less text, more code - most of devs are used to read code, not > specifications (who ever saw specs?) > > In thrift for most langs those "design" part of standards could be > extracted to General - shared top level docs. Rules like "Keep functions > short" apply to almost all langs. Some "style" issues also can be discussed > in General part - "prefer spaces over tabs", "use comments only for lib > public API, other comments are lies". > > -Konrad > > > W dniu 2014-09-27 12:00, Jens Geyer pisze: > > Hi Konrad, >> >> sounds good. Is there already some blueprint available that you have in >> mind? I don't want to invent the wheel again, sort of a good template would >> be fine. Other Apache projects, maybe? >> >> Have fun, >> JensG >> >> >> -----Ursprüngliche Nachricht----- From: Konrad Grochowski >> Sent: Saturday, September 27, 2014 3:27 AM >> To: dev@thrift.apache.org >> Subject: Re: coding standards >> >> Oh, I really hope, that for most langs, standards will be like "Please >> follow default settings/guidelines for XYZ lang, found at: >> http://go.to.xyz.manual.com". I've just added all those tasks for >> consistency. Especially if we're going with Roger's suggestion about >> lib/$lang/ReadMe.md - then it would be nice to be consistent with lib >> layout and avoid mails to dev@ like "I saw that lang X has some >> guidelines, but Y does not, should I keep to standard ones or..." >> >> Regards, >> Konrad >> >> W dniu 2014-09-26 19:51, Jens Geyer pisze: >> >>> Hi Konrad, >>> >>> for C#, Go and Haxe the IDEs and/or toolchains (gofmt) already a certain >>> style that is commonly accepted. Especially for Go it is a deliberate part >>> of the design. Would that suffice or do we need just another doc? >>> >>> Where I agree is Delphi, because the Emba style guide and defaults are >>> the last thing I will ever use. I already have that point on my TODO list. >>> >>> Have fun, >>> JensG >>> ________________________________ >>> Von: Jens Geyer >>> Gesendet: 26.09.2014 18:34 >>> An: dev@thrift.apache.org >>> Betreff: AW: C++ coding standards >>> >>> That was exactly what I felt. >>> ________________________________ >>> Von: Rush Manbert >>> Gesendet: 26.09.2014 17:44 >>> An: dev@thrift.apache.org >>> Betreff: Re: C++ coding standards >>> >>> I think this veers off into territory that should be avoided for this >>> project. >>> >>> I am not against having coding standards. Not at all. But Thrift is a >>> fairly mature product. Disregarding new language support, I suspect that >>> the bulk of the future coding required will be bug fixes. If that is true, >>> then the best thing to do is to preserve the style that you find in the >>> code you are modifying. The last thing I would want to see is that someone >>> fixes a bug in the compiler or adds a new feature and uses a style totally >>> foreign to what was originally used. >>> >>> When I delve into the compiler code I remember that it has its >>> peculiarities and my mind shifts into "compiler dev mode". If I look at the >>> library code I gradually shift into "library dev mode". Neither of those >>> are what I prefer or dictate when I set the coding standards, but they >>> maintain the original style. That's a good thing. And Heaven forbid if >>> coding standards are written and someone decides to change existing code to >>> conform to them. You do NOT change working, tested code just because you >>> don't agree with its style. That's just asking for problems. >>> >>> I don't usually play this card, but I am speaking from 42 years of >>> experience writing software. I feel that you're just going to waste time >>> and effort. >>> >>> That's my 2 cents, for what it's worth. >>> >>> - Rush >>> >>> On Sep 26, 2014, at 6:28 AM, Ben Craig wrote: >>> >>> I haven't seen any explicit coding standards. I have a minor preference >>>> for using whatever the "local" style already is, but it isn't a large >>>> concern of mine. >>>> >>>> Konrad Grochowski <hc...@minions.org.pl> wrote on 09/26/2014 08:03:45 >>>> AM: >>>> >>>> From: Konrad Grochowski <hc...@minions.org.pl> >>>>> To: dev@thrift.apache.org, >>>>> Date: 09/26/2014 08:04 AM >>>>> Subject: C++ coding standards >>>>> >>>>> Hey, >>>>> >>>>> Are C++ coding standards for thrift defined anywhere? I see that >>>>> lib/cpp >>>>> looks like this 'ClassName::methodName' but compiler code look more >>>>> like >>>>> 't_class_name::method_name'. I definitely prefer first style, but >>>>> currently I'm playing around compiler. Can I use 'lib' style, assuming >>>>> that's more recent and compiler code will move toward that look? >>>>> >>>>> -Konrad >>>>> >>>> >>> >> > -- *Chamila Dilshan Wijayarathna,* SMIEEE, SMIESL, Undergraduate, Department of Computer Science and Engineering, University of Moratuwa.