Menu

Code Style

M. Damian Mulligan

To those joining EDE, welcome. The firs thing you need to know is that a strict code style is imposed on this project so that everyone can understand your work. The style is as follows:

  1. Documentation is key. Never commit code that is undocumented, even if it's just the bare bones "This function takes these arguments and returns this by doing this".
  2. Always observe proper tabbing. Please use tabs and not spaces.
  3. Always open if, while, for, etc statements with a brace even if you only perform one action in that statement. This is in case you need to expand this statement later, you will not forget to add the open brace.
  4. Always place open braces at the end of a line of code and close braces on their own line, like so:

    if(true){
        foo.bar();
    }
    
  5. Always version and date your code and keep some sort of change log as well as your name.
    Example:

    /**
     * Foo
     * Changelog:
     * 0.2.5 - Optimized Foo
     * 0.2.4 - Added Bar()
     * @author M. Damian Mulligan
     * @version 0.2.5 - November 9, 2011
     */