Coding Standard: Power of Ten

29 April 2020 by Phillip Johnston • Last updated 15 August 2023The Power of Ten is a popular set of coding “rules” for writing safety critical software that originally appeared in IEEE Computer in June 2006. These rules have been floating around for a while, and the odds are good that you’ve heard someone mention them. Even they’re they’re nominally related to safety critical software, they are excellent rules to follow for general embedded systems development. Here are the 10 rules: Restrict to simple control flow constructs. Give all loops a fixed upper-bound. Do not use dynamic memory allocation after …

To access this content, you must purchase a Membership - check out the different options here. If you're a member, log in.

Creating and Enforcing a Code Formatting Standard with clang-format

I’ve worked on many programming teams which nominally have a “programming style guide.” This guide is often written down and placed in a place that developers rarely look. In almost every case the style guide is ignored, code reviews devolve into style arguments, and a multitude of styles develop inside of the source repository. The MongoDB …