For novel ideas about building embedded systems (both hardware and firmware), join the 35,000 engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and no vendor PR. Click here to subscribe.
I'll present my Better Firmware Faster seminar in Melbourne, Australia February 20. All are invited. More info here.
By Jack Ganssle
Studies suggest that typical code gets shipped with 0.5 to 1% defect rate. That is, the code in a 100KLOC product probably has 500 to 1000 bugs. Yes, some organizations do very much better, but the norm is just not acceptable.
There are many reasons for poor quality. One is management expectations. Software engineering is viewed as an intrinsically chaotic process with unpredictable and non-repeatable results. The boss and sales department are so exhausted by the development process that when the product finally appears they're happy to ship, no matter what problems still lurk.
Software engineering is indeed hard. But it doesn't have to be either chaotic or unpredictable. If management doesn't hold engineers to high standards, if they don't routinely expect products to be done correctly, odds are they won't.
Engineers should be expected to deliver high quality, well-tested, maintainable code.
The corollary, of course, is that engineers should expect adequate resources from management, be they personal, tools, requirements and time.
Users of the SPARK language (http://praxis-his.com/sparkada/), for instance, have reported incredibly low bug rates, in some cases zero on delivery of a product. That's due to several reasons including the use of a safe language (it's a subset of Ada) with tools that do formal proof checks against annotations provide in the comments. Those tools are important, but success in SPARK comes from an expectation that developers will use them correctly and <i>all of the time.</i> Shortcuts aren't allowed. There are no exceptions. C developers can benefit from the same philosophy.
Yet in too many outfits bugs are considered normal.
Perfection is impossible in any human endeavor, so bugs will occur. But this is the only industry on the planet where companies can deliver products full of known defects and not get sued. Someday no one will smoke and all of the asbestos will be buried. Who do you think the lawyers will go after?