4 ms·
A while back someone posted some programming guidelines issued by nasa. It detailed requiring assert statements at least every 10 loc. It spoke of many of other
by efnx 10y ago
A while back someone posted some programming guidelines issued by nasa. It detailed requiring assert statements at least every 10 loc. It spoke of many of other things as well, but that was one that stuck in my head.
- athenot 10y agoFor whatever it's worth, assert statements were also heavily used in embedded digital TV software. The philosophy is that things either work or they don't. With enough QA and field testing, those asserts will show up if state goes awry.
- pkaye 10y agoThis is something I do myself. As I build up the code, I write tons of self checking asserts so it fails quite quickly on the first sign of something wrong. At some point, I'll remove the less likely asserts as they just clutter up the code.
- jdavis703 10y agoIs this it this: http://pixelscommander.com/wp-content/uploads/2014/12/P10.pdf http://pixelscommander.com/wp-content/uploads/2014/12/P10.pd...? If so it looks like functions can't be more than 60 lines (rule #4), and that the "assertion density" (rule #5) must be two asserts per function.