You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Paul Lindner <pl...@hi5.com> on 2008/02/02 16:23:25 UTC

Coding Standards

On Fri, Feb 01, 2008 at 10:36:34AM -0800, Cassie wrote:
[....]
> > +      }
> > +
> > +      for (var s in supported) if (supported.hasOwnProperty(s)) {
> 
> 
> we really need to agree on some code style docs for shindig.
> this for and if on the same line realllllyyy makes me cringe.

Agreed, here are some apache projects with coding standards:

http://commons.apache.org/net/code-standards.html
http://geronimo.apache.org/coding-standards.html
http://portals.apache.org/jetspeed-1/code-standards.html

I tried running Idea's Reformat Code and it changed quite a lot.



-- 
Paul Lindner
hi5 Architect
plindner@hi5.com

Re: Coding Standards

Posted by Kevin Brown <et...@google.com>.
Coding standards will be included in the contributors guide that Dan P and
John H are working on, but they'll differ from language to language. As a
rule, we're trying to follow the most popular community coding conventions
found in other projects (Java = Sun conventions with 2 space indents,
javascript = basically the same as java with some special rules for language
differences). Once this gets published we'll probably have to run over some
files and make some changes.

In any case, any one person's opinion on a style question is irrelevant,
it's up to the project as a whole to decide coding standards. Once we have
the first draft of the document everyone will put their 2 cents in and we'll
come up with a guide that makes as many contributors happy as possible.
Anyone who's making contributions (including committers and people who've
been submitting patches without commit access) will get a say.

On Feb 2, 2008 7:23 AM, Paul Lindner <pl...@hi5.com> wrote:

> On Fri, Feb 01, 2008 at 10:36:34AM -0800, Cassie wrote:
> [....]
> > > +      }
> > > +
> > > +      for (var s in supported) if (supported.hasOwnProperty(s)) {
> >
> >
> > we really need to agree on some code style docs for shindig.
> > this for and if on the same line realllllyyy makes me cringe.
>
> Agreed, here are some apache projects with coding standards:
>
> http://commons.apache.org/net/code-standards.html
> http://geronimo.apache.org/coding-standards.html
> http://portals.apache.org/jetspeed-1/code-standards.html
>
> I tried running Idea's Reformat Code and it changed quite a lot.
>
>
>
> --
> Paul Lindner
> hi5 Architect
> plindner@hi5.com
>