3

By any chance is there a ranking of the JSF coding standards?

That is, there are 221 standards in the Joint Strike Fighter (JSF) C++ coding standards. Some are "should", "will" and "shall" rules, where the "shall" rules are mandatory.

Of the mandatory rules, some seem more important than others.

So, for a safety critical embedded environment, which mandatory ones are most critical and which ones are less critical?

Specifically, I am looking for a ranking of the JSF C++ mandatory rules.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
JustADude
  • 2,619
  • 7
  • 31
  • 45
  • 3
    For code that is truly safety critical, all of the _shall_ rules should be followed. I don't think they can be "ranked." Yes, some of them _seem_ to be more important (e.g., those that prohibit code that exhibits certain runtime behavior) than others (e.g., use the suffix `L` instead of `l` for literals), but the point is that all of the rules together make for more easily verifiable, less bug-prone code. – James McNellis Jun 25 '12 at 18:48
  • 2
    Those rules are specific to one particular project. Those of us *not* involved in attack aircrafts might have another set of priorities. – Bo Persson Jun 25 '12 at 20:34
  • 1
    I can't help but wonder: isn't a *safe* attack aircraft a *useless* attack aircraft? – Teemu Leisti Dec 12 '12 at 15:09
  • The link is broken: *"Invalid URL. The requested URL "[no URL]", is invalid."* – Peter Mortensen Dec 06 '20 at 04:55
  • This still works (but I don't know if it refers to the same document): *[Joint Strike Fighter C++ coding standards](https://www.stroustrup.com/JSF-AV-rules.pdf)* – Peter Mortensen Dec 06 '20 at 05:01
  • Chuckling -- if you have never worked in government before, take the standards kind of like the *"Pirates Code"*. There is no doubt value to be gleaned from the document, but understand it is the result of a dozen or so programmers and engineers being tasked with putting it together to check a box as part of the JSF contract. Government works in awkward ways at times, through very good intentioned people, but products like this shouldn't be taken as gospel, but used to glean from them the good they contain. – David C. Rankin Dec 06 '20 at 06:03
  • ... double chuckle... Bjarne Stroustrup was the author of said standard... chuckle chuckle... – JustADude Aug 25 '22 at 19:39
  • https://www.stroustrup.com/JSF-AV-rules.pdf ... on his home page... – JustADude Aug 25 '22 at 19:45

1 Answers1

3

Those aren't really safety critical rules - that's a whole set of complexity on top of this.

They are reasonable 'conservative' standards for any large project in a big company, worth reading certainly, but you could find something to disagree with in all of them.

And they aren't a magic bullet - restricting use of the preprocessor to #ifdef/#define will not stop a "foot bullet interface situation".

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Martin Beckett
  • 94,801
  • 28
  • 188
  • 263