133 points · by neilwillgettoit · 14y ago · 52 comments
(I'm sure they use static analysis tools for C++ that enforce some of these rules, so I'll defer to someone who is more current in that world)
AV Rule 6 Each deviation from a “shall” rule shall be documented in the file that contains the deviation. Deviations from this rule shall not be allowed, AV Rule 5 [specifying the process to deviate from a "shall" rule] notwithstanding.
Let's fly a crazy fast jet plane that has it's software written by some throw-caution-in-the-wind Node.js hackers instead.
If it's agile enough, and has some test coverage, we should be fine.
Because that's exactly what I said, or even hinted at.
I said the document reads like overly verbose government copy. Nothing more.
And I'd never suggest JavaScript for that.
Yes everyone reinventing their own broken flat tire date routines is the way go. If they used the same silly rule on the F22 that explains http://blog.utest.com/international-date-line-bug-caused-fig...
Time related code is really hard to write.
The problem arose not from the time change, but from the change in longitude
I don't think you can blame the time handling for that one! Although you are right in the broader sense that is really difficult to write code that handles times and dates correctly, and you generally shouldn't write you're own. I'd imagine the guys writing this stuff are pretty good though and can probably handle it.
However, as the GP notes the libraries must merely be "certifiable": You can do all the certification work yourself as long as it is possible with the libraries in question. Having access to the source code and the lack of non-determinism are two big requirements that come to mind.
[1] In fact you cannot even certify software only entire systems.
Sorry for the late reply.
(http://en.wikipedia.org/wiki/ARINC_429)
(http://en.wikipedia.org/wiki/MIL-STD-1553)
Wikipedia suggests a logic analyser for development. That's handy, but you'd be best starting with good continuity buzzing; I've seen some of the cables being made and it's a bit of a bodge.
> ...I consider it a pretty good set of rules for safety critical and performance critical code. If you do embedded systems programming, you should consider it. Caveat: I had a hand in the formulation of these rules, so you could consider me biased...
Dear C++ programmers: follow this! (with exceptions accordingly)
These strict C++ programming guidelines apply only to embedded and safety critical programming and the programs that are being written work under a very restricted runtime environment and with a less than state of the art compiler.
So if you're a regular application programmer working with C++, feel free to ignore most of these rules. Modern compilers and runtimes will work nicely with most of the stuff forbidden in these guidelines.
There are some limitations there relating to embedded systems (for example, they explicitly forbid the use of atoi because obviously you want to be sure of no undefined behavior while flying at Mach 2 at 20kft)
For example, section 3 are very general good rules
Av Rule 84/85 are very relevant as well (just an example)
It's very easy to exaggerate when using C++ and hence some limits are needed.
He studied IT, but never got a job in it. I keep bugging him to get a job coding, but he thinks he can't.
Anyone got a job coding for someone who writes those amazingly complex manuals?
const uint16 max_pressure = 100;
enum Switch_position {up, down};
``Switch_position'' is not the name of a variable, but an enum type.AV Rule 69 says to use `const` by default on member functions. Yet in some examples (e.g. AV Rule 122 in Appendix A) they don't use the `const` keyword when they can.