[AccessD] Software Quality

Gustav Brock gustav at cactus.dk
Wed Aug 8 03:54:09 CDT 2012


Hi Kenneth

You miss:

 0) Works, just like that. 
A+) Never fails.

/gustav


>>> kismert at gmail.com 08-08-12 3:58 >>>
Here are some thoughts on software quality. What do you think?


Code Quality:  1=Best, 9=Worst
------------------------------
1) Works, formal tests
2) Works, informal tests
3) Works, vetted but no tests
4) Fails in known, documented ways
5) Fails in unknown or undocumented circumstances
6) Fails by changing global state in a way that causes downstream failure
of level 7 and 8 code
7) Fails by making assumptions about global state that are violated by code
in level 6
8) Indeterminate, too complex, disorganized, or entangled to do any real
vetting or testing
9) Unknown, first revision, untested


Behavior on Error:  A=Best, F=Worst
-----------------------------------
A) Fails immediately and unambiguously, and logs error
B) Fails immediately and unambiguously
C) Fails ambiguously
D) Silently fails -- program terminates
E) Silently fails and continues
F) Silently fails and continues, causing downstream error


Comments
-------------
 * Obviously, we should all strive for 1A code, but few mortals produce
exclusively at that level.
 * In the real world, writing code even down to level 4C can be acceptable.
 * All of us have level 5 code -- we just don't know about it yet! However,
if we find a bug, but can't fix it at the moment, we should at least
document it and turn it into level 4.

And now, the bad levels:
 * 6, 7 and 8 all require code refactoring to fix
 * Note that 7 is worse than 6. If you must sin, sin boldly, but don't be
naive about the state of your program
 * 8 is by far the most work, both to produce and fix
 * All code starts at 9, but a quick step-through and some critical
re-reading can take it to level 3 -- at least until we find out it is a 5!

And the bad error behavior:
 * C can often be fixed by adding more specific error information, or
adding error handling code to routines that lack them
 * D, E and F are all serious, and should be addressed when encountered
 * People who write code at level 8 tend to rely on error levels E and F to
try to hide their wrongdoing
-- 




More information about the AccessD mailing list