2: All loops must have a fixed upper bound. “This makes static analysis more effective and helps to avoid infinite loops,” Radin wrote. “If [the] limit is exceeded, [the] function returns [an] error and this takes [the] system out of failure state. For sure, this is quite valuable for software with 20 years’ uptime!”
6: Data objects must be declared at the smallest possible level of scope. “This rule [has] simple intentions behind [it]: to keep data in private scope and avoid unauthorized access. Sounds generic, smart and easy to follow,” Radin wrote.
7: Each calling function must check non-void function return values, and the validity of parameters must be checked inside each function. “Authors of [the] guideline assure that this one is the most violated,” Radin wrote. “And this is easy to believe because in its strictest form it means that even built-in functions should be verified. [In] my opinion it makes sense to verify results of third-party libraries being returned to app code, and function-incoming parameters should be verified for existence and type accordance.”
10: All code must be compiled, from the first day of development, with all compiler warnings enabled at the compiler’s most pedantic setting. “We all know it… Do not hoard warnings, do not postpone fixes, keep code clean and [keep the] perfectionist inside you alive,” Radin wrote.