Live data from Hacker News

The Power of Ten – Rules for Developing Safety Critical Code

spinroot.com

151–155 of 155 posts

Re: The Power of Ten – Rules for Developing Safety Critical Code

#151
post #54

Earlier quoted context omitted.

Obviously a recommendation to have a high assertion density does not mean "shotgun-spraying assertions in the code". If your point is just that the rule could be applied mechanically and without thinking and that would be bad, then that's true, but it applies to everything, not just to the rule about assertions. Someone could apply the "keep functions definitions below 60 lines" rule in a perverse way, by splitting e…

In my experience that what's will happen in practice, especially when there is a specific metric attached. Doubly so once there is a mechanically enforced required amount of assertions. Wouldn't it be better if we could create programs that were correct by construction (and thus needed no assertions)?

>(and thus needed no assertions)

Assertions are not meant to be needed. Any bug-free programm should behave exactly the same with and without assertions.

On the other hand, in any sufficiently complex algorithm, asserting the pre- and postconditions generally helps readability, maintainablilty and correctness.

Re: The Power of Ten – Rules for Developing Safety Critical Code

#152
post #145

Earlier quoted context omitted.

> Politics mainly. And inertia. And the sunk cost fallacy. I would say no, sort of, and maybe. I don't think I've ever seen a language chosen because of politics. For "inertia", I would say "conservatism" - people know that they can build systems (even safety critical ones) using C, and they know where the problems are. They don't know where the problems are using Lisp. And they don't want to take the time to learn L…

> chicken-and-egg Yep.

I want to follow up that whole discussion by stating I really appreciate someone with actual experience in this area chiming in. NASA code attracts a huge amount of bikeshedding here.

Re: The Power of Ten – Rules for Developing Safety Critical Code

#153
post #145

Earlier quoted context omitted.

> chicken-and-egg Yep.

I want to follow up that whole discussion by stating I really appreciate someone with actual experience in this area chiming in. NASA code attracts a huge amount of bikeshedding here.

Thanks!
Post reply on HN