https://github.com/mwilliams/lcthw-book/blob/master/learn-c-the-hard-waych28.txt
Never trust the data you are given and always validate it.
If an error is possible, no matter how probable, try to prevent it.
Fail early, cleanly, and openly, stating what happened, where and how to fix it.
Clearly state the pre-conditions, post-conditions, and invariants.
Do not do with documentation, that which can be done with code or avoided completely.
Automate everything, especially testing.
Always simplify the code to the smallest, cleanest form that works without sacrificing safety.
Do not blindly follow or reject rules.