[pisa] Reformatting and coding style

  • From: Tobias Heer <heer@xxxxxxxxxxxxxxxxx>
  • To: pisa@xxxxxxxxxxxxx
  • Date: Wed, 02 Dec 2009 18:52:29 +0100

Hi,

I just realized we did it the wrong way. We first changed the coding style and 
then tell you what it is supposed to look like. If someone did not read the 
logs carefully they did not know what the proper style is. 

This is a quick roundup of the changes that were made. A proper coding style 
will be provided as of thursday.

1) General K&R style 
2) Tabwidth 4 spaces, use spaces for indentation only
3) Strict braces (braces for every conditional statement) e.g., 

if( a == 2 ) {
    if ( c == 1) {
        return b;
    } else {
        return c;
    }
} else {
    g = 2;
}
return d;  

instead of:

if (a == 2)
    if( c == 1)
        return b;
    else
        return c;
else 
    g = 2;
return d;

I know that omitting the braces is sometimes tempting but please consider that 
also less experienced students will be working with the code.
They will appreciate the braces.

Cheers, 

Tobi
 
--  

Dipl.-Inform. Tobias Heer, Ph.D. Student
Distributed Systems Group 
RWTH Aachen University, Germany
tel: +49 241 80 207 76
web: http://ds.cs.rwth-aachen.de/members/heer








Other related posts: