You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Donal Lafferty <do...@citrix.com> on 2013/07/16 15:02:05 UTC

[discuss] 80 char max length leads to illegiable source

This issue appeared when I used StyleCheck and Eclipse to find and fix my coding convention violations automatically.  Details at http://dlafferty.blogspot.co.uk/2013/07/apache-cloudstack-java-coding.html

We inherit the 80 char line limit inherited from the Java Programming Style, and it makes my tests unreadable.  JSON serialised objects in long strings are confusing.  Readability problems also arise in non-test Java source.
Can we loosen/ignore this rule when readability becomes an issue?


DL


RE: [discuss] 80 char max length leads to illegiable source

Posted by Donal Lafferty <do...@citrix.com>.
> -----Original Message-----
> From: Joe Brockmeier [mailto:jzb@zonker.net]
> Sent: 16 July 2013 3:02 PM
> To: dev@cloudstack.apache.org
> Subject: Re: [discuss] 80 char max length leads to illegiable source
> 
> On Tue, Jul 16, 2013, at 08:02 AM, Donal Lafferty wrote:
> > Can we loosen/ignore this rule when readability becomes an issue?
> 
> Alex raised this issue last week:
> 
> http://markmail.org/message/z2hzz7efujgmhfnh
> 
[Donal Lafferty] 
Can I check the StyleCode rules into tools/stylecode/acs_codestyle.xml ?

My reasoning is that extra eyes will see things I forgot.  Also, the code conventions change over time.

Separate, the code conventions need to be updated from "120" to "180".  See http://cloudstack.apache.org/develop/coding-conventions.html  :(


Re: [discuss] 80 char max length leads to illegiable source

Posted by Joe Brockmeier <jz...@zonker.net>.
On Tue, Jul 16, 2013, at 08:02 AM, Donal Lafferty wrote:
> Can we loosen/ignore this rule when readability becomes an issue?

Alex raised this issue last week:

http://markmail.org/message/z2hzz7efujgmhfnh

I didn't see many responses to that particular part of his email,
though. 

Personally, I think arbitrary maxlength at any column width is a PITA -
but I spend most of my time looking at XML with prose rather than
Java...

I'd support a longer line length or keeping the 80 character limit, but
I think it should be changed across the board if we change it. (i.e.,
not just for "some" files.)

(This StackOverflow discussion might be worthwhile reading before making
a decision:
http://stackoverflow.com/questions/903754/do-you-still-limit-line-length-in-code)


Best,

jzb
-- 
Joe Brockmeier
jzb@zonker.net
Twitter: @jzb
http://www.dissociatedpress.net/

Re: [discuss] 80 char max length leads to illegiable source

Posted by Isaac Chiang <is...@gmail.com>.
Hi all:
        Can we also have the coding convention for javascript on WIKI page?
I found there are many "tab indents" and less styled code blocks in the UI
code.


Thanks,




On Tue, Jul 16, 2013 at 11:49 PM, Joe Brockmeier <jz...@zonker.net> wrote:

> On Tue, Jul 16, 2013, at 10:37 AM, Alex Huang wrote:
> > I updated the wiki because several people asked me to post my eclipse
> > preference file which includes 180 column widths.  There's also a follow
> > up mail thread after I checked it in.  The column width was not
> > questioned.  I can send out a separate proposal if needed but supposedly
> > developers are already using it.
>
> I'm not asking to roll it back or restart a discussion - just saying in
> the future, it'd be good to break out "should we do this?" into a
> discussion thread rather than having it as a small part of a larger
> email that doesn't look like someone's making a proposal.
>
> Thanks,
>
> Joe
> --
> Joe Brockmeier
> jzb@zonker.net
> Twitter: @jzb
> http://www.dissociatedpress.net/
>

Re: [discuss] 80 char max length leads to illegiable source

Posted by Joe Brockmeier <jz...@zonker.net>.
On Tue, Jul 16, 2013, at 10:37 AM, Alex Huang wrote:
> I updated the wiki because several people asked me to post my eclipse
> preference file which includes 180 column widths.  There's also a follow
> up mail thread after I checked it in.  The column width was not
> questioned.  I can send out a separate proposal if needed but supposedly
> developers are already using it.

I'm not asking to roll it back or restart a discussion - just saying in
the future, it'd be good to break out "should we do this?" into a
discussion thread rather than having it as a small part of a larger
email that doesn't look like someone's making a proposal.

Thanks,
 
Joe
-- 
Joe Brockmeier
jzb@zonker.net
Twitter: @jzb
http://www.dissociatedpress.net/

RE: [discuss] 80 char max length leads to illegiable source

Posted by Alex Huang <Al...@citrix.com>.
I updated the wiki because several people asked me to post my eclipse preference file which includes 180 column widths.  There's also a follow up mail thread after I checked it in.  The column width was not questioned.  I can send out a separate proposal if needed but supposedly developers are already using it.

--Alex

> -----Original Message-----
> From: Joe Brockmeier [mailto:jzb@zonker.net]
> Sent: Tuesday, July 16, 2013 7:26 AM
> To: dev@cloudstack.apache.org
> Subject: Re: [discuss] 80 char max length leads to illegiable source
> 
> On Tue, Jul 16, 2013, at 08:53 AM, Alex Huang wrote:
> > Donal,
> >
> > Our coding convention says 180.  It was discussed about a week or two
> > back.
> 
> So, I am surprised that it's already been changed. I noticed the comment
> when I was doing the weekly news - but it was buried in an email with the
> subject "coding convention reminder" - which tells most readers "this email is
> a reminder, there are no changes involved in this." There was no discussion
> of the change, though there was discussion about the Eclipse templates, etc.
> 
> In the future, might be good to break out proposals for changes in a separate
> email. I suspect a few folks are going to be surprised by the change.
> 
> Best,
> 
> jzb
> --
> Joe Brockmeier
> jzb@zonker.net
> Twitter: @jzb
> http://www.dissociatedpress.net/

Re: [discuss] 80 char max length leads to illegiable source

Posted by Joe Brockmeier <jz...@zonker.net>.
On Tue, Jul 16, 2013, at 08:53 AM, Alex Huang wrote:
> Donal,
> 
> Our coding convention says 180.  It was discussed about a week or two
> back.

So, I am surprised that it's already been changed. I noticed the comment
when I was doing the weekly news - but it was buried in an email with
the subject "coding convention reminder" - which tells most readers
"this email is a reminder, there are no changes involved in this." There
was no discussion of the change, though there was discussion about the
Eclipse templates, etc.

In the future, might be good to break out proposals for changes in a
separate email. I suspect a few folks are going to be surprised by the
change. 

Best,

jzb
-- 
Joe Brockmeier
jzb@zonker.net
Twitter: @jzb
http://www.dissociatedpress.net/

RE: [discuss] 80 char max length leads to illegiable source

Posted by Donal Lafferty <do...@citrix.com>.
My mistake.  I'll have to update my style rules.

DL

> -----Original Message-----
> From: Alex Huang [mailto:Alex.Huang@citrix.com]
> Sent: 16 July 2013 2:54 PM
> To: dev@cloudstack.apache.org
> Subject: RE: [discuss] 80 char max length leads to illegiable source
> 
> Donal,
> 
> Our coding convention says 180.  It was discussed about a week or two back.
> 
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/Coding+conventi
> ons
> 
> --Alex
> 
> > -----Original Message-----
> > From: Donal Lafferty [mailto:donal.lafferty@citrix.com]
> > Sent: Tuesday, July 16, 2013 6:02 AM
> > To: dev@cloudstack.apache.org
> > Subject: [discuss] 80 char max length leads to illegiable source
> >
> > This issue appeared when I used StyleCheck and Eclipse to find and fix
> > my coding convention violations automatically.  Details at
> > http://dlafferty.blogspot.co.uk/2013/07/apache-cloudstack-java-coding.
> > html
> >
> > We inherit the 80 char line limit inherited from the Java Programming
> > Style, and it makes my tests unreadable.  JSON serialised objects in
> > long strings are confusing.  Readability problems also arise in non-test Java
> source.
> > Can we loosen/ignore this rule when readability becomes an issue?
> >
> >
> > DL


RE: [discuss] 80 char max length leads to illegiable source

Posted by Alex Huang <Al...@citrix.com>.
Donal,

Our coding convention says 180.  It was discussed about a week or two back.

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Coding+conventions

--Alex

> -----Original Message-----
> From: Donal Lafferty [mailto:donal.lafferty@citrix.com]
> Sent: Tuesday, July 16, 2013 6:02 AM
> To: dev@cloudstack.apache.org
> Subject: [discuss] 80 char max length leads to illegiable source
> 
> This issue appeared when I used StyleCheck and Eclipse to find and fix my
> coding convention violations automatically.  Details at
> http://dlafferty.blogspot.co.uk/2013/07/apache-cloudstack-java-coding.html
> 
> We inherit the 80 char line limit inherited from the Java Programming Style,
> and it makes my tests unreadable.  JSON serialised objects in long strings are
> confusing.  Readability problems also arise in non-test Java source.
> Can we loosen/ignore this rule when readability becomes an issue?
> 
> 
> DL