Coding Standard

Coding style is very personal. Every software programmer has developed their own habit of formatting/documenting their source code in their unique way. It is said: "Show me your code, and I shall tell you who you are", and it is true. You can tell a lot about a person by looking at the code he or she has written.

In projects with open source code, there are often large amounts of different persons hacking around the source code, eventually causing the code to become a mix of many different personalities, style and ideas. Such source code is often referred to as spaghetti code, but mainly, its simply un-maintainable and looks bad. Thus it is necessary for any open source project to clearly define a standard way of formatting things, which must be enforced all throughout the project lifetime.

Coding style goes a lot farther than just a way of formatting things. If done correctly, it can greatly enhance the readability of the source code; it can warn the developer when he or she is doing wrong things and much more. Many of the ideas presented in the following sections of this appendix originate from Linux Kernel coding standard (somewhat modified for C++, and added few additional sections), which itself is inspired from ideas by Kernighan and Ritchie.