The certification idea seems largely pointless, but I like things like naming conventions, especially for things like libraries and DLLs.
As best practice guidelines for shared code, I agree with the concept.
My own coding style, built up over the years in order to reduce the amount of mental change I need to do when learning a new language, is like so. I do not stick to this religiously, I just consider it best practice.
- One true brace with 2 character space indents. No tabs anywhere.
- Reserve i, j, k for loop iterators, i being the outermost loop. If more than three iterators are to be used, 'l' should not be used for obvious reasons: instead use descriptive names. Which are a good idea instead of i/j/k in any complex loop anyway.
- Reserve x/y/z for coordinates where the meaning is clear.
- Reserve a/b for comparison functions and other situations where there are two elements to operate over.
- Avoid any other 1-letter variable names.
- Use suffixes:
x/y/z - coordinates
Ptr - pointer to a memory address.
Ix - index. Like Ptr, but for arrays rather than memory addresses. (I often use Ptr instead, here, though).
- Prefixes:
Global_ - yeah it's long, but that's partly to discourage me from using them.
- I tend to name functions package_verb_noun, eg chess_get_player_name, mysql_do_query. For methods, where the package is obvious from the object type, I omit the package name. Conversion functions are one exception, where I use package_noun_to_noun (omitting the verb "convert"). eg "system.date_to_timestamp"
- Global constants are in UPPER_CASE, functions in lower_case, variables in TitleCase.
- Avoid single-line program flow constructs as they can cause indentation bugs.
- Avoid block comments except when commenting out regions of code, as it can cause bugs when commenting out regions.
- Avoid non-dependent single-line command concatenation, like "sing(); dance();" Short-circuiting, dependant oneliners are OK though: "sing() && dance();"
- Avoid goto in languages where there are more readable alternatives for that particular use (break/continue, next/last, gosub/function).
- And the stuff I wrote on http://en.wikipedia.org/wiki/Programming_style as well.
Yet another game programmer