You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by Mark Struberg <st...@yahoo.de> on 2011/12/12 12:37:15 UTC

basic decisions - coding conventions

Hi!

I'm a fan of a pretty tight coding convention observation even at build time.

What we usually have (in owb and myfaces) is an own 'buildtools' project which contains the checkstyle rules as own artifact.
This will then be used in the deltaspike-parent pom as dependency of the maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.

The more important thing is to decide _which_ coding conventions we like to follow at all?

I have the following suggestions:

1.) no tabs, only spaces!

2.) bracelets on new line? Actually I don't care about
> if()
> {
>   dings();
> }
or 

> if() {
>   dings();
> }
but we should only use one stile throughout the whole code.


3.) force bracelets 

 no 

> if() 

>   dosomething; 

without bracelets. Instead force:
> if() 
> {

>   dosomething; 
> }


I'm sure there is a bit more, thus please add the rules which are important for you.
(PS: once we found a final solution we should move this into our wiki + provide Eclipse and Idea checkstyle rules.


LieGrue,
strub


Re: basic decisions - coding conventions

Posted by Jason Porter <li...@gmail.com>.
I probably should have started a vote thread, yes. We seem to be at a bit of a standstill on this one. 

Sent from my iPhone

On Dec 16, 2011, at 11:14, Matt Benson <gu...@gmail.com> wrote:

> On Thu, Dec 15, 2011 at 5:27 PM, Jason Porter <li...@gmail.com> wrote:
>> Just to clarify
>> 
>> +1 (binding) to what we currently have listed in the JIRA.
> 
> I'll step in and do some mentoring here.  :)  The concept of a binding
> vote typically* only comes into play on a thread that is explicitly
> declared as a [VOTE].  I say "typically" because a project's
> decision-making process *can* be customized; thus it is theoretically
> possible that we could set a rule in DeltaSpike that all discussions
> are implicitly votes and invoke voting semantics.  I personally think
> this would be heavy-handed and not a good idea.
> 
> I'll start a separate thread to, briefly, continue the subject of
> decision-making.
> 
> Matt
> 
>> 
>> On Thu, Dec 15, 2011 at 16:06, Jason Porter <li...@gmail.com> wrote:
>> 
>>> imo whitespace is a must, it helps with readability. I'm fine with
>>> everything else
>>> 
>>> 
>>> On Thu, Dec 15, 2011 at 14:02, Matthias Wessendorf <ma...@apache.org>wrote:
>>> 
>>>>> 5) a space between keyword and round bracket (e.g. if (...) instead of
>>>> if(...))
>>>>> 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
>>>>> instead of a=1+2 or a!=b)
>>>>> 
>>>>> 5 and 6 are not soo important, but IMO very nice to have.
>>>> 
>>>> 
>>>> I hate: if(){
>>>> 
>>>> :-)
>>>> 
>>>>> 
>>>>> Regards,
>>>>> Jakob
>>>>> 
>>>>> 2011/12/12 Shane Bryzak <sb...@gmail.com>:
>>>>>> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de>
>>>> wrote:
>>>>>> 
>>>>>>> Hi!
>>>>>>> 
>>>>>>> I'm a fan of a pretty tight coding convention observation even at
>>>> build
>>>>>>> time.
>>>>>>> 
>>>>>>> What we usually have (in owb and myfaces) is an own 'buildtools'
>>>> project
>>>>>>> which contains the checkstyle rules as own artifact.
>>>>>>> This will then be used in the deltaspike-parent pom as dependency of
>>>> the
>>>>>>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>>>>>> 
>>>>>>> The more important thing is to decide _which_ coding conventions we
>>>> like
>>>>>>> to follow at all?
>>>>>>> 
>>>>>>> I have the following suggestions:
>>>>>>> 
>>>>>>> 1.) no tabs, only spaces!
>>>>>>> 
>>>>>> 
>>>>>> +1, tabs suck
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> 2.) bracelets on new line? Actually I don't care about
>>>>>>>> if()
>>>>>>>> {
>>>>>>>>   dings();
>>>>>>>> }
>>>>>>> or
>>>>>>> 
>>>>>>>> if() {
>>>>>>>>   dings();
>>>>>>>> }
>>>>>>> but we should only use one stile throughout the whole code.
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> I don't mind either way here, comfortable with either as long as we
>>>> pick
>>>>>> one and are consistent with it.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> 3.) force bracelets
>>>>>>> 
>>>>>>>  no
>>>>>>> 
>>>>>>>> if()
>>>>>>> 
>>>>>>>>   dosomething;
>>>>>>> 
>>>>>>> without bracelets. Instead force:
>>>>>>>> if()
>>>>>>>> {
>>>>>>> 
>>>>>>>>   dosomething;
>>>>>>>> }
>>>>>>> 
>>>>>>> 
>>>>>> +1
>>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> I'm sure there is a bit more, thus please add the rules which are
>>>>>>> important for you.
>>>>>>> (PS: once we found a final solution we should move this into our wiki
>>>> +
>>>>>>> provide Eclipse and Idea checkstyle rules.
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> One thing to decide is indent size.  Currently in Seam we use 4
>>>> spaces, as
>>>>>> we've recently adopted the JBoss coding standards.  Personally, I think
>>>>>> this is a little too much, previously we had 3 spaces (Gavin's
>>>> preference)
>>>>>> which I thought was better.
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> LieGrue,
>>>>>>> strub
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Jakob Korherr
>>>>> 
>>>>> blog: http://www.jakobk.com
>>>>> twitter: http://twitter.com/jakobkorherr
>>>>> work: http://www.irian.at
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Matthias Wessendorf
>>>> 
>>>> blog: http://matthiaswessendorf.wordpress.com/
>>>> sessions: http://www.slideshare.net/mwessendorf
>>>> twitter: http://twitter.com/mwessendorf
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Jason Porter
>>> http://lightguard-jp.blogspot.com
>>> http://twitter.com/lightguardjp
>>> 
>>> Software Engineer
>>> Open Source Advocate
>>> Author of Seam Catch - Next Generation Java Exception Handling
>>> 
>>> PGP key id: 926CCFF5
>>> PGP key available at: keyserver.net, pgp.mit.edu
>>> 
>> 
>> 
>> 
>> --
>> Jason Porter
>> http://lightguard-jp.blogspot.com
>> http://twitter.com/lightguardjp
>> 
>> Software Engineer
>> Open Source Advocate
>> Author of Seam Catch - Next Generation Java Exception Handling
>> 
>> PGP key id: 926CCFF5
>> PGP key available at: keyserver.net, pgp.mit.edu

Re: basic decisions - coding conventions

Posted by Matt Benson <gu...@gmail.com>.
On Thu, Dec 15, 2011 at 5:27 PM, Jason Porter <li...@gmail.com> wrote:
> Just to clarify
>
> +1 (binding) to what we currently have listed in the JIRA.

I'll step in and do some mentoring here.  :)  The concept of a binding
vote typically* only comes into play on a thread that is explicitly
declared as a [VOTE].  I say "typically" because a project's
decision-making process *can* be customized; thus it is theoretically
possible that we could set a rule in DeltaSpike that all discussions
are implicitly votes and invoke voting semantics.  I personally think
this would be heavy-handed and not a good idea.

I'll start a separate thread to, briefly, continue the subject of
decision-making.

Matt

>
> On Thu, Dec 15, 2011 at 16:06, Jason Porter <li...@gmail.com> wrote:
>
>> imo whitespace is a must, it helps with readability. I'm fine with
>> everything else
>>
>>
>> On Thu, Dec 15, 2011 at 14:02, Matthias Wessendorf <ma...@apache.org>wrote:
>>
>>> > 5) a space between keyword and round bracket (e.g. if (...) instead of
>>> if(...))
>>> > 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
>>> > instead of a=1+2 or a!=b)
>>> >
>>> > 5 and 6 are not soo important, but IMO very nice to have.
>>>
>>>
>>> I hate: if(){
>>>
>>> :-)
>>>
>>> >
>>> > Regards,
>>> > Jakob
>>> >
>>> > 2011/12/12 Shane Bryzak <sb...@gmail.com>:
>>> >> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de>
>>> wrote:
>>> >>
>>> >>> Hi!
>>> >>>
>>> >>> I'm a fan of a pretty tight coding convention observation even at
>>> build
>>> >>> time.
>>> >>>
>>> >>> What we usually have (in owb and myfaces) is an own 'buildtools'
>>> project
>>> >>> which contains the checkstyle rules as own artifact.
>>> >>> This will then be used in the deltaspike-parent pom as dependency of
>>> the
>>> >>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>> >>>
>>> >>> The more important thing is to decide _which_ coding conventions we
>>> like
>>> >>> to follow at all?
>>> >>>
>>> >>> I have the following suggestions:
>>> >>>
>>> >>> 1.) no tabs, only spaces!
>>> >>>
>>> >>
>>> >> +1, tabs suck
>>> >>
>>> >>
>>> >>
>>> >>>
>>> >>> 2.) bracelets on new line? Actually I don't care about
>>> >>> > if()
>>> >>> > {
>>> >>> >   dings();
>>> >>> > }
>>> >>> or
>>> >>>
>>> >>> > if() {
>>> >>> >   dings();
>>> >>> > }
>>> >>> but we should only use one stile throughout the whole code.
>>> >>>
>>> >>>
>>> >>
>>> >> I don't mind either way here, comfortable with either as long as we
>>> pick
>>> >> one and are consistent with it.
>>> >>
>>> >>
>>> >>
>>> >>>
>>> >>> 3.) force bracelets
>>> >>>
>>> >>>  no
>>> >>>
>>> >>> > if()
>>> >>>
>>> >>> >   dosomething;
>>> >>>
>>> >>> without bracelets. Instead force:
>>> >>> > if()
>>> >>> > {
>>> >>>
>>> >>> >   dosomething;
>>> >>> > }
>>> >>>
>>> >>>
>>> >> +1
>>> >>
>>> >>
>>> >>>
>>> >>> I'm sure there is a bit more, thus please add the rules which are
>>> >>> important for you.
>>> >>> (PS: once we found a final solution we should move this into our wiki
>>> +
>>> >>> provide Eclipse and Idea checkstyle rules.
>>> >>>
>>> >>
>>> >>
>>> >> One thing to decide is indent size.  Currently in Seam we use 4
>>> spaces, as
>>> >> we've recently adopted the JBoss coding standards.  Personally, I think
>>> >> this is a little too much, previously we had 3 spaces (Gavin's
>>> preference)
>>> >> which I thought was better.
>>> >>
>>> >>
>>> >>
>>> >>>
>>> >>>
>>> >>> LieGrue,
>>> >>> strub
>>> >>>
>>> >>>
>>> >
>>> >
>>> >
>>> > --
>>> > Jakob Korherr
>>> >
>>> > blog: http://www.jakobk.com
>>> > twitter: http://twitter.com/jakobkorherr
>>> > work: http://www.irian.at
>>>
>>>
>>>
>>> --
>>> Matthias Wessendorf
>>>
>>> blog: http://matthiaswessendorf.wordpress.com/
>>> sessions: http://www.slideshare.net/mwessendorf
>>> twitter: http://twitter.com/mwessendorf
>>>
>>
>>
>>
>> --
>> Jason Porter
>> http://lightguard-jp.blogspot.com
>> http://twitter.com/lightguardjp
>>
>> Software Engineer
>> Open Source Advocate
>> Author of Seam Catch - Next Generation Java Exception Handling
>>
>> PGP key id: 926CCFF5
>> PGP key available at: keyserver.net, pgp.mit.edu
>>
>
>
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu

Re: basic decisions - coding conventions

Posted by Jason Porter <li...@gmail.com>.
Just to clarify

+1 (binding) to what we currently have listed in the JIRA.

On Thu, Dec 15, 2011 at 16:06, Jason Porter <li...@gmail.com> wrote:

> imo whitespace is a must, it helps with readability. I'm fine with
> everything else
>
>
> On Thu, Dec 15, 2011 at 14:02, Matthias Wessendorf <ma...@apache.org>wrote:
>
>> > 5) a space between keyword and round bracket (e.g. if (...) instead of
>> if(...))
>> > 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
>> > instead of a=1+2 or a!=b)
>> >
>> > 5 and 6 are not soo important, but IMO very nice to have.
>>
>>
>> I hate: if(){
>>
>> :-)
>>
>> >
>> > Regards,
>> > Jakob
>> >
>> > 2011/12/12 Shane Bryzak <sb...@gmail.com>:
>> >> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de>
>> wrote:
>> >>
>> >>> Hi!
>> >>>
>> >>> I'm a fan of a pretty tight coding convention observation even at
>> build
>> >>> time.
>> >>>
>> >>> What we usually have (in owb and myfaces) is an own 'buildtools'
>> project
>> >>> which contains the checkstyle rules as own artifact.
>> >>> This will then be used in the deltaspike-parent pom as dependency of
>> the
>> >>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>> >>>
>> >>> The more important thing is to decide _which_ coding conventions we
>> like
>> >>> to follow at all?
>> >>>
>> >>> I have the following suggestions:
>> >>>
>> >>> 1.) no tabs, only spaces!
>> >>>
>> >>
>> >> +1, tabs suck
>> >>
>> >>
>> >>
>> >>>
>> >>> 2.) bracelets on new line? Actually I don't care about
>> >>> > if()
>> >>> > {
>> >>> >   dings();
>> >>> > }
>> >>> or
>> >>>
>> >>> > if() {
>> >>> >   dings();
>> >>> > }
>> >>> but we should only use one stile throughout the whole code.
>> >>>
>> >>>
>> >>
>> >> I don't mind either way here, comfortable with either as long as we
>> pick
>> >> one and are consistent with it.
>> >>
>> >>
>> >>
>> >>>
>> >>> 3.) force bracelets
>> >>>
>> >>>  no
>> >>>
>> >>> > if()
>> >>>
>> >>> >   dosomething;
>> >>>
>> >>> without bracelets. Instead force:
>> >>> > if()
>> >>> > {
>> >>>
>> >>> >   dosomething;
>> >>> > }
>> >>>
>> >>>
>> >> +1
>> >>
>> >>
>> >>>
>> >>> I'm sure there is a bit more, thus please add the rules which are
>> >>> important for you.
>> >>> (PS: once we found a final solution we should move this into our wiki
>> +
>> >>> provide Eclipse and Idea checkstyle rules.
>> >>>
>> >>
>> >>
>> >> One thing to decide is indent size.  Currently in Seam we use 4
>> spaces, as
>> >> we've recently adopted the JBoss coding standards.  Personally, I think
>> >> this is a little too much, previously we had 3 spaces (Gavin's
>> preference)
>> >> which I thought was better.
>> >>
>> >>
>> >>
>> >>>
>> >>>
>> >>> LieGrue,
>> >>> strub
>> >>>
>> >>>
>> >
>> >
>> >
>> > --
>> > Jakob Korherr
>> >
>> > blog: http://www.jakobk.com
>> > twitter: http://twitter.com/jakobkorherr
>> > work: http://www.irian.at
>>
>>
>>
>> --
>> Matthias Wessendorf
>>
>> blog: http://matthiaswessendorf.wordpress.com/
>> sessions: http://www.slideshare.net/mwessendorf
>> twitter: http://twitter.com/mwessendorf
>>
>
>
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Re: basic decisions - coding conventions

Posted by Jason Porter <li...@gmail.com>.
imo whitespace is a must, it helps with readability. I'm fine with
everything else

On Thu, Dec 15, 2011 at 14:02, Matthias Wessendorf <ma...@apache.org>wrote:

> > 5) a space between keyword and round bracket (e.g. if (...) instead of
> if(...))
> > 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
> > instead of a=1+2 or a!=b)
> >
> > 5 and 6 are not soo important, but IMO very nice to have.
>
>
> I hate: if(){
>
> :-)
>
> >
> > Regards,
> > Jakob
> >
> > 2011/12/12 Shane Bryzak <sb...@gmail.com>:
> >> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de>
> wrote:
> >>
> >>> Hi!
> >>>
> >>> I'm a fan of a pretty tight coding convention observation even at build
> >>> time.
> >>>
> >>> What we usually have (in owb and myfaces) is an own 'buildtools'
> project
> >>> which contains the checkstyle rules as own artifact.
> >>> This will then be used in the deltaspike-parent pom as dependency of
> the
> >>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >>>
> >>> The more important thing is to decide _which_ coding conventions we
> like
> >>> to follow at all?
> >>>
> >>> I have the following suggestions:
> >>>
> >>> 1.) no tabs, only spaces!
> >>>
> >>
> >> +1, tabs suck
> >>
> >>
> >>
> >>>
> >>> 2.) bracelets on new line? Actually I don't care about
> >>> > if()
> >>> > {
> >>> >   dings();
> >>> > }
> >>> or
> >>>
> >>> > if() {
> >>> >   dings();
> >>> > }
> >>> but we should only use one stile throughout the whole code.
> >>>
> >>>
> >>
> >> I don't mind either way here, comfortable with either as long as we pick
> >> one and are consistent with it.
> >>
> >>
> >>
> >>>
> >>> 3.) force bracelets
> >>>
> >>>  no
> >>>
> >>> > if()
> >>>
> >>> >   dosomething;
> >>>
> >>> without bracelets. Instead force:
> >>> > if()
> >>> > {
> >>>
> >>> >   dosomething;
> >>> > }
> >>>
> >>>
> >> +1
> >>
> >>
> >>>
> >>> I'm sure there is a bit more, thus please add the rules which are
> >>> important for you.
> >>> (PS: once we found a final solution we should move this into our wiki +
> >>> provide Eclipse and Idea checkstyle rules.
> >>>
> >>
> >>
> >> One thing to decide is indent size.  Currently in Seam we use 4 spaces,
> as
> >> we've recently adopted the JBoss coding standards.  Personally, I think
> >> this is a little too much, previously we had 3 spaces (Gavin's
> preference)
> >> which I thought was better.
> >>
> >>
> >>
> >>>
> >>>
> >>> LieGrue,
> >>> strub
> >>>
> >>>
> >
> >
> >
> > --
> > Jakob Korherr
> >
> > blog: http://www.jakobk.com
> > twitter: http://twitter.com/jakobkorherr
> > work: http://www.irian.at
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Re: basic decisions - coding conventions

Posted by Matthias Wessendorf <ma...@apache.org>.
120 characters is fine - but dont care on that one...

On Thu, Dec 15, 2011 at 10:02 PM, Matthias Wessendorf <ma...@apache.org> wrote:
>> 5) a space between keyword and round bracket (e.g. if (...) instead of if(...))
>> 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
>> instead of a=1+2 or a!=b)
>>
>> 5 and 6 are not soo important, but IMO very nice to have.
>
>
> I hate: if(){
>
> :-)
>
>>
>> Regards,
>> Jakob
>>
>> 2011/12/12 Shane Bryzak <sb...@gmail.com>:
>>> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>>>
>>>> Hi!
>>>>
>>>> I'm a fan of a pretty tight coding convention observation even at build
>>>> time.
>>>>
>>>> What we usually have (in owb and myfaces) is an own 'buildtools' project
>>>> which contains the checkstyle rules as own artifact.
>>>> This will then be used in the deltaspike-parent pom as dependency of the
>>>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>>>
>>>> The more important thing is to decide _which_ coding conventions we like
>>>> to follow at all?
>>>>
>>>> I have the following suggestions:
>>>>
>>>> 1.) no tabs, only spaces!
>>>>
>>>
>>> +1, tabs suck
>>>
>>>
>>>
>>>>
>>>> 2.) bracelets on new line? Actually I don't care about
>>>> > if()
>>>> > {
>>>> >   dings();
>>>> > }
>>>> or
>>>>
>>>> > if() {
>>>> >   dings();
>>>> > }
>>>> but we should only use one stile throughout the whole code.
>>>>
>>>>
>>>
>>> I don't mind either way here, comfortable with either as long as we pick
>>> one and are consistent with it.
>>>
>>>
>>>
>>>>
>>>> 3.) force bracelets
>>>>
>>>>  no
>>>>
>>>> > if()
>>>>
>>>> >   dosomething;
>>>>
>>>> without bracelets. Instead force:
>>>> > if()
>>>> > {
>>>>
>>>> >   dosomething;
>>>> > }
>>>>
>>>>
>>> +1
>>>
>>>
>>>>
>>>> I'm sure there is a bit more, thus please add the rules which are
>>>> important for you.
>>>> (PS: once we found a final solution we should move this into our wiki +
>>>> provide Eclipse and Idea checkstyle rules.
>>>>
>>>
>>>
>>> One thing to decide is indent size.  Currently in Seam we use 4 spaces, as
>>> we've recently adopted the JBoss coding standards.  Personally, I think
>>> this is a little too much, previously we had 3 spaces (Gavin's preference)
>>> which I thought was better.
>>>
>>>
>>>
>>>>
>>>>
>>>> LieGrue,
>>>> strub
>>>>
>>>>
>>
>>
>>
>> --
>> Jakob Korherr
>>
>> blog: http://www.jakobk.com
>> twitter: http://twitter.com/jakobkorherr
>> work: http://www.irian.at
>
>
>
> --
> Matthias Wessendorf
>
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> twitter: http://twitter.com/mwessendorf



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: basic decisions - coding conventions

Posted by Matthias Wessendorf <ma...@apache.org>.
> 5) a space between keyword and round bracket (e.g. if (...) instead of if(...))
> 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
> instead of a=1+2 or a!=b)
>
> 5 and 6 are not soo important, but IMO very nice to have.


I hate: if(){

:-)

>
> Regards,
> Jakob
>
> 2011/12/12 Shane Bryzak <sb...@gmail.com>:
>> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>>
>>> Hi!
>>>
>>> I'm a fan of a pretty tight coding convention observation even at build
>>> time.
>>>
>>> What we usually have (in owb and myfaces) is an own 'buildtools' project
>>> which contains the checkstyle rules as own artifact.
>>> This will then be used in the deltaspike-parent pom as dependency of the
>>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>>
>>> The more important thing is to decide _which_ coding conventions we like
>>> to follow at all?
>>>
>>> I have the following suggestions:
>>>
>>> 1.) no tabs, only spaces!
>>>
>>
>> +1, tabs suck
>>
>>
>>
>>>
>>> 2.) bracelets on new line? Actually I don't care about
>>> > if()
>>> > {
>>> >   dings();
>>> > }
>>> or
>>>
>>> > if() {
>>> >   dings();
>>> > }
>>> but we should only use one stile throughout the whole code.
>>>
>>>
>>
>> I don't mind either way here, comfortable with either as long as we pick
>> one and are consistent with it.
>>
>>
>>
>>>
>>> 3.) force bracelets
>>>
>>>  no
>>>
>>> > if()
>>>
>>> >   dosomething;
>>>
>>> without bracelets. Instead force:
>>> > if()
>>> > {
>>>
>>> >   dosomething;
>>> > }
>>>
>>>
>> +1
>>
>>
>>>
>>> I'm sure there is a bit more, thus please add the rules which are
>>> important for you.
>>> (PS: once we found a final solution we should move this into our wiki +
>>> provide Eclipse and Idea checkstyle rules.
>>>
>>
>>
>> One thing to decide is indent size.  Currently in Seam we use 4 spaces, as
>> we've recently adopted the JBoss coding standards.  Personally, I think
>> this is a little too much, previously we had 3 spaces (Gavin's preference)
>> which I thought was better.
>>
>>
>>
>>>
>>>
>>> LieGrue,
>>> strub
>>>
>>>
>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: basic decisions - coding conventions

Posted by Gerhard Petracek <gp...@apache.org>.
thx jakob for the summary (if needed: i uploaded the corresponding settings
[1] for intellij last week).

regards,
gerhard

[1] https://cwiki.apache.org/confluence/display/DeltaSpike/Tools



2011/12/12 Jakob Korherr <ja...@gmail.com>

> Hi,
>
> I personally really like the rules we have at MyFaces, these are
>
> 1) No tabs, only spaces.
> 2) Bracelets on new line (IMO makes the code more readable)
> 3) Force bracelets
> 4) 4 spaces ident size (2 is too little and 3 is awkward - I've never
> seen 3..). Also, clear indentings make the code more readable.
> 5) a space between keyword and round bracket (e.g. if (...) instead of
> if(...))
> 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
> instead of a=1+2 or a!=b)
>
> 5 and 6 are not soo important, but IMO very nice to have.
>
> Regards,
> Jakob
>
> 2011/12/12 Shane Bryzak <sb...@gmail.com>:
> > On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de>
> wrote:
> >
> >> Hi!
> >>
> >> I'm a fan of a pretty tight coding convention observation even at build
> >> time.
> >>
> >> What we usually have (in owb and myfaces) is an own 'buildtools' project
> >> which contains the checkstyle rules as own artifact.
> >> This will then be used in the deltaspike-parent pom as dependency of the
> >> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >>
> >> The more important thing is to decide _which_ coding conventions we like
> >> to follow at all?
> >>
> >> I have the following suggestions:
> >>
> >> 1.) no tabs, only spaces!
> >>
> >
> > +1, tabs suck
> >
> >
> >
> >>
> >> 2.) bracelets on new line? Actually I don't care about
> >> > if()
> >> > {
> >> >   dings();
> >> > }
> >> or
> >>
> >> > if() {
> >> >   dings();
> >> > }
> >> but we should only use one stile throughout the whole code.
> >>
> >>
> >
> > I don't mind either way here, comfortable with either as long as we pick
> > one and are consistent with it.
> >
> >
> >
> >>
> >> 3.) force bracelets
> >>
> >>  no
> >>
> >> > if()
> >>
> >> >   dosomething;
> >>
> >> without bracelets. Instead force:
> >> > if()
> >> > {
> >>
> >> >   dosomething;
> >> > }
> >>
> >>
> > +1
> >
> >
> >>
> >> I'm sure there is a bit more, thus please add the rules which are
> >> important for you.
> >> (PS: once we found a final solution we should move this into our wiki +
> >> provide Eclipse and Idea checkstyle rules.
> >>
> >
> >
> > One thing to decide is indent size.  Currently in Seam we use 4 spaces,
> as
> > we've recently adopted the JBoss coding standards.  Personally, I think
> > this is a little too much, previously we had 3 spaces (Gavin's
> preference)
> > which I thought was better.
> >
> >
> >
> >>
> >>
> >> LieGrue,
> >> strub
> >>
> >>
>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>

Re: basic decisions - coding conventions

Posted by George Gastaldi <ge...@gmail.com>.
+1 to Jakob additional suggestions.

2011/12/12 Jakob Korherr <ja...@gmail.com>

> Hi,
>
> I personally really like the rules we have at MyFaces, these are
>
> 1) No tabs, only spaces.
> 2) Bracelets on new line (IMO makes the code more readable)
> 3) Force bracelets
> 4) 4 spaces ident size (2 is too little and 3 is awkward - I've never
> seen 3..). Also, clear indentings make the code more readable.
> 5) a space between keyword and round bracket (e.g. if (...) instead of
> if(...))
> 6) a space before and after an operand (e.g. a = 1 + 2 or a != b
> instead of a=1+2 or a!=b)
>
> 5 and 6 are not soo important, but IMO very nice to have.
>
> Regards,
> Jakob
>
> 2011/12/12 Shane Bryzak <sb...@gmail.com>:
> > On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de>
> wrote:
> >
> >> Hi!
> >>
> >> I'm a fan of a pretty tight coding convention observation even at build
> >> time.
> >>
> >> What we usually have (in owb and myfaces) is an own 'buildtools' project
> >> which contains the checkstyle rules as own artifact.
> >> This will then be used in the deltaspike-parent pom as dependency of the
> >> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >>
> >> The more important thing is to decide _which_ coding conventions we like
> >> to follow at all?
> >>
> >> I have the following suggestions:
> >>
> >> 1.) no tabs, only spaces!
> >>
> >
> > +1, tabs suck
> >
> >
> >
> >>
> >> 2.) bracelets on new line? Actually I don't care about
> >> > if()
> >> > {
> >> >   dings();
> >> > }
> >> or
> >>
> >> > if() {
> >> >   dings();
> >> > }
> >> but we should only use one stile throughout the whole code.
> >>
> >>
> >
> > I don't mind either way here, comfortable with either as long as we pick
> > one and are consistent with it.
> >
> >
> >
> >>
> >> 3.) force bracelets
> >>
> >>  no
> >>
> >> > if()
> >>
> >> >   dosomething;
> >>
> >> without bracelets. Instead force:
> >> > if()
> >> > {
> >>
> >> >   dosomething;
> >> > }
> >>
> >>
> > +1
> >
> >
> >>
> >> I'm sure there is a bit more, thus please add the rules which are
> >> important for you.
> >> (PS: once we found a final solution we should move this into our wiki +
> >> provide Eclipse and Idea checkstyle rules.
> >>
> >
> >
> > One thing to decide is indent size.  Currently in Seam we use 4 spaces,
> as
> > we've recently adopted the JBoss coding standards.  Personally, I think
> > this is a little too much, previously we had 3 spaces (Gavin's
> preference)
> > which I thought was better.
> >
> >
> >
> >>
> >>
> >> LieGrue,
> >> strub
> >>
> >>
>
>
>
> --
> Jakob Korherr
>
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at
>

Re: basic decisions - coding conventions

Posted by Jakob Korherr <ja...@gmail.com>.
Hi,

I personally really like the rules we have at MyFaces, these are

1) No tabs, only spaces.
2) Bracelets on new line (IMO makes the code more readable)
3) Force bracelets
4) 4 spaces ident size (2 is too little and 3 is awkward - I've never
seen 3..). Also, clear indentings make the code more readable.
5) a space between keyword and round bracket (e.g. if (...) instead of if(...))
6) a space before and after an operand (e.g. a = 1 + 2 or a != b
instead of a=1+2 or a!=b)

5 and 6 are not soo important, but IMO very nice to have.

Regards,
Jakob

2011/12/12 Shane Bryzak <sb...@gmail.com>:
> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>
>> Hi!
>>
>> I'm a fan of a pretty tight coding convention observation even at build
>> time.
>>
>> What we usually have (in owb and myfaces) is an own 'buildtools' project
>> which contains the checkstyle rules as own artifact.
>> This will then be used in the deltaspike-parent pom as dependency of the
>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>
>> The more important thing is to decide _which_ coding conventions we like
>> to follow at all?
>>
>> I have the following suggestions:
>>
>> 1.) no tabs, only spaces!
>>
>
> +1, tabs suck
>
>
>
>>
>> 2.) bracelets on new line? Actually I don't care about
>> > if()
>> > {
>> >   dings();
>> > }
>> or
>>
>> > if() {
>> >   dings();
>> > }
>> but we should only use one stile throughout the whole code.
>>
>>
>
> I don't mind either way here, comfortable with either as long as we pick
> one and are consistent with it.
>
>
>
>>
>> 3.) force bracelets
>>
>>  no
>>
>> > if()
>>
>> >   dosomething;
>>
>> without bracelets. Instead force:
>> > if()
>> > {
>>
>> >   dosomething;
>> > }
>>
>>
> +1
>
>
>>
>> I'm sure there is a bit more, thus please add the rules which are
>> important for you.
>> (PS: once we found a final solution we should move this into our wiki +
>> provide Eclipse and Idea checkstyle rules.
>>
>
>
> One thing to decide is indent size.  Currently in Seam we use 4 spaces, as
> we've recently adopted the JBoss coding standards.  Personally, I think
> this is a little too much, previously we had 3 spaces (Gavin's preference)
> which I thought was better.
>
>
>
>>
>>
>> LieGrue,
>> strub
>>
>>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Re: basic decisions - coding conventions

Posted by Mark Struberg <st...@yahoo.de>.
120 seems a good fit these days. 80 is just too restricting imo.

LieGrue,
strub




>________________________________
> From: Shane Bryzak <sb...@gmail.com>
>To: deltaspike-dev@incubator.apache.org; Mark Struberg <st...@yahoo.de> 
>Sent: Monday, December 12, 2011 2:17 PM
>Subject: Re: basic decisions - coding conventions
> 
>
>Looks like the consensus is 4 spaces.  One other thing to consider is the line width, in the olden days this was generally 80 characters, however on today's big monitors 100 or even 120 is more typical.  Does anyone have any preference here?
>
>
>On Mon, Dec 12, 2011 at 10:54 PM, Mark Struberg <st...@yahoo.de> wrote:
>
>True, indent size is also important.
>>
>>I'm pretty much used to 4.
>>
>>Indenting by 3 spaces feels a bit flabby ;)
>>
>>LieGrue,
>>strub
>>
>>
>>
>>
>>>________________________________
>>> From: Shane Bryzak <sb...@gmail.com>
>>>To: deltaspike-dev@incubator.apache.org; Mark Struberg <st...@yahoo.de>
>>>Sent: Monday, December 12, 2011 1:30 PM
>>>Subject: Re: basic decisions - coding conventions
>>
>>>
>>>
>>>
>>>
>>>
>>>On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>>>
>>>Hi!
>>>>
>>>>I'm a fan of a pretty tight coding convention observation even at build time.
>>>>
>>>>What we usually have (in owb and myfaces) is an own 'buildtools' project which contains the checkstyle rules as own artifact.
>>>>This will then be used in the deltaspike-parent pom as dependency of the maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>>>
>>>>The more important thing is to decide _which_ coding conventions we like to follow at all?
>>>>
>>>>I have the following suggestions:
>>>>
>>>>1.) no tabs, only spaces!
>>>>
>>>
>>>
>>>+1, tabs suck
>>>
>>>
>>> 
>>>
>>>>2.) bracelets on new line? Actually I don't care about
>>>>> if()
>>>>> {
>>>>>   dings();
>>>>> }
>>>>or
>>>>
>>>>> if() {
>>>>>   dings();
>>>>> }
>>>>but we should only use one stile throughout the whole code.
>>>>
>>>>
>>>
>>>
>>>
>>>
>>>I don't mind either way here, comfortable with either as long as we pick one and are consistent with it.
>>>
>>>
>>> 
>>>
>>>>3.) force bracelets
>>>>
>>>> no
>>>>
>>>>> if()
>>>>
>>>>>   dosomething;
>>>>
>>>>without bracelets. Instead force:
>>>>> if() 
>>>>> {
>>>>
>>>>>   dosomething; 
>>>>> }
>>>>
>>>>
>>>
>>>
>>>+1
>>> 
>>>
>>>>I'm sure there is a bit more, thus please add the rules which are important for you.
>>>>(PS: once we found a final solution we should move this into our wiki + provide Eclipse and Idea checkstyle rules.
>>>>
>>>
>>>
>>>
>>>
>>>One thing to decide is indent size.  Currently in Seam we use 4 spaces, as we've recently adopted the JBoss coding standards.  Personally, I think this is a little too much, previously we had 3 spaces (Gavin's preference) which I thought was better.
>>>
>>>
>>> 
>>>
>>>>
>>>>LieGrue,
>>>>strub
>>>>
>>>>
>>>
>>>
>>>
>>
>
>
>

Re: basic decisions - coding conventions

Posted by Antoine Sabot-Durand <an...@sabot-durand.net>.
+1 for 120

Antoine SABOT-DURAND



Le 12 déc. 2011 à 14:37, Jakob Korherr a écrit :

> 80 is too short nowadays. I'd prefer at least 100, but 120 would be even better!
> 
> Regards,
> Jakob
> 
> 2011/12/12 Shane Bryzak <sb...@gmail.com>:
>> Looks like the consensus is 4 spaces.  One other thing to consider is the
>> line width, in the olden days this was generally 80 characters, however on
>> today's big monitors 100 or even 120 is more typical.  Does anyone have any
>> preference here?
>> 
>> On Mon, Dec 12, 2011 at 10:54 PM, Mark Struberg <st...@yahoo.de> wrote:
>> 
>>> True, indent size is also important.
>>> 
>>> I'm pretty much used to 4.
>>> 
>>> Indenting by 3 spaces feels a bit flabby ;)
>>> 
>>> LieGrue,
>>> strub
>>> 
>>> 
>>> 
>>> 
>>>> ________________________________
>>>> From: Shane Bryzak <sb...@gmail.com>
>>>> To: deltaspike-dev@incubator.apache.org; Mark Struberg <struberg@yahoo.de
>>>> 
>>>> Sent: Monday, December 12, 2011 1:30 PM
>>>> Subject: Re: basic decisions - coding conventions
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>>>> 
>>>> Hi!
>>>>> 
>>>>> I'm a fan of a pretty tight coding convention observation even at build
>>> time.
>>>>> 
>>>>> What we usually have (in owb and myfaces) is an own 'buildtools' project
>>> which contains the checkstyle rules as own artifact.
>>>>> This will then be used in the deltaspike-parent pom as dependency of the
>>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>>>> 
>>>>> The more important thing is to decide _which_ coding conventions we like
>>> to follow at all?
>>>>> 
>>>>> I have the following suggestions:
>>>>> 
>>>>> 1.) no tabs, only spaces!
>>>>> 
>>>> 
>>>> 
>>>> +1, tabs suck
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> 2.) bracelets on new line? Actually I don't care about
>>>>>> if()
>>>>>> {
>>>>>>   dings();
>>>>>> }
>>>>> or
>>>>> 
>>>>>> if() {
>>>>>>   dings();
>>>>>> }
>>>>> but we should only use one stile throughout the whole code.
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> I don't mind either way here, comfortable with either as long as we pick
>>> one and are consistent with it.
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> 3.) force bracelets
>>>>> 
>>>>> no
>>>>> 
>>>>>> if()
>>>>> 
>>>>>>   dosomething;
>>>>> 
>>>>> without bracelets. Instead force:
>>>>>> if()
>>>>>> {
>>>>> 
>>>>>>   dosomething;
>>>>>> }
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> +1
>>>> 
>>>> 
>>>>> I'm sure there is a bit more, thus please add the rules which are
>>> important for you.
>>>>> (PS: once we found a final solution we should move this into our wiki +
>>> provide Eclipse and Idea checkstyle rules.
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> One thing to decide is indent size.  Currently in Seam we use 4 spaces,
>>> as we've recently adopted the JBoss coding standards.  Personally, I think
>>> this is a little too much, previously we had 3 spaces (Gavin's preference)
>>> which I thought was better.
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> 
>>>>> LieGrue,
>>>>> strub
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>> 
> 
> 
> 
> -- 
> Jakob Korherr
> 
> blog: http://www.jakobk.com
> twitter: http://twitter.com/jakobkorherr
> work: http://www.irian.at


Re: basic decisions - coding conventions

Posted by Jakob Korherr <ja...@gmail.com>.
80 is too short nowadays. I'd prefer at least 100, but 120 would be even better!

Regards,
Jakob

2011/12/12 Shane Bryzak <sb...@gmail.com>:
> Looks like the consensus is 4 spaces.  One other thing to consider is the
> line width, in the olden days this was generally 80 characters, however on
> today's big monitors 100 or even 120 is more typical.  Does anyone have any
> preference here?
>
> On Mon, Dec 12, 2011 at 10:54 PM, Mark Struberg <st...@yahoo.de> wrote:
>
>> True, indent size is also important.
>>
>> I'm pretty much used to 4.
>>
>> Indenting by 3 spaces feels a bit flabby ;)
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>> >________________________________
>> > From: Shane Bryzak <sb...@gmail.com>
>> >To: deltaspike-dev@incubator.apache.org; Mark Struberg <struberg@yahoo.de
>> >
>> >Sent: Monday, December 12, 2011 1:30 PM
>> >Subject: Re: basic decisions - coding conventions
>> >
>> >
>> >
>> >
>> >
>> >On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>> >
>> >Hi!
>> >>
>> >>I'm a fan of a pretty tight coding convention observation even at build
>> time.
>> >>
>> >>What we usually have (in owb and myfaces) is an own 'buildtools' project
>> which contains the checkstyle rules as own artifact.
>> >>This will then be used in the deltaspike-parent pom as dependency of the
>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>> >>
>> >>The more important thing is to decide _which_ coding conventions we like
>> to follow at all?
>> >>
>> >>I have the following suggestions:
>> >>
>> >>1.) no tabs, only spaces!
>> >>
>> >
>> >
>> >+1, tabs suck
>> >
>> >
>> >
>> >
>> >>2.) bracelets on new line? Actually I don't care about
>> >>> if()
>> >>> {
>> >>>   dings();
>> >>> }
>> >>or
>> >>
>> >>> if() {
>> >>>   dings();
>> >>> }
>> >>but we should only use one stile throughout the whole code.
>> >>
>> >>
>> >
>> >
>> >
>> >
>> >I don't mind either way here, comfortable with either as long as we pick
>> one and are consistent with it.
>> >
>> >
>> >
>> >
>> >>3.) force bracelets
>> >>
>> >> no
>> >>
>> >>> if()
>> >>
>> >>>   dosomething;
>> >>
>> >>without bracelets. Instead force:
>> >>> if()
>> >>> {
>> >>
>> >>>   dosomething;
>> >>> }
>> >>
>> >>
>> >
>> >
>> >+1
>> >
>> >
>> >>I'm sure there is a bit more, thus please add the rules which are
>> important for you.
>> >>(PS: once we found a final solution we should move this into our wiki +
>> provide Eclipse and Idea checkstyle rules.
>> >>
>> >
>> >
>> >
>> >
>> >One thing to decide is indent size.  Currently in Seam we use 4 spaces,
>> as we've recently adopted the JBoss coding standards.  Personally, I think
>> this is a little too much, previously we had 3 spaces (Gavin's preference)
>> which I thought was better.
>> >
>> >
>> >
>> >
>> >>
>> >>LieGrue,
>> >>strub
>> >>
>> >>
>> >
>> >
>> >
>>



-- 
Jakob Korherr

blog: http://www.jakobk.com
twitter: http://twitter.com/jakobkorherr
work: http://www.irian.at

Re: basic decisions - coding conventions

Posted by Shane Bryzak <sb...@gmail.com>.
Looks like the consensus is 4 spaces.  One other thing to consider is the
line width, in the olden days this was generally 80 characters, however on
today's big monitors 100 or even 120 is more typical.  Does anyone have any
preference here?

On Mon, Dec 12, 2011 at 10:54 PM, Mark Struberg <st...@yahoo.de> wrote:

> True, indent size is also important.
>
> I'm pretty much used to 4.
>
> Indenting by 3 spaces feels a bit flabby ;)
>
> LieGrue,
> strub
>
>
>
>
> >________________________________
> > From: Shane Bryzak <sb...@gmail.com>
> >To: deltaspike-dev@incubator.apache.org; Mark Struberg <struberg@yahoo.de
> >
> >Sent: Monday, December 12, 2011 1:30 PM
> >Subject: Re: basic decisions - coding conventions
> >
> >
> >
> >
> >
> >On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
> >
> >Hi!
> >>
> >>I'm a fan of a pretty tight coding convention observation even at build
> time.
> >>
> >>What we usually have (in owb and myfaces) is an own 'buildtools' project
> which contains the checkstyle rules as own artifact.
> >>This will then be used in the deltaspike-parent pom as dependency of the
> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >>
> >>The more important thing is to decide _which_ coding conventions we like
> to follow at all?
> >>
> >>I have the following suggestions:
> >>
> >>1.) no tabs, only spaces!
> >>
> >
> >
> >+1, tabs suck
> >
> >
> >
> >
> >>2.) bracelets on new line? Actually I don't care about
> >>> if()
> >>> {
> >>>   dings();
> >>> }
> >>or
> >>
> >>> if() {
> >>>   dings();
> >>> }
> >>but we should only use one stile throughout the whole code.
> >>
> >>
> >
> >
> >
> >
> >I don't mind either way here, comfortable with either as long as we pick
> one and are consistent with it.
> >
> >
> >
> >
> >>3.) force bracelets
> >>
> >> no
> >>
> >>> if()
> >>
> >>>   dosomething;
> >>
> >>without bracelets. Instead force:
> >>> if()
> >>> {
> >>
> >>>   dosomething;
> >>> }
> >>
> >>
> >
> >
> >+1
> >
> >
> >>I'm sure there is a bit more, thus please add the rules which are
> important for you.
> >>(PS: once we found a final solution we should move this into our wiki +
> provide Eclipse and Idea checkstyle rules.
> >>
> >
> >
> >
> >
> >One thing to decide is indent size.  Currently in Seam we use 4 spaces,
> as we've recently adopted the JBoss coding standards.  Personally, I think
> this is a little too much, previously we had 3 spaces (Gavin's preference)
> which I thought was better.
> >
> >
> >
> >
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >
> >
> >
>

Re: basic decisions - coding conventions

Posted by Mark Struberg <st...@yahoo.de>.
True, indent size is also important. 

I'm pretty much used to 4.

Indenting by 3 spaces feels a bit flabby ;)

LieGrue,
strub




>________________________________
> From: Shane Bryzak <sb...@gmail.com>
>To: deltaspike-dev@incubator.apache.org; Mark Struberg <st...@yahoo.de> 
>Sent: Monday, December 12, 2011 1:30 PM
>Subject: Re: basic decisions - coding conventions
> 
>
>
>
>
>On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>
>Hi!
>>
>>I'm a fan of a pretty tight coding convention observation even at build time.
>>
>>What we usually have (in owb and myfaces) is an own 'buildtools' project which contains the checkstyle rules as own artifact.
>>This will then be used in the deltaspike-parent pom as dependency of the maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>
>>The more important thing is to decide _which_ coding conventions we like to follow at all?
>>
>>I have the following suggestions:
>>
>>1.) no tabs, only spaces!
>>
>
>
>+1, tabs suck
>
>
> 
>
>>2.) bracelets on new line? Actually I don't care about
>>> if()
>>> {
>>>   dings();
>>> }
>>or
>>
>>> if() {
>>>   dings();
>>> }
>>but we should only use one stile throughout the whole code.
>>
>>
>
>
>
>
>I don't mind either way here, comfortable with either as long as we pick one and are consistent with it.
>
>
> 
>
>>3.) force bracelets
>>
>> no
>>
>>> if()
>>
>>>   dosomething;
>>
>>without bracelets. Instead force:
>>> if() 
>>> {
>>
>>>   dosomething; 
>>> }
>>
>>
>
>
>+1
> 
>
>>I'm sure there is a bit more, thus please add the rules which are important for you.
>>(PS: once we found a final solution we should move this into our wiki + provide Eclipse and Idea checkstyle rules.
>>
>
>
>
>
>One thing to decide is indent size.  Currently in Seam we use 4 spaces, as we've recently adopted the JBoss coding standards.  Personally, I think this is a little too much, previously we had 3 spaces (Gavin's preference) which I thought was better.
>
>
> 
>
>>
>>LieGrue,
>>strub
>>
>>
>
>
>

Re: basic decisions - coding conventions

Posted by Matthias Wessendorf <ma...@apache.org>.
On Mon, Dec 12, 2011 at 1:38 PM, Gerhard Petracek <gp...@apache.org> wrote:
> +1 for 4 spaces


yup

>
> regards,
> gerhard
>
>
>
> 2011/12/12 Shane Bryzak <sb...@gmail.com>
>
>> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>>
>> > Hi!
>> >
>> > I'm a fan of a pretty tight coding convention observation even at build
>> > time.
>> >
>> > What we usually have (in owb and myfaces) is an own 'buildtools' project
>> > which contains the checkstyle rules as own artifact.
>> > This will then be used in the deltaspike-parent pom as dependency of the
>> > maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>> >
>> > The more important thing is to decide _which_ coding conventions we like
>> > to follow at all?
>> >
>> > I have the following suggestions:
>> >
>> > 1.) no tabs, only spaces!
>> >
>>
>> +1, tabs suck
>>
>>
>>
>> >
>> > 2.) bracelets on new line? Actually I don't care about
>> > > if()
>> > > {
>> > >   dings();
>> > > }
>> > or
>> >
>> > > if() {
>> > >   dings();
>> > > }
>> > but we should only use one stile throughout the whole code.
>> >
>> >
>>
>> I don't mind either way here, comfortable with either as long as we pick
>> one and are consistent with it.
>>
>>
>>
>> >
>> > 3.) force bracelets
>> >
>> >  no
>> >
>> > > if()
>> >
>> > >   dosomething;
>> >
>> > without bracelets. Instead force:
>> > > if()
>> > > {
>> >
>> > >   dosomething;
>> > > }
>> >
>> >
>> +1
>>
>>
>> >
>> > I'm sure there is a bit more, thus please add the rules which are
>> > important for you.
>> > (PS: once we found a final solution we should move this into our wiki +
>> > provide Eclipse and Idea checkstyle rules.
>> >
>>
>>
>> One thing to decide is indent size.  Currently in Seam we use 4 spaces, as
>> we've recently adopted the JBoss coding standards.  Personally, I think
>> this is a little too much, previously we had 3 spaces (Gavin's preference)
>> which I thought was better.
>>
>>
>>
>> >
>> >
>> > LieGrue,
>> > strub
>> >
>> >
>>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Re: basic decisions - coding conventions

Posted by Gerhard Petracek <gp...@apache.org>.
+1 for 4 spaces

regards,
gerhard



2011/12/12 Shane Bryzak <sb...@gmail.com>

> On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:
>
> > Hi!
> >
> > I'm a fan of a pretty tight coding convention observation even at build
> > time.
> >
> > What we usually have (in owb and myfaces) is an own 'buildtools' project
> > which contains the checkstyle rules as own artifact.
> > This will then be used in the deltaspike-parent pom as dependency of the
> > maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >
> > The more important thing is to decide _which_ coding conventions we like
> > to follow at all?
> >
> > I have the following suggestions:
> >
> > 1.) no tabs, only spaces!
> >
>
> +1, tabs suck
>
>
>
> >
> > 2.) bracelets on new line? Actually I don't care about
> > > if()
> > > {
> > >   dings();
> > > }
> > or
> >
> > > if() {
> > >   dings();
> > > }
> > but we should only use one stile throughout the whole code.
> >
> >
>
> I don't mind either way here, comfortable with either as long as we pick
> one and are consistent with it.
>
>
>
> >
> > 3.) force bracelets
> >
> >  no
> >
> > > if()
> >
> > >   dosomething;
> >
> > without bracelets. Instead force:
> > > if()
> > > {
> >
> > >   dosomething;
> > > }
> >
> >
> +1
>
>
> >
> > I'm sure there is a bit more, thus please add the rules which are
> > important for you.
> > (PS: once we found a final solution we should move this into our wiki +
> > provide Eclipse and Idea checkstyle rules.
> >
>
>
> One thing to decide is indent size.  Currently in Seam we use 4 spaces, as
> we've recently adopted the JBoss coding standards.  Personally, I think
> this is a little too much, previously we had 3 spaces (Gavin's preference)
> which I thought was better.
>
>
>
> >
> >
> > LieGrue,
> > strub
> >
> >
>

Re: basic decisions - coding conventions

Posted by Shane Bryzak <sb...@gmail.com>.
On Mon, Dec 12, 2011 at 9:37 PM, Mark Struberg <st...@yahoo.de> wrote:

> Hi!
>
> I'm a fan of a pretty tight coding convention observation even at build
> time.
>
> What we usually have (in owb and myfaces) is an own 'buildtools' project
> which contains the checkstyle rules as own artifact.
> This will then be used in the deltaspike-parent pom as dependency of the
> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>
> The more important thing is to decide _which_ coding conventions we like
> to follow at all?
>
> I have the following suggestions:
>
> 1.) no tabs, only spaces!
>

+1, tabs suck



>
> 2.) bracelets on new line? Actually I don't care about
> > if()
> > {
> >   dings();
> > }
> or
>
> > if() {
> >   dings();
> > }
> but we should only use one stile throughout the whole code.
>
>

I don't mind either way here, comfortable with either as long as we pick
one and are consistent with it.



>
> 3.) force bracelets
>
>  no
>
> > if()
>
> >   dosomething;
>
> without bracelets. Instead force:
> > if()
> > {
>
> >   dosomething;
> > }
>
>
+1


>
> I'm sure there is a bit more, thus please add the rules which are
> important for you.
> (PS: once we found a final solution we should move this into our wiki +
> provide Eclipse and Idea checkstyle rules.
>


One thing to decide is indent size.  Currently in Seam we use 4 spaces, as
we've recently adopted the JBoss coding standards.  Personally, I think
this is a little too much, previously we had 3 spaces (Gavin's preference)
which I thought was better.



>
>
> LieGrue,
> strub
>
>

Re: basic decisions - coding conventions

Posted by "John D. Ament" <jo...@gmail.com>.
+1 for George's notes as well.

Just want to make sure we have coding style plugins (for netbeans, eclipse)
available when we start this up...

John

On Mon, Dec 12, 2011 at 6:43 AM, George Gastaldi <ge...@gmail.com>wrote:

> Here are my opinions:
>
> 1) Ok
> 2) Bracelets on same line
> 3) force Bracelets
>
> Regards,
>
> George
>
> Em 12/12/2011, às 09:37, Mark Struberg <st...@yahoo.de> escreveu:
>
> > Hi!
> >
> > I'm a fan of a pretty tight coding convention observation even at build
> time.
> >
> > What we usually have (in owb and myfaces) is an own 'buildtools' project
> which contains the checkstyle rules as own artifact.
> > This will then be used in the deltaspike-parent pom as dependency of the
> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >
> > The more important thing is to decide _which_ coding conventions we like
> to follow at all?
> >
> > I have the following suggestions:
> >
> > 1.) no tabs, only spaces!
> >
> > 2.) bracelets on new line? Actually I don't care about
> >> if()
> >> {
> >>    dings();
> >> }
> > or
> >
> >> if() {
> >>    dings();
> >> }
> > but we should only use one stile throughout the whole code.
> >
> >
> > 3.) force bracelets
> >
> >  no
> >
> >> if()
> >
> >>    dosomething;
> >
> > without bracelets. Instead force:
> >> if()
> >> {
> >
> >>    dosomething;
> >> }
> >
> >
> > I'm sure there is a bit more, thus please add the rules which are
> important for you.
> > (PS: once we found a final solution we should move this into our wiki +
> provide Eclipse and Idea checkstyle rules.
> >
> >
> > LieGrue,
> > strub
> >
>

Re: basic decisions - coding conventions

Posted by George Gastaldi <ge...@gmail.com>.
Here are my opinions:

1) Ok
2) Bracelets on same line
3) force Bracelets

Regards,

George

Em 12/12/2011, às 09:37, Mark Struberg <st...@yahoo.de> escreveu:

> Hi!
>
> I'm a fan of a pretty tight coding convention observation even at build time.
>
> What we usually have (in owb and myfaces) is an own 'buildtools' project which contains the checkstyle rules as own artifact.
> This will then be used in the deltaspike-parent pom as dependency of the maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>
> The more important thing is to decide _which_ coding conventions we like to follow at all?
>
> I have the following suggestions:
>
> 1.) no tabs, only spaces!
>
> 2.) bracelets on new line? Actually I don't care about
>> if()
>> {
>>    dings();
>> }
> or
>
>> if() {
>>    dings();
>> }
> but we should only use one stile throughout the whole code.
>
>
> 3.) force bracelets
>
>  no
>
>> if()
>
>>    dosomething;
>
> without bracelets. Instead force:
>> if()
>> {
>
>>    dosomething;
>> }
>
>
> I'm sure there is a bit more, thus please add the rules which are important for you.
> (PS: once we found a final solution we should move this into our wiki + provide Eclipse and Idea checkstyle rules.
>
>
> LieGrue,
> strub
>

Re: basic decisions - coding conventions

Posted by Gerhard Petracek <gp...@apache.org>.
at myfaces we have:

#1 spaces
#2 new line
#3 force bracelets

regards,
gerhard



2011/12/12 Mark Struberg <st...@yahoo.de>

> Hi!
>
> I'm a fan of a pretty tight coding convention observation even at build
> time.
>
> What we usually have (in owb and myfaces) is an own 'buildtools' project
> which contains the checkstyle rules as own artifact.
> This will then be used in the deltaspike-parent pom as dependency of the
> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>
> The more important thing is to decide _which_ coding conventions we like
> to follow at all?
>
> I have the following suggestions:
>
> 1.) no tabs, only spaces!
>
> 2.) bracelets on new line? Actually I don't care about
> > if()
> > {
> >   dings();
> > }
> or
>
> > if() {
> >   dings();
> > }
> but we should only use one stile throughout the whole code.
>
>
> 3.) force bracelets
>
>  no
>
> > if()
>
> >   dosomething;
>
> without bracelets. Instead force:
> > if()
> > {
>
> >   dosomething;
> > }
>
>
> I'm sure there is a bit more, thus please add the rules which are
> important for you.
> (PS: once we found a final solution we should move this into our wiki +
> provide Eclipse and Idea checkstyle rules.
>
>
> LieGrue,
> strub
>
>

Re: basic decisions - coding conventions

Posted by Gerhard Petracek <ge...@gmail.com>.
hi @ all,

i created [1] for collecting the suggestions.
if you don't like one of the mentioned conventions, add your own suggestion.
i'll start a vote about it on monday.

regards,
gerhard

[1] https://issues.apache.org/jira/browse/DELTASPIKE-12



2011/12/12 Jason Porter <li...@gmail.com>

> +1 to 120
>
> The rest I'm okay with as well.
>
> On Mon, Dec 12, 2011 at 11:24, Jason Porter <li...@gmail.com>
> wrote:
>
> > On Mon, Dec 12, 2011 at 04:37, Mark Struberg <st...@yahoo.de> wrote:
> >
> >> Hi!
> >>
> >> I'm a fan of a pretty tight coding convention observation even at build
> >> time.
> >>
> >> What we usually have (in owb and myfaces) is an own 'buildtools' project
> >> which contains the checkstyle rules as own artifact.
> >> This will then be used in the deltaspike-parent pom as dependency of the
> >> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
> >>
> >> The more important thing is to decide _which_ coding conventions we like
> >> to follow at all?
> >>
> >> I have the following suggestions:
> >>
> >> 1.) no tabs, only spaces!
> >>
> > +1
> >
> >
> >> 2.) bracelets on new line? Actually I don't care about
> >> > if()
> >> > {
> >> >   dings();
> >> > }
> >> or
> >>
> >> > if() {
> >> >   dings();
> >> > }
> >> but we should only use one stile throughout the whole code.
> >>
> > +1
> >
> >
> >>
> >> 3.) force bracelets
> >>
> >>  no
> >>
> >> > if()
> >>
> >> >   dosomething;
> >>
> > +1
> >
> >
> >> without bracelets. Instead force:
> >> > if()
> >> > {
> >>
> >> >   dosomething;
> >> > }
> >>
> >>
> >> I'm sure there is a bit more, thus please add the rules which are
> >> important for you.
> >> (PS: once we found a final solution we should move this into our wiki +
> >> provide Eclipse and Idea checkstyle rules.
> >>
> >>
> >> LieGrue,
> >> strub
> >>
> >>
> > Line width? Indentation width?
> >
> > --
> > Jason Porter
> > http://lightguard-jp.blogspot.com
> > http://twitter.com/lightguardjp
> >
> > Software Engineer
> > Open Source Advocate
> > Author of Seam Catch - Next Generation Java Exception Handling
> >
> > PGP key id: 926CCFF5
> > PGP key available at: keyserver.net, pgp.mit.edu
> >
>
>
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
>

Re: basic decisions - coding conventions

Posted by Jason Porter <li...@gmail.com>.
+1 to 120

The rest I'm okay with as well.

On Mon, Dec 12, 2011 at 11:24, Jason Porter <li...@gmail.com> wrote:

> On Mon, Dec 12, 2011 at 04:37, Mark Struberg <st...@yahoo.de> wrote:
>
>> Hi!
>>
>> I'm a fan of a pretty tight coding convention observation even at build
>> time.
>>
>> What we usually have (in owb and myfaces) is an own 'buildtools' project
>> which contains the checkstyle rules as own artifact.
>> This will then be used in the deltaspike-parent pom as dependency of the
>> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>>
>> The more important thing is to decide _which_ coding conventions we like
>> to follow at all?
>>
>> I have the following suggestions:
>>
>> 1.) no tabs, only spaces!
>>
> +1
>
>
>> 2.) bracelets on new line? Actually I don't care about
>> > if()
>> > {
>> >   dings();
>> > }
>> or
>>
>> > if() {
>> >   dings();
>> > }
>> but we should only use one stile throughout the whole code.
>>
> +1
>
>
>>
>> 3.) force bracelets
>>
>>  no
>>
>> > if()
>>
>> >   dosomething;
>>
> +1
>
>
>> without bracelets. Instead force:
>> > if()
>> > {
>>
>> >   dosomething;
>> > }
>>
>>
>> I'm sure there is a bit more, thus please add the rules which are
>> important for you.
>> (PS: once we found a final solution we should move this into our wiki +
>> provide Eclipse and Idea checkstyle rules.
>>
>>
>> LieGrue,
>> strub
>>
>>
> Line width? Indentation width?
>
> --
> Jason Porter
> http://lightguard-jp.blogspot.com
> http://twitter.com/lightguardjp
>
> Software Engineer
> Open Source Advocate
> Author of Seam Catch - Next Generation Java Exception Handling
>
> PGP key id: 926CCFF5
> PGP key available at: keyserver.net, pgp.mit.edu
>



-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Re: basic decisions - coding conventions

Posted by Jason Porter <li...@gmail.com>.
On Mon, Dec 12, 2011 at 04:37, Mark Struberg <st...@yahoo.de> wrote:

> Hi!
>
> I'm a fan of a pretty tight coding convention observation even at build
> time.
>
> What we usually have (in owb and myfaces) is an own 'buildtools' project
> which contains the checkstyle rules as own artifact.
> This will then be used in the deltaspike-parent pom as dependency of the
> maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>
> The more important thing is to decide _which_ coding conventions we like
> to follow at all?
>
> I have the following suggestions:
>
> 1.) no tabs, only spaces!
>
+1


> 2.) bracelets on new line? Actually I don't care about
> > if()
> > {
> >   dings();
> > }
> or
>
> > if() {
> >   dings();
> > }
> but we should only use one stile throughout the whole code.
>
+1


>
> 3.) force bracelets
>
>  no
>
> > if()
>
> >   dosomething;
>
+1


> without bracelets. Instead force:
> > if()
> > {
>
> >   dosomething;
> > }
>
>
> I'm sure there is a bit more, thus please add the rules which are
> important for you.
> (PS: once we found a final solution we should move this into our wiki +
> provide Eclipse and Idea checkstyle rules.
>
>
> LieGrue,
> strub
>
>
Line width? Indentation width?

-- 
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp

Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling

PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu

Re: basic decisions - coding conventions

Posted by Matthias Wessendorf <ma...@apache.org>.
On Mon, Dec 12, 2011 at 12:37 PM, Mark Struberg <st...@yahoo.de> wrote:
> Hi!
>
> I'm a fan of a pretty tight coding convention observation even at build time.
>
> What we usually have (in owb and myfaces) is an own 'buildtools' project which contains the checkstyle rules as own artifact.
> This will then be used in the deltaspike-parent pom as dependency of the maven-checkstyle-plugin. I'll set this up, no worries, easy stuff.
>
> The more important thing is to decide _which_ coding conventions we like to follow at all?
>
> I have the following suggestions:
>
> 1.) no tabs, only spaces!

+1

>
> 2.) bracelets on new line? Actually I don't care about
>> if() {
>>   dings();
>> }

+1

> but we should only use one stile throughout the whole code.
>
>
> 3.) force bracelets
>
>  no
>
>> if()
>
>>   dosomething;
>
> without bracelets. Instead force:
>> if()
>> {
>
>>   dosomething;
>> }

+1 for always:
if(blah) {
  blub();
}

>
>
> I'm sure there is a bit more, thus please add the rules which are important for you.
> (PS: once we found a final solution we should move this into our wiki + provide Eclipse and Idea checkstyle rules.
>
>
> LieGrue,
> strub
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf