← Back to team overview

kicad-developers team mailing list archive

Coding Guide

 

 Hi guys,

to brush up my latex skills and to have a document easily versioned I took the opportunity to transcribe Dicks and Waynes Coding Guide to LATEX.

Please see http://bazaar.launchpad.net/~amir-mohammadkhani/kicad/amir_1/revision/2518

Its not perfect, but since I didn't ask for permission first I thought I'd ask you guys now before I polish it up.

Also on the matter of guidelines:

I have come to value verbose code. Too many times I have seen people (me included) search for bugs that could have been prevented by being more verbose in first place.

That is why I'd like to ask for the following changes to the guide:

* Always use braces with control statements including inside switch blocks.
* Although its shown in the example, its not explicitly stated: always remark the fact
  with a comment if there is a fall through in a switch block.
* Always initialize variables. Assigning NULL - a simple XOR $REG, $REG will be scheduled
  somewhere in between other things on any modern cpu.
* Use of C++ comments (Stricter wording than now)
* Use C++ style variable declaration (I guess violations of this are old C files renamed to C++)

Also JAVADOC info on all new code would be great.

cheers
amir



Follow ups