hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laxman <lakshman...@huawei.com>
Subject RE: HBASE Code format
Date Thu, 22 Mar 2012 05:30:09 GMT
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 <lakshman.ch@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



 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message