[Mulgara-dev] Style guide

Life is hard, and then you die ronald at innovation.ch
Fri May 18 20:11:42 UTC 2007


On Thu, May 17, 2007 at 04:47:57PM -0500, Paul Gearon wrote:
> I'm constantly noticing code that no longer conforms to the Kowari  
> style guide.  Some of it is really bothering me, particularly when I  
> wrote the code, and someone has changed all my formatting!  (this  
> actually breaks 2 rules: don't change the style in someone else's  
> file, and the rules on braces and newlines).
> 
> On the other hand, we no longer have this style guide available, so I  
> can't complain when someone doesn't stick to it.  The old guide  
> wasn't entirely relevant anyway, since it was a consensus of styles  
> from the Tucana/Plugged In employees of the day, and almost none of  
> them are still here.
> 
> So I've put together some of what I remember, plus a few  
> modifications that I'd like:
> 
> http://mulgara.org/confluence/display/dev/Style+Guide
> 
> Please check it, and offer suggestions and/or complaints.  If someone  
> is unprepared to write to the style guide as it stands, then it's not  
> a lot of use to us.

I tend to think you _have_ adhere to the style given, whether you like
it or not. And from that perspective I think it's a very bad idea to
allow two different bracing styles - choose one and stick to it,
period. I'm quite opinionated when it comes to coding, but even I've
managed to adjust to different styles in different projects ;-)

As to my personal likes/disklikes on coding styles, I agree with most
of the stuff, except:

 - I'd make space after keywords a MUST - this really helps in
   visually distinguishing between method calls and other stuff (sure,
   syntax coloring goes a long way here too).

 - The "don't align the = in declarations" is weird - never seen
   anybody dislike that before. But whatever.

 - Wildcard import should be disallowed. Period. It's a litle more
   work to write, but it helps in avoiding conflicts and in easily
   finding out where something is imported from (even for the java
   packages).

Other than that, good stuff.


  Cheers,

  Ronald




More information about the Mulgara-dev mailing list