Tag Archives: Style

Coding Standards

Just like writing a readable piece of text, code should be written with the intention that it will be read later (and work).

When writing English, it helps readers when words are spelled in a consistent manner, certain words are capitalized, and punctuation is inserted into a reasonable place. When it’s not like that, people will often interpret the text as trash and invalid, even if the underlying material is actually valuable.

Code is the same way.

I don’t know if people don’t realize they’re doing it, are doing it on purpose, learned the wrong stuff, or just don’t care, but C/C++ code is some of the most horrid stuff to look at sometimes. Even in some well know libraries, applications, and operating systems – there is some ugly code out there.

I highly recommend anyone writing a C/C++ application to adhere to a very strict style to ensure that it will be understandable and maintainable in the future.

I agree almost 100% with everything in the Google C++ Style Guide.

Please read it.