STAIR Vision Library

STAIR Vision Library Coding Guidelines

Software is written for people, not for machines.

Overview

The key to a successful (large) programming project, like any other projects, involves planning, management, and testing. The amount of time, effort and emphasis placed on each of these three components depends on the size of the project and experience of the people involved. Consistency in design and implementation is also key to success and is what we will address in this document by outlining some (fairly standard) coding conventions. These conventions will make the project more manageable over time especially when many different people are involved. The guidelines are predominantly aimed at C/C++ projects.

It is absolutely guaranteed that some users will not like the style guidelines, and that others will even hate them. Everyone has their own style which they prefer to use on their own projects. But even though this is so, please understand that your team-mates, as well as yourself, will benefit greatly from the uniformity which they offer.

Finally, since the STAIR Vision Library is designed to be platform-independent, it is essential that you make don't implement any platform specific functionality. Following these guidelines will help reduce the amount of incompatibility introduced by developing in multiple environments. Also before writing a new class or function, check to see whether one already exists that does what you want, or nearly what you want. Can that function be generalized to meet your needs.

Guidelines

Source Control

Structure

Variable and Object Naming

Comments

Portability and Maintainability

Performance

Miscellaneous

Testing