You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Laxman <la...@huawei.com> on 2012/03/22 06:17:21 UTC

HBASE Code format

Hi Devs,

How about raising the "max line width" from 80 (to 100 or 120)?
IMO, 80 characters length is too low & it makes the code bit ugly.

Example:
    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
System.currentTimeMillis());

Above code snippet after formatting, it turned to

    long timstamp = conf
        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());

Please respond with your opinion considering the following points.

- Sun Java coding standards drafted in 1999
- Terminals(Monitors) we are using now are very wider and 80 characters is
not a valid limit anymore.
- As per Ted, Google raised this limit
[https://issues.apache.org/jira/browse/HBASE-5564]

Note: We don't need to reformat entire codebase. My proposal is to apply
these standards to new code getting commited.

--
Regards,
Laxman



RE: HBASE Code format

Posted by Laxman <la...@huawei.com>.
Somehow, example in my previous mail got reformatted. Its not exactly the
same what I had posted.

For correct example please refer to 

https://issues.apache.org/jira/browse/HBASE-5564?focusedCommentId=13235342
<https://issues.apache.org/jira/browse/HBASE-5564?focusedCommentId=13235342&
page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#commen
t-13235342>
&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comme
nt-13235342

 

--

Regards,

Laxman

 

From: Ted Yu [mailto:yuzhihong@gmail.com] 
Sent: Thursday, March 22, 2012 10:56 AM
To: dev@hbase.apache.org; lakshman.ch@huawei.com
Subject: Re: HBASE Code format

 

For the code snippet, would line return immediately before
System.currentTimeMillis() look better ?

w.r.t. code review practice at Google, I contacted two friends - one in
Google Earth, one in Android team.
The limit at Google is 100 characters.

I am fine with increasing the limit to 100.

Cheers

On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:

Hi Devs,

How about raising the "max line width" from 80 (to 100 or 120)?
IMO, 80 characters length is too low & it makes the code bit ugly.

Example:
   long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
System.currentTimeMillis());

Above code snippet after formatting, it turned to

   long timstamp = conf
       .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());

Please respond with your opinion considering the following points.

- Sun Java coding standards drafted in 1999
- Terminals(Monitors) we are using now are very wider and 80 characters is
not a valid limit anymore.
- As per Ted, Google raised this limit
[https://issues.apache.org/jira/browse/HBASE-5564]

Note: We don't need to reformat entire codebase. My proposal is to apply
these standards to new code getting commited.

--
Regards,
Laxman



 


RE: HBASE Code format

Posted by Uma Maheswara Rao G <ma...@huawei.com>.
I am +1.

I also felt many times that, for the sake of the code formatting we are wrapping the lines into 2. That may not look good always. Line limit for 100 characters would be fine.

________________________________________
From: Ted Yu [yuzhihong@gmail.com]
Sent: Thursday, March 22, 2012 10:56 AM
To: dev@hbase.apache.org; V v lakshmana kumar chekka
Subject: Re: HBASE Code format

For the code snippet, would line return immediately before
System.currentTimeMillis() look better ?

w.r.t. code review practice at Google, I contacted two friends - one in
Google Earth, one in Android team.
The limit at Google is 100 characters.

I am fine with increasing the limit to 100.

Cheers

On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:

> Hi Devs,
>
> How about raising the "max line width" from 80 (to 100 or 120)?
> IMO, 80 characters length is too low & it makes the code bit ugly.
>
> Example:
>    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> System.currentTimeMillis());
>
> Above code snippet after formatting, it turned to
>
>    long timstamp = conf
>        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>
> Please respond with your opinion considering the following points.
>
> - Sun Java coding standards drafted in 1999
> - Terminals(Monitors) we are using now are very wider and 80 characters is
> not a valid limit anymore.
> - As per Ted, Google raised this limit
> [https://issues.apache.org/jira/browse/HBASE-5564]
>
> Note: We don't need to reformat entire codebase. My proposal is to apply
> these standards to new code getting commited.
>
> --
> Regards,
> Laxman
>
>
>

Re: HBASE Code format

Posted by Ted Yu <yu...@gmail.com>.
For the code snippet, would line return immediately before
System.currentTimeMillis() look better ?

w.r.t. code review practice at Google, I contacted two friends - one in
Google Earth, one in Android team.
The limit at Google is 100 characters.

I am fine with increasing the limit to 100.

Cheers

On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:

> Hi Devs,
>
> How about raising the "max line width" from 80 (to 100 or 120)?
> IMO, 80 characters length is too low & it makes the code bit ugly.
>
> Example:
>    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> System.currentTimeMillis());
>
> Above code snippet after formatting, it turned to
>
>    long timstamp = conf
>        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>
> Please respond with your opinion considering the following points.
>
> - Sun Java coding standards drafted in 1999
> - Terminals(Monitors) we are using now are very wider and 80 characters is
> not a valid limit anymore.
> - As per Ted, Google raised this limit
> [https://issues.apache.org/jira/browse/HBASE-5564]
>
> Note: We don't need to reformat entire codebase. My proposal is to apply
> these standards to new code getting commited.
>
> --
> Regards,
> Laxman
>
>
>

RE: HBASE Code format

Posted by "Ramkrishna.S.Vasudevan" <ra...@huawei.com>.
+1.

> -----Original Message-----
> From: Laxman [mailto:lakshman.ch@huawei.com]
> Sent: Thursday, March 22, 2012 10:47 AM
> To: dev@hbase.apache.org
> Subject: HBASE Code format
> 
> Hi Devs,
> 
> How about raising the "max line width" from 80 (to 100 or 120)?
> IMO, 80 characters length is too low & it makes the code bit ugly.
> 
> Example:
>     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> System.currentTimeMillis());
> 
> Above code snippet after formatting, it turned to
> 
>     long timstamp = conf
>         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
> 
> Please respond with your opinion considering the following points.
> 
> - Sun Java coding standards drafted in 1999
> - Terminals(Monitors) we are using now are very wider and 80 characters
> is
> not a valid limit anymore.
> - As per Ted, Google raised this limit
> [https://issues.apache.org/jira/browse/HBASE-5564]
> 
> Note: We don't need to reformat entire codebase. My proposal is to
> apply
> these standards to new code getting commited.
> 
> --
> Regards,
> Laxman



Re: HBASE Code format

Posted by lars hofhansl <lh...@yahoo.com>.
Cool.

Also need to fix the formatter here: https://issues.apache.org/jira/browse/HBASE-3678

-- Lars



----- Original Message -----
From: Doug Meil <do...@explorysmedical.com>
To: "dev@hbase.apache.org" <de...@hbase.apache.org>; "lakshman.ch@huawei.com" <la...@huawei.com>
Cc: 
Sent: Friday, March 23, 2012 11:38 AM
Subject: Re: HBASE Code format


I'll update for 100.





On 3/22/12 3:10 PM, "Stack" <st...@duboce.net> wrote:

>On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
>> Note: We don't need to reformat entire codebase. My proposal is to apply
>> these standards to new code getting commited.
>>
>
>I have no strong opinion other than if we are going to change it, lets
>make a noticeable change.  I'd vote for 120.
>
>We have some doc. on conventions here:
>http://hbase.apache.org/book.html#submitting.patches  There is a
>section on keeping it under 80 chars.  All that would be needed
>methinks is update this section and any lint checking tools to allow
>120 char lines going forward.
>
>Good stuff,
>St.Ack
>

Re: HBASE Code format

Posted by Stack <st...@duboce.net>.
On Fri, Mar 23, 2012 at 11:38 AM, Doug Meil
<do...@explorysmedical.com> wrote:
>
> I'll update for 100.
>

Note that our reason for making it 100 characters from here on out is
because that is the max width allowed if you want to put up two
windows side-by-side on a clunky thinkpad using small font.  You know
someone is going to ask why we changed so we need to have a good
reason.  Don't forget to note that its Todd's laptop rather than just
anyone's else they'll think us frivolous.

Good stuff,
St.Ack

Re: HBASE Code format

Posted by Harsh J <ha...@cloudera.com>.
Ah I always forget the patches part somehow. Thanks for correcting me
there Todd.

On Fri, Mar 23, 2012 at 1:12 AM, Todd Lipcon <to...@cloudera.com> wrote:
> Please no codebase-wide reformat. It makes moving patches between
> versions a huge pain in the butt, and loses blame data like Harsh
> said.
>
> I find 120 characters too wide - on my laptop screen I can't
> reasonable fit two windows of code side by side if they're that wide.
> 100's about as much as I can fit (and I use a tiny font, too!)
>
> -Todd
>
> On Thu, Mar 22, 2012 at 12:15 PM, Harsh J <ha...@cloudera.com> wrote:
>> On Fri, Mar 23, 2012 at 12:40 AM, Stack <st...@duboce.net> wrote:
>>> On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
>>>> Note: We don't need to reformat entire codebase. My proposal is to apply
>>>> these standards to new code getting commited.
>>
>> I think if it is to change, it should entirely change than appear
>> inconsistent (and hence, 'ugly'). I understand the only concern here
>> would be loss of valuable "git blame" form of data? There may be
>> tricks to avoid that though (user or server side).
>>
>> --
>> Harsh J
>
>
>
> --
> Todd Lipcon
> Software Engineer, Cloudera



-- 
Harsh J

Re: HBASE Code format

Posted by Todd Lipcon <to...@cloudera.com>.
Please no codebase-wide reformat. It makes moving patches between
versions a huge pain in the butt, and loses blame data like Harsh
said.

I find 120 characters too wide - on my laptop screen I can't
reasonable fit two windows of code side by side if they're that wide.
100's about as much as I can fit (and I use a tiny font, too!)

-Todd

On Thu, Mar 22, 2012 at 12:15 PM, Harsh J <ha...@cloudera.com> wrote:
> On Fri, Mar 23, 2012 at 12:40 AM, Stack <st...@duboce.net> wrote:
>> On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
>>> Note: We don't need to reformat entire codebase. My proposal is to apply
>>> these standards to new code getting commited.
>
> I think if it is to change, it should entirely change than appear
> inconsistent (and hence, 'ugly'). I understand the only concern here
> would be loss of valuable "git blame" form of data? There may be
> tricks to avoid that though (user or server side).
>
> --
> Harsh J



-- 
Todd Lipcon
Software Engineer, Cloudera

Re: HBASE Code format

Posted by Matt Corgan <mc...@hotpads.com>.
I used to work in a little brick building on the canal in Washington, DC
where they invented the punchcard early last century.  If they had just
foreseen self-documenting code with things like generic HashMap
declarations they I think they might have gone with 120 =)


On Thu, Mar 22, 2012 at 12:15 PM, Harsh J <ha...@cloudera.com> wrote:

> On Fri, Mar 23, 2012 at 12:40 AM, Stack <st...@duboce.net> wrote:
> > On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
> >> Note: We don't need to reformat entire codebase. My proposal is to apply
> >> these standards to new code getting commited.
>
> I think if it is to change, it should entirely change than appear
> inconsistent (and hence, 'ugly'). I understand the only concern here
> would be loss of valuable "git blame" form of data? There may be
> tricks to avoid that though (user or server side).
>
> --
> Harsh J
>

Re: HBASE Code format

Posted by Harsh J <ha...@cloudera.com>.
On Fri, Mar 23, 2012 at 12:40 AM, Stack <st...@duboce.net> wrote:
> On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
>> Note: We don't need to reformat entire codebase. My proposal is to apply
>> these standards to new code getting commited.

I think if it is to change, it should entirely change than appear
inconsistent (and hence, 'ugly'). I understand the only concern here
would be loss of valuable "git blame" form of data? There may be
tricks to avoid that though (user or server side).

-- 
Harsh J

Re: HBASE Code format

Posted by Doug Meil <do...@explorysmedical.com>.
I'll update for 100.





On 3/22/12 3:10 PM, "Stack" <st...@duboce.net> wrote:

>On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
>> Note: We don't need to reformat entire codebase. My proposal is to apply
>> these standards to new code getting commited.
>>
>
>I have no strong opinion other than if we are going to change it, lets
>make a noticeable change.  I'd vote for 120.
>
>We have some doc. on conventions here:
>http://hbase.apache.org/book.html#submitting.patches  There is a
>section on keeping it under 80 chars.  All that would be needed
>methinks is update this section and any lint checking tools to allow
>120 char lines going forward.
>
>Good stuff,
>St.Ack
>



Re: HBASE Code format

Posted by Stack <st...@duboce.net>.
On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
> Note: We don't need to reformat entire codebase. My proposal is to apply
> these standards to new code getting commited.
>

I have no strong opinion other than if we are going to change it, lets
make a noticeable change.  I'd vote for 120.

We have some doc. on conventions here:
http://hbase.apache.org/book.html#submitting.patches  There is a
section on keeping it under 80 chars.  All that would be needed
methinks is update this section and any lint checking tools to allow
120 char lines going forward.

Good stuff,
St.Ack

Re: HBASE Code format

Posted by Harsh J <ha...@cloudera.com>.
ZooKeeper lists had this suggestion not too long ago as well, and I
thought you may want to read it (generally):
http://search-hadoop.com/m/V5rEj26dhec1

On Fri, Mar 23, 2012 at 12:06 AM, Enis Söztutar <en...@apache.org> wrote:
> I am in favor of 120. A balance between allowing longer lines, while
> keeping a sane limit. Also 100 is better than 80, so I would be fine with
> that.
>
> Enis
>
> On Thu, Mar 22, 2012 at 9:50 AM, Dave Wang <ds...@cloudera.com> wrote:
>
>> +1 on Lars's comment.
>>
>> On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com>
>> wrote:
>>
>> > Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no limit
>> > is fine with me.
>> > Would personally prefer no limit. Instead leave it up to the good taste
>> of
>> > the contributors and us committers to format the code in the most
>> readable
>> > way.
>> >
>> >
>> > -- Lars
>> >
>> >
>> > ________________________________
>> >  From: Laxman <la...@huawei.com>
>> > To: dev@hbase.apache.org
>> > Sent: Wednesday, March 21, 2012 10:17 PM
>> > Subject: HBASE Code format
>> >
>> > Hi Devs,
>> >
>> > How about raising the "max line width" from 80 (to 100 or 120)?
>> > IMO, 80 characters length is too low & it makes the code bit ugly.
>> >
>> > Example:
>> >     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
>> > System.currentTimeMillis());
>> >
>> > Above code snippet after formatting, it turned to
>> >
>> >     long timstamp = conf
>> >         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>> >
>> > Please respond with your opinion considering the following points.
>> >
>> > - Sun Java coding standards drafted in 1999
>> > - Terminals(Monitors) we are using now are very wider and 80 characters
>> is
>> > not a valid limit anymore.
>> > - As per Ted, Google raised this limit
>> > [https://issues.apache.org/jira/browse/HBASE-5564]
>> >
>> > Note: We don't need to reformat entire codebase. My proposal is to apply
>> > these standards to new code getting commited.
>> >
>> > --
>> > Regards,
>> > Laxman
>> >
>>



-- 
Harsh J

Re: HBASE Code format

Posted by Enis Söztutar <en...@apache.org>.
I am in favor of 120. A balance between allowing longer lines, while
keeping a sane limit. Also 100 is better than 80, so I would be fine with
that.

Enis

On Thu, Mar 22, 2012 at 9:50 AM, Dave Wang <ds...@cloudera.com> wrote:

> +1 on Lars's comment.
>
> On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com>
> wrote:
>
> > Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no limit
> > is fine with me.
> > Would personally prefer no limit. Instead leave it up to the good taste
> of
> > the contributors and us committers to format the code in the most
> readable
> > way.
> >
> >
> > -- Lars
> >
> >
> > ________________________________
> >  From: Laxman <la...@huawei.com>
> > To: dev@hbase.apache.org
> > Sent: Wednesday, March 21, 2012 10:17 PM
> > Subject: HBASE Code format
> >
> > Hi Devs,
> >
> > How about raising the "max line width" from 80 (to 100 or 120)?
> > IMO, 80 characters length is too low & it makes the code bit ugly.
> >
> > Example:
> >     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> > System.currentTimeMillis());
> >
> > Above code snippet after formatting, it turned to
> >
> >     long timstamp = conf
> >         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
> >
> > Please respond with your opinion considering the following points.
> >
> > - Sun Java coding standards drafted in 1999
> > - Terminals(Monitors) we are using now are very wider and 80 characters
> is
> > not a valid limit anymore.
> > - As per Ted, Google raised this limit
> > [https://issues.apache.org/jira/browse/HBASE-5564]
> >
> > Note: We don't need to reformat entire codebase. My proposal is to apply
> > these standards to new code getting commited.
> >
> > --
> > Regards,
> > Laxman
> >
>

Re: HBASE Code format

Posted by Jesse Yates <je...@gmail.com>.
+1 for 100 chars too.

Though really, as long as we have a standard that we stick to, doesn't
really matter to me.

-------------------
Jesse Yates


On Thu, Mar 22, 2012 at 11:06 AM, Todd Lipcon <to...@cloudera.com> wrote:

> +1 for 100 chars. I think unlimited gets messy.
>
> On Thu, Mar 22, 2012 at 9:50 AM, Dave Wang <ds...@cloudera.com> wrote:
> > +1 on Lars's comment.
> >
> > On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com>
> wrote:
> >
> >> Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no
> limit
> >> is fine with me.
> >> Would personally prefer no limit. Instead leave it up to the good taste
> of
> >> the contributors and us committers to format the code in the most
> readable
> >> way.
> >>
> >>
> >> -- Lars
> >>
> >>
> >> ________________________________
> >>  From: Laxman <la...@huawei.com>
> >> To: dev@hbase.apache.org
> >> Sent: Wednesday, March 21, 2012 10:17 PM
> >> Subject: HBASE Code format
> >>
> >> Hi Devs,
> >>
> >> How about raising the "max line width" from 80 (to 100 or 120)?
> >> IMO, 80 characters length is too low & it makes the code bit ugly.
> >>
> >> Example:
> >>     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> >> System.currentTimeMillis());
> >>
> >> Above code snippet after formatting, it turned to
> >>
> >>     long timstamp = conf
> >>         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
> >>
> >> Please respond with your opinion considering the following points.
> >>
> >> - Sun Java coding standards drafted in 1999
> >> - Terminals(Monitors) we are using now are very wider and 80 characters
> is
> >> not a valid limit anymore.
> >> - As per Ted, Google raised this limit
> >> [https://issues.apache.org/jira/browse/HBASE-5564]
> >>
> >> Note: We don't need to reformat entire codebase. My proposal is to apply
> >> these standards to new code getting commited.
> >>
> >> --
> >> Regards,
> >> Laxman
> >>
>
>
>
> --
> Todd Lipcon
> Software Engineer, Cloudera
>

Re: HBASE Code format

Posted by Andrew Purtell <ap...@yahoo.com>.
I agree with Todd and Ted. 

Best regards,

    - Andy


On Mar 22, 2012, at 11:09 AM, Ted Yu <yu...@gmail.com> wrote:

> I agree with Todd.
> 
> Let's set 5pm PST Friday as closing time of this vote.
> 
> On Thu, Mar 22, 2012 at 11:06 AM, Todd Lipcon <to...@cloudera.com> wrote:
> 
>> +1 for 100 chars. I think unlimited gets messy.
>> 
>> On Thu, Mar 22, 2012 at 9:50 AM, Dave Wang <ds...@cloudera.com> wrote:
>>> +1 on Lars's comment.
>>> 
>>> On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com>
>> wrote:
>>> 
>>>> Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no
>> limit
>>>> is fine with me.
>>>> Would personally prefer no limit. Instead leave it up to the good taste
>> of
>>>> the contributors and us committers to format the code in the most
>> readable
>>>> way.
>>>> 
>>>> 
>>>> -- Lars
>>>> 
>>>> 
>>>> ________________________________
>>>> From: Laxman <la...@huawei.com>
>>>> To: dev@hbase.apache.org
>>>> Sent: Wednesday, March 21, 2012 10:17 PM
>>>> Subject: HBASE Code format
>>>> 
>>>> Hi Devs,
>>>> 
>>>> How about raising the "max line width" from 80 (to 100 or 120)?
>>>> IMO, 80 characters length is too low & it makes the code bit ugly.
>>>> 
>>>> Example:
>>>>    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
>>>> System.currentTimeMillis());
>>>> 
>>>> Above code snippet after formatting, it turned to
>>>> 
>>>>    long timstamp = conf
>>>>        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>>>> 
>>>> Please respond with your opinion considering the following points.
>>>> 
>>>> - Sun Java coding standards drafted in 1999
>>>> - Terminals(Monitors) we are using now are very wider and 80 characters
>> is
>>>> not a valid limit anymore.
>>>> - As per Ted, Google raised this limit
>>>> [https://issues.apache.org/jira/browse/HBASE-5564]
>>>> 
>>>> Note: We don't need to reformat entire codebase. My proposal is to apply
>>>> these standards to new code getting commited.
>>>> 
>>>> --
>>>> Regards,
>>>> Laxman
>>>> 
>> 
>> 
>> 
>> --
>> Todd Lipcon
>> Software Engineer, Cloudera
>> 

Re: HBASE Code format

Posted by Ted Yu <yu...@gmail.com>.
I agree with Todd.

Let's set 5pm PST Friday as closing time of this vote.

On Thu, Mar 22, 2012 at 11:06 AM, Todd Lipcon <to...@cloudera.com> wrote:

> +1 for 100 chars. I think unlimited gets messy.
>
> On Thu, Mar 22, 2012 at 9:50 AM, Dave Wang <ds...@cloudera.com> wrote:
> > +1 on Lars's comment.
> >
> > On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com>
> wrote:
> >
> >> Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no
> limit
> >> is fine with me.
> >> Would personally prefer no limit. Instead leave it up to the good taste
> of
> >> the contributors and us committers to format the code in the most
> readable
> >> way.
> >>
> >>
> >> -- Lars
> >>
> >>
> >> ________________________________
> >>  From: Laxman <la...@huawei.com>
> >> To: dev@hbase.apache.org
> >> Sent: Wednesday, March 21, 2012 10:17 PM
> >> Subject: HBASE Code format
> >>
> >> Hi Devs,
> >>
> >> How about raising the "max line width" from 80 (to 100 or 120)?
> >> IMO, 80 characters length is too low & it makes the code bit ugly.
> >>
> >> Example:
> >>     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> >> System.currentTimeMillis());
> >>
> >> Above code snippet after formatting, it turned to
> >>
> >>     long timstamp = conf
> >>         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
> >>
> >> Please respond with your opinion considering the following points.
> >>
> >> - Sun Java coding standards drafted in 1999
> >> - Terminals(Monitors) we are using now are very wider and 80 characters
> is
> >> not a valid limit anymore.
> >> - As per Ted, Google raised this limit
> >> [https://issues.apache.org/jira/browse/HBASE-5564]
> >>
> >> Note: We don't need to reformat entire codebase. My proposal is to apply
> >> these standards to new code getting commited.
> >>
> >> --
> >> Regards,
> >> Laxman
> >>
>
>
>
> --
> Todd Lipcon
> Software Engineer, Cloudera
>

Re: HBASE Code format

Posted by Todd Lipcon <to...@cloudera.com>.
+1 for 100 chars. I think unlimited gets messy.

On Thu, Mar 22, 2012 at 9:50 AM, Dave Wang <ds...@cloudera.com> wrote:
> +1 on Lars's comment.
>
> On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com> wrote:
>
>> Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no limit
>> is fine with me.
>> Would personally prefer no limit. Instead leave it up to the good taste of
>> the contributors and us committers to format the code in the most readable
>> way.
>>
>>
>> -- Lars
>>
>>
>> ________________________________
>>  From: Laxman <la...@huawei.com>
>> To: dev@hbase.apache.org
>> Sent: Wednesday, March 21, 2012 10:17 PM
>> Subject: HBASE Code format
>>
>> Hi Devs,
>>
>> How about raising the "max line width" from 80 (to 100 or 120)?
>> IMO, 80 characters length is too low & it makes the code bit ugly.
>>
>> Example:
>>     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
>> System.currentTimeMillis());
>>
>> Above code snippet after formatting, it turned to
>>
>>     long timstamp = conf
>>         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>>
>> Please respond with your opinion considering the following points.
>>
>> - Sun Java coding standards drafted in 1999
>> - Terminals(Monitors) we are using now are very wider and 80 characters is
>> not a valid limit anymore.
>> - As per Ted, Google raised this limit
>> [https://issues.apache.org/jira/browse/HBASE-5564]
>>
>> Note: We don't need to reformat entire codebase. My proposal is to apply
>> these standards to new code getting commited.
>>
>> --
>> Regards,
>> Laxman
>>



-- 
Todd Lipcon
Software Engineer, Cloudera

Re: HBASE Code format

Posted by Dave Wang <ds...@cloudera.com>.
+1 on Lars's comment.

On Thu, Mar 22, 2012 at 9:00 AM, lars hofhansl <lh...@yahoo.com> wrote:

> Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no limit
> is fine with me.
> Would personally prefer no limit. Instead leave it up to the good taste of
> the contributors and us committers to format the code in the most readable
> way.
>
>
> -- Lars
>
>
> ________________________________
>  From: Laxman <la...@huawei.com>
> To: dev@hbase.apache.org
> Sent: Wednesday, March 21, 2012 10:17 PM
> Subject: HBASE Code format
>
> Hi Devs,
>
> How about raising the "max line width" from 80 (to 100 or 120)?
> IMO, 80 characters length is too low & it makes the code bit ugly.
>
> Example:
>     long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> System.currentTimeMillis());
>
> Above code snippet after formatting, it turned to
>
>     long timstamp = conf
>         .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>
> Please respond with your opinion considering the following points.
>
> - Sun Java coding standards drafted in 1999
> - Terminals(Monitors) we are using now are very wider and 80 characters is
> not a valid limit anymore.
> - As per Ted, Google raised this limit
> [https://issues.apache.org/jira/browse/HBASE-5564]
>
> Note: We don't need to reformat entire codebase. My proposal is to apply
> these standards to new code getting commited.
>
> --
> Regards,
> Laxman
>

Re: HBASE Code format

Posted by lars hofhansl <lh...@yahoo.com>.
Put me in the I-couldn't-care-less camp :) 80, 100, 120, or even no limit is fine with me.
Would personally prefer no limit. Instead leave it up to the good taste of the contributors and us committers to format the code in the most readable way.


-- Lars


________________________________
 From: Laxman <la...@huawei.com>
To: dev@hbase.apache.org 
Sent: Wednesday, March 21, 2012 10:17 PM
Subject: HBASE Code format
 
Hi Devs,

How about raising the "max line width" from 80 (to 100 or 120)?
IMO, 80 characters length is too low & it makes the code bit ugly.

Example:
    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
System.currentTimeMillis());

Above code snippet after formatting, it turned to

    long timstamp = conf
        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());

Please respond with your opinion considering the following points.

- Sun Java coding standards drafted in 1999
- Terminals(Monitors) we are using now are very wider and 80 characters is
not a valid limit anymore.
- As per Ted, Google raised this limit
[https://issues.apache.org/jira/browse/HBASE-5564]

Note: We don't need to reformat entire codebase. My proposal is to apply
these standards to new code getting commited.

--
Regards,
Laxman

Re: HBASE Code format

Posted by N Keywal <nk...@gmail.com>.
+1 for 100

On Thu, Mar 22, 2012 at 7:08 AM, Anoop Sam John <an...@huawei.com> wrote:

> +1 for 100 chars
> ________________________________________
> From: Li Pi [li@idle.li]
> Sent: Thursday, March 22, 2012 10:55 AM
> To: dev@hbase.apache.org; V v lakshmana kumar chekka
> Subject: Re: HBASE Code format
>
> +1.
>
> On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:
>
> > Hi Devs,
> >
> > How about raising the "max line width" from 80 (to 100 or 120)?
> > IMO, 80 characters length is too low & it makes the code bit ugly.
> >
> > Example:
> >    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> > System.currentTimeMillis());
> >
> > Above code snippet after formatting, it turned to
> >
> >    long timstamp = conf
> >        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
> >
> > Please respond with your opinion considering the following points.
> >
> > - Sun Java coding standards drafted in 1999
> > - Terminals(Monitors) we are using now are very wider and 80 characters
> is
> > not a valid limit anymore.
> > - As per Ted, Google raised this limit
> > [https://issues.apache.org/jira/browse/HBASE-5564]
> >
> > Note: We don't need to reformat entire codebase. My proposal is to apply
> > these standards to new code getting commited.
> >
> > --
> > Regards,
> > Laxman
> >
> >
> >
>

RE: HBASE Code format

Posted by Anoop Sam John <an...@huawei.com>.
+1 for 100 chars
________________________________________
From: Li Pi [li@idle.li]
Sent: Thursday, March 22, 2012 10:55 AM
To: dev@hbase.apache.org; V v lakshmana kumar chekka
Subject: Re: HBASE Code format

+1.

On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:

> Hi Devs,
>
> How about raising the "max line width" from 80 (to 100 or 120)?
> IMO, 80 characters length is too low & it makes the code bit ugly.
>
> Example:
>    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> System.currentTimeMillis());
>
> Above code snippet after formatting, it turned to
>
>    long timstamp = conf
>        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>
> Please respond with your opinion considering the following points.
>
> - Sun Java coding standards drafted in 1999
> - Terminals(Monitors) we are using now are very wider and 80 characters is
> not a valid limit anymore.
> - As per Ted, Google raised this limit
> [https://issues.apache.org/jira/browse/HBASE-5564]
>
> Note: We don't need to reformat entire codebase. My proposal is to apply
> these standards to new code getting commited.
>
> --
> Regards,
> Laxman
>
>
>

Re: HBASE Code format

Posted by Li Pi <li...@idle.li>.
+1.

On Wed, Mar 21, 2012 at 10:17 PM, Laxman <la...@huawei.com> wrote:

> Hi Devs,
>
> How about raising the "max line width" from 80 (to 100 or 120)?
> IMO, 80 characters length is too low & it makes the code bit ugly.
>
> Example:
>    long timstamp = conf.getLong(TIMESTAMP_CONF_KEY,
> System.currentTimeMillis());
>
> Above code snippet after formatting, it turned to
>
>    long timstamp = conf
>        .getLong(TIMESTAMP_CONF_KEY, System.currentTimeMillis());
>
> Please respond with your opinion considering the following points.
>
> - Sun Java coding standards drafted in 1999
> - Terminals(Monitors) we are using now are very wider and 80 characters is
> not a valid limit anymore.
> - As per Ted, Google raised this limit
> [https://issues.apache.org/jira/browse/HBASE-5564]
>
> Note: We don't need to reformat entire codebase. My proposal is to apply
> these standards to new code getting commited.
>
> --
> Regards,
> Laxman
>
>
>