You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by Sean Owen <sr...@gmail.com> on 2008/04/13 05:22:28 UTC
Style questions
Hi guys, as I prepare to get my code into Mahout and I start looking
at the existing code I have a few questions...
- I take it we don't use @author tags?
- Any particular style convention we should follow? for example I see
some control statements without braces and I generally always put them
on.
- How much should I or shouldn't I try to suggest some micro-tweaks to
the code, like what I started on in MAHOUT-23? I can suggest some
tweaks (and want the same review of my code), or am happy to get the
message that this isn't really worth bothering about. Maybe I can
start by proposing a patch in MAHOUT-23 -- that's what we do before
committing anything I take it?
Re: Style questions
Posted by Sean Owen <sr...@gmail.com>.
OK, in that case I could easily "standardize" the code that exists now
with the click of a button to, for instance, always have braces on
if-else, for, etc. but it would be a big old patch. Let me start with
some other suggestions first, see what you guys think. I'll keep going
and you folks tell me if I get annoying.
On Sat, Apr 12, 2008 at 11:31 PM, Ted Dunning <td...@veoh.com> wrote:
> Sun standards. I don't think this case is specified, but I always put htem
>
> in.
>
>
> > - How much should I or shouldn't I try to suggest some micro-tweaks to
> > the code, like what I started on in MAHOUT-23?
>
> Suggestions and patches are always welcome.
Re: Style questions
Posted by Sean Owen <sr...@gmail.com>.
On Sun, Apr 13, 2008 at 7:08 AM, Grant Ingersoll <gs...@apache.org> wrote:
> There are Eclipse and Intellij styles at
> http://cwiki.apache.org/MAHOUT/howtocontribute.html#HowToContribute-HelpfulResources
>
> I think they pretty closely follow the Sun standards.
Oh great, a codestyle.xml file. I will use this going forward and use
it to reformat what I'm about to contribute.
> There have been a number of debates in Lucene-Java land about formatting.
> We generally avoid applying across the board formatting patches
> retroactively, because it can make it even harder to apply other patches. I
> tend to sometimes tweak things on specific files that I am making other
> changes on as well.
Got it, will not do this then. I'd still like to propose a number of
small changes in MAHOUT-23 for consideration, so I'll do that and then
not bother with micro-tweaks.
Re: Style questions
Posted by Grant Ingersoll <gs...@apache.org>.
On Apr 12, 2008, at 11:31 PM, Ted Dunning wrote:
>
>
>
> On 4/12/08 8:22 PM, "Sean Owen" <sr...@gmail.com> wrote:
>
>> Hi guys, as I prepare to get my code into Mahout and I start looking
>> at the existing code I have a few questions...
>>
>> - I take it we don't use @author tags?
>
> Right.
We tend not to have them, b/c we like to stress community ownership.
Plus, over time, most files are rarely the work of one author.
>
>
>> - Any particular style convention we should follow? for example I see
>> some control statements without braces and I generally always put
>> them
>> on.
>
> Sun standards. I don't think this case is specified, but I always
> put htem
> in.
There are Eclipse and Intellij styles at http://cwiki.apache.org/MAHOUT/howtocontribute.html#HowToContribute-HelpfulResources
I think they pretty closely follow the Sun standards.
>
>
>
>> - How much should I or shouldn't I try to suggest some micro-tweaks
>> to
>> the code, like what I started on in MAHOUT-23?
There have been a number of debates in Lucene-Java land about
formatting. We generally avoid applying across the board formatting
patches retroactively, because it can make it even harder to apply
other patches. I tend to sometimes tweak things on specific files
that I am making other changes on as well.
What we should do is promote that all committers use the styles listed
on the Wiki for the Mahout project and then that way all new code will
be committed properly formatted.
-Grant
Re: Style questions
Posted by Ted Dunning <td...@veoh.com>.
On 4/12/08 8:22 PM, "Sean Owen" <sr...@gmail.com> wrote:
> Hi guys, as I prepare to get my code into Mahout and I start looking
> at the existing code I have a few questions...
>
> - I take it we don't use @author tags?
Right.
> - Any particular style convention we should follow? for example I see
> some control statements without braces and I generally always put them
> on.
Sun standards. I don't think this case is specified, but I always put htem
in.
> - How much should I or shouldn't I try to suggest some micro-tweaks to
> the code, like what I started on in MAHOUT-23?
Suggestions and patches are always welcome.