This gets into the weeds of programming more than most on here would care to be:
https://jaxenter.com/power-ten-nasas-coding-commandments-114124.html
NASA's Jet Propulsion Lab did research on reliable software add that article basically goes over their findings. The principal researcher, Holzmann points out: "If the rules seem Draconian at first, bear in mind that they are meant to make it possible to check code where very literally your life may depend on its correctness: code that is used to control the airplane that you fly on, the nuclear power plant a few miles from where you live, or the spacecraft that carries astronauts into orbit."
And their findings are often considered in parts in the for-profit world but cast off in whole because they eat too much into profitability.
https://jaxenter.com/power-ten-nasas-coding-commandments-114124.html
NASA's Jet Propulsion Lab did research on reliable software add that article basically goes over their findings. The principal researcher, Holzmann points out: "If the rules seem Draconian at first, bear in mind that they are meant to make it possible to check code where very literally your life may depend on its correctness: code that is used to control the airplane that you fly on, the nuclear power plant a few miles from where you live, or the spacecraft that carries astronauts into orbit."
And their findings are often considered in parts in the for-profit world but cast off in whole because they eat too much into profitability.