mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Lyubimov <dlie...@gmail.com>
Subject Re: About formatting patches
Date Thu, 14 Apr 2011 22:49:48 GMT
Yeah. I got to confess I really don't care much for whether it is
(5+5) or (5 + 5) or that 5 similar purpose variables must be have an
individual declaration. At least not as much as understanding the math
behind the code.

The fact that after 13 years coding almost exclusively in java, i am
still tripping over quite a bit of those, perhaps tells something
about practicality of some of those conventions. (Or perhaps of me
just being a slob).  But i never worked in a commercial environment
that would actually enforce white space rule or
initializer-must-not-have-default-value-for-this-type kind of stuff.
Unless you have a good tidy-upper util, enforcing all of that manually
would take 80% of your thought power.

Also, sun changed and evolved conventions quite a bit during that
period. They weren't as nearly draconian 5 years ago as today.

Eclipse autoformat function is not very useful really. In fact, IMO
code looks uglier after it than the version i created in the first
place. Perhaps Idea is better in that regard, but i am not using idea.

-d

On Mon, Apr 4, 2011 at 12:46 AM, Sean Owen <srowen@gmail.com> wrote:
> That's right, it's just standard Java/Sun convention. When in doubt follow
> the surrounding code.
> I think there is an Eclipse template in here somewhere that has some of the
> basic settings.
>
> On Mon, Apr 4, 2011 at 8:44 AM, Sebastian Schelter <ssc@apache.org> wrote:
>
>> I always try to adhere to Lucene's conventions, which AFAIK are the same as
>> the standard sun code conventions with the difference that a 2-space indent
>> is used and lines are allowed to be 120 characters.
>>
>> --sebastian
>>
>>
>> On 04.04.2011 09:41, Lance Norskog wrote:
>>
>>> There seems to be some discrepancies between the preferences of
>>> various committers v.s. the Eclipse formatting template. Can someone
>>> please describe a 'Mahout style'?
>>>
>>>
>

Mime
View raw message