Current area: HOME -> C / C++ -> Coding standards Articles
Coding standards
A Coding Convention for C++ Code
The Purpose is to make it easier for us to read each other's code, here are a few guidelines to follow when writing C++ code.
A Manual of C Style
Style guidelines for C programmers, including exception handling, directory organization and makefiles, as well as more mundane issues of commenting and indenting.
C and C++ Style Guides
This page offers access to my collection of style guides for code written in C and C++. A few documents offer some discussion about the value and utility of such style guides.
C++ Coding Standards
This is an excerpt from the authors' new book of the same title. More than just style guidelines and "gotcha" warnings, this book clarifies the idioms and practices that pertain specifically to successful C++ software. This is the singularly authoritative Writ of Common Wisdom for the entire C++ development experience.
C++ programming guidelines
Guidelines on how to go OO in C++. Contains official methods to develop world class Object-Oriented Software in minimum efforts using C++.
Coding Standards - Part 1 - Introduction
Coding standards define a standard for the look and feel of your code. This is helpful to most projects, and to some it is a necessity. Especially in open source projects. The goal of this and the following articles is to show how coding standards will improve a development project.
GNU coding standards
If you have a vague recollection of the internals of a Unix program, this does not absolutely mean you can't write an imitation of it, but do try to organize the imitation along different lines, because this is likely to make the details of the Unix version irrelevant and dissimilar to your results.
Programming Style - Part 1, Whitespace
One of the hallmarks of good programming style is consistency--the fewer surprises, the better. Consistency makes it easier to read the program primarily by reducing distractions. But it also helps guide the reader's eyes, for example, by being consistent about ordering functions or including files to simplify finding them in the future. It also makes it easier to deal with other style problems by making it easier for the reader to get used to them.
Programming Style - Readable code
There are a lot of ways to solve the same problem in C or C++. This is both good and bad; it is good because you have flexibility. It's also bad because you have flexibility--the flexibility to choose different solutions to the same problem when it shows up in different places. This is confusing because it obscures the underlying similarity between the problems.
The Most Important Design Guideline?
The activity of "design" includes many things, but certainly one of the most important aspects is interface specification. Interfaces determine which aspects of a component are accessible and to whom; they thus determine encapsulation. Interfaces specify what functionality (data, properties, methods, and so forth) is available to clients. Interfaces reflect how a system is broken down into its constituent components.
Computerworld The most comprehensive source of news and analysis on the technologies and management issues of information technology. ...
subscribe now