I also believe coding guidelines are important, but I'd recommend a
different approach.  There is a very fine little book out there called The
Elements of Java Style by Allan Vermeulen and Scott W. Ambler et al.  A very
simple way to standardize on the same guidelines is to adopt the rule: "do
it like it says in this book".  No one will agree with all of the rules (I
don't), but most people will agree with most of the rules.  If the book is
used as the standard it becomes an impartial arbiter that eliminates
needless arguments.

I'm personally opposed to the use of the so-called "Hungarian" names as
advocated in the post below.  While there's merit in a weakly typed language
like Javascript or C, I think it's redundant, unnecessary, and much less
readable in a relatively strongly typed language like Java.  (For the
record, the book devotes a whole chapter to naming conventions, and does not
advocate "Hungarian" names).

-- Ted Velkoff

-----Original Message-----
From: ICM S CP guest 5 [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 15, 2001 7:01 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Opensource Development - Coding guidelines


Hi,

after stepping thru some jetspeed sources I found it very confusing, reading
and understanding the code.

I programmed the same way a year ago. 
But then I started to use coding guidelines.

Coding guidelines can specify how the definition of a variable, object,
parameter, function, ... looks like.

e.g. every Integer variable starts with an i:  int iValue;
or Parameters using an p like: function callMe (int piAge, String pstName) 
and so on...

Some advantages:
- Code is better readable
- Faster identification of a variable/object/parameter
- Code is upgradeable
- Faster programming - it's easier to find names because the names are more
specific (iAge, stAge, ...)


Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to