Good Programming Style
Write Clearly - don't be too clever - don't sacrifice clarity for efficiency.
Say what you mean, simply and directly.
Be sparing with temporary variables.
Parenthesize to avoid ambiguity.
Use library functions.
Replace repetitive expressions by calls to a common function.
Choose variable names that won't be confused.
If a logical expression is hard to understand, try transforming it.
Choose a data representation which makes the program simple.
Don't patch bad code - rewrite it.
Write and test a big program in small pieces.
Test input for plausibility and validity.
Identify bad input - recover if possible.
Make sure input doesn't violate the limits of the program.
Terminate input by end-of-file or marker, not by count.
Make input easy to prepare and output self-explanatory.
Make sure all variables are initialized before use.
Watch out for off-by-one errors.
Make sure your program "does nothing" gracefully.
Test programs at their boundary values.