jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: Code style
Date Tue, 04 Mar 2014 08:49:42 GMT

>>>Question: why don't we use the maven checkstyle plugin?
>> for what? we are quite liberal in coding style and respect personal
>> preferences. the only checkstyle rules that make sense are the ones
>> that find or prevent bugs (like avoiding .* imports).

Sure, the exact formatting rules are a matter of personal taste. But why
do companies such as Google *enforce* specific rules?


Becase most of the time, developers *read* the code. And it's not just you
who reads your code, but everybody else as well. Formatting rules help
people read the code. I personally have a hard time understanding code
that doesn't follow basic coding conventions. In fact I dislike such code.
If you read a book, you expect certain formatting rules (identation,
whitespace usage, and so on), and if those rules are broken, you can not
concentrate on the content.

In addition, some code conventions avoid bugs, for example the recent
famous Apple SSL/TLS bug:


With decent rules, and the Maven checkstyle plugin, it's easy to avoid
such bugs.

Therefore, I think we should use strict rules.



View raw message