
Programming style guide for the jujaba student research project

-1 Introduction 

This is a team project. Thus, 

	THE CODE IS NOT YOURS

, but is owned by the whole group. 

The most important maintenance problem for code is readabillity. 

	THE CODE MUST BE EASY TO READ 

by yourself and by your team mates. Easy to write is not a goal.

0. Project language is ENGLISH.

All names, comments, login messages USE ENGLISH ONLY.

1. Naming styles:

1.1 Case styles
 
 - generally lower case 

 - subwords are seperated by uppercase letters e.g. firstEntry (NOT with '_')

 - variables and methods start with lower case 

 - class names start with upper case letter. 

 - constants use upper-case for all letters. 

1.2 Glossary

Generally a variable holding an object of class FooBar should be named
fooBar or fooBar2. Depending on its usage this may be prefixed e.g.

 - current
 - tmp
 - old
 - new

leading to e.g. currentFooBar. 

In frequently used cases one may use common abbreviations, e.g.

 - i,j     as index variables

 - dim     as shortcut for dimension
 - enum    as shortcut for Enumeration
 - iter    as shortcut for iterator
 - p	   as shortcut for point
     

3. Indentation 

Indentation is done as defined (and forced) by the 

      /homes7/avalon/fujaba/bin/indent -bli0 -di0 

command.

4. Operator precedences

To ease reading, complex expression should be richly paranthized. One
should not need to know the operator precedence table of Java to be
able to read an expression. Thus, generally paranthizing is
mandatory. Only three precedence groups may be assumed

assignment and boolean operations  =, ==, !=, >=, &&, ||,  ...

addition +, -, ...

multiplication *, /, ...



Indentation is done as defined (and forced) by the 

      /homes7/avalon/fujaba/bin/indent -bli0 -di0 

command.



