Re: Hadoop coding style guideline

2009-11-30 Thread Doug Cutting
Aaron Kimball wrote: First, I've been picked on by others for using this brace style: if (foo) { stmt; } else { otherstmt; } and have been told to drop the braces because they look ugly if stmt or otherstmt are only one line. In

Re: Hadoop coding style guideline

2009-11-30 Thread Eli Collins
My preference is to permit both.  I like to maximize the amount of readable logic per screen, and find that close braces around one-line expressions don't improve readability (since indentation already indicates the nesting) and decrease the amount of per-screen logic. However I know

Re: Hadoop coding style guideline

2009-11-30 Thread Daniel Templeton
I have to weigh in strongly on the pro-braces side. I've seen too many instances (not necessarily in Hadoop) where there was something like: if (foo) stmt; otherstmt; It's not about readability. It's about maintainability. Daniel Doug Cutting wrote: Aaron Kimball wrote: First, I've

Hadoop coding style guideline

2009-11-20 Thread Cosmin Lehene
Hi, I was trying to make a patch and looking over the Hadoop guidelines for code at http://wiki.apache.org/hadoop/CodeReviewChecklist, trying to follow the conventions. Looking through code I found a few patterns, however, these differ even in the same class sometimes. Here's a collection of

Re: Hadoop coding style guideline

2009-11-20 Thread Konstantin Boudnik
So, IMO, the goal should be the examples on 10-24 or 31-36. +1 I agree with Todd: the highlighted snippets are most appropriate as Java coding style. On 11/20/09 10:54 , Todd Lipcon wrote: My opinions on the groups of line numbers from that pastebin: 1-3: Definitely not - no reason for )