directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: [seda] Coding standards and commit 56039 (by Trustin)
Date Sat, 06 Nov 2004 05:30:12 GMT
On Saturday 06 November 2004 06:29, Enrique Rodriguez wrote:
 [ ] Jakarta standards
 [ ] SUN Java recommended standards (might be the same as Jakarta)
 [x] Alex's coding standards
 [ ] Geronimo coding standards
 [ ] mx4j standards but use 4 spaces instead of 3 for tabs
 [x] invent our own

There are a lot in the Mx4j style that are making reading code harder, and 
should expressly be avoided. Especially;

  * single line if() constructs or potentially very dangerous
  * Not following Law of Demeter[1]

Other things that are more personal choice;

  * Consistency in spacing around "(" and ")". The MX4J has space before "(" 
in keywords but not for methods. Personally, I prefer space after "(" and 
before ")" ALL.

  *  throws clauses on new line for methods.


Most importantly, it is a lot harder to read code than write it and hopefully 
it is also read many more times than it is written, so reading must always 
take precendence over writing.


Cheers
Niclas

[1] 
http://www.ccs.neu.edu/research/demeter/demeter-method/LawOfDemeter/general-formulation.html
-- 
   +------//-------------------+
  / http://www.bali.ac        /
 / http://niclas.hedhman.org / 
+------//-------------------+


Mime
View raw message