10 Rules for Writing Safety Critical Code

In the current issue of Java Magazine the from editor column talks about the size of classes. The benefits of class with lines of code (LOCs) less than 60. But also some challenges that comes with.

What I found curious was a reference to 10 rules for writing safety critical code, that’s language agnostic. So it can be applied on actual Java projects without constraints. Other curious thing is that these rules are used by NASA, as describes the article.

The link for the rules is here.

The rule of limiting classes (functions at the original) to 60 lines of code is challenger and the article explain it very well.

Other important rules is the 10th: compile with all warnings enabled, and use one or more source code analyzers. Very actual.

So I thought that it was interesting and could open deeper discussions.

Leave a Reply

Your email address will not be published. Required fields are marked *