This site will look much better in a browser that supports web standards, but is accessible to any browser or Internet device.
At different times in the past I've either agreed with or fought the application of coding standards. Recently, I've been looking at the subject again. In a wonderful case of timing I stumbled across an ad in CUJ (10/2004) for CodingStandard.Com. They have a coding standard for C++ that seems to cover much of what I was looking for.
Later in the same issue, the Sutter's Mill column had some more advice from the upcoming book C++ Coding Standards by Herb Sutter and Andrei Alexandrescu. In this column, they suggest not standardizing personal preference issues (indenting, brace placement, etc.).
This lead me to a useful concept that I need to explore further. What I've normally called a Coding Standard is actually two documents.
throw
exceptions and the usage of RAII. Most of the items that we call Best Practices fit here.
The important point is that most of the religious debates I've seen fall into the second document. Additionally, most of the stuff in the second document is a matter of preference, there is very little evidence that one style is significantly better that another. On the other hand, the items in the first document are usually demonstrably better than their alternatives.
By separating the two documents, we might be able to get two major benefits:
This division also better reflects the purpose of the two sets of rules.
Posted by GWade at September 7, 2004 11:08 PM. Email comments