Code Conventions: General Goals and Considerations

The goal of having good code conventions for our group is to help make our code easy to share. Mixing of coding styles, while not always detrimental, tends to reduce our ability to read each others' work. Therefore, we set the following as the golden standards for our code.

  1. Any violation to the rules is allowed if it enhances readability.

The main goal of the recommendation is to improve readability and thereby the understanding and the maintainability and general quality of the code. It is impossible to cover all the specific cases in a general guide and the programmer should be flexible.

  1. The rules can be violated if there are strong personal objections against them.

The attempt is to make a guideline, not to force a particular coding style onto individuals. Experienced programmers normally want adopt a style like this anyway, but having one, and at least requiring everyone to get familiar with it, usually makes people start thinking about programming style and evaluate their own habits in this area.

On the other hand, new and inexperienced programmers normally use a style guide as a convenience of getting into the programming jargon more easily.

The Convention

  1. Files and File Names (how to appropriately name your files)
  2. Documentation (documenting your code for the rest of us)
  3. Naming Conventions (basic naming of variables, classes, etc)
  4. Style Considerations (some good style points to keep us together)

This code convention is still under light construction. I'm assimilating ideas and plan to write them out cogently in the very near future. In the meantime, I welcome all comments ( E-mail Tack with suggestions) Sources I'm looking to draw from include: