apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vlad Rozov <v.ro...@datatorrent.com>
Subject Re: Extent of attention to code style in code reviews
Date Wed, 18 Nov 2015 02:36:13 GMT
I think that code readability is quite important and will help new 
contributors become successful committers. As long as we go through an 
exercise to make existing code to adhere to a particular code style the 
end goal should be to improve both consistency and readability.

For example enforcing wrapping on 120 column boundary is not a goal by 
itself, it helps developers that don't have extra wide monitors to read 
the code. Enforcing this rule and making code less readable does not 
make sense, imo. For example the following two code snippets are valid, 
but the first one is less readable, so in the code review we should 
prefer the second one over the first one.

public areallylongclassnamethat foo() {
   return new

public areallylongclassnamethat foo() {
     new areallylongclassnamethat();

Thank you,


On 11/17/15 17:23, Chandni Singh wrote:
> Since we are getting religious about code styles and concerns are being
> raised about wrapping lines in a better way to improve readability, I think
> this is one place we can learn from some other apache projects.
> https://flink.apache.org/contribute-code.html#code-style
> https://maven.apache.org/developers/conventions/code.html
> https://wiki.apache.org/cassandra/CodeStyle
> IMO none of these projects are enforcing style to the extent we have
> adopted.
> I think if we start focussing on style to this extent, that is,  where to
> break a line while wrapping, then our review process will result in more
> frustration. I think this doesn't help the community to grow.
> Thanks,
> Chandni

View raw message