Project

General

Profile

CodingRules » History » Revision 3

Revision 2 (Jules Waldhart, 2015-04-16 13:56) → Revision 3/7 (Jules Waldhart, 2016-05-30 16:10)

h1. Coding Rules 

 An unordered list of stuff we would like devs to follow 

 h3. Naming 

 * ClassesAreCamelCase with first letter capital, also are all types (typedef, enum, struct,...) 
 * methodsAreCamelCase with first letter lowercase 
 * _attributeStartWithUnderscore and is camelcase 
 * localVariable or local_variable, first letter lowercase 
 * avoid calling @a=function(1.0,6,false,true)@, declare local variables with descriptive name for the parameters: @a=function(step_size,iteration_nb,enable_XYZ,multi_thread)@ 
 * put enums in namespaces or in classes. 

 h3. Unimplemented stuff 

 * not implemented functions: put an @assert(false);@ in it, it will abort in debug mode, and do nothing in release. (instead of a print or whatever, which is totally unclear) 
 * but mainly, avoid to commit unimplemented functions.