Bug Free Should Never Even Be Attempted

This page title is a StrawMan. No one is suggesting that it is bad to attempt to create bug free code. Your bias is showing.

Deploying buggy code is bad. Writing such on the first try is not. It is a mistake to equate the two.


All views taken somewhat to an extreme for the sake of comparison.

As we've seen on OddWordProblemSolutions, there seems to be at least one person here who thinks that people of the calibre we get here on WardsWiki should be able to solve trivial problems with bug-free code first time of asking. Perhaps the reasoning is that these people can solve really difficult problems, surely the trivial problems should present no difficulty so their code should have no bugs.

Those who are arguing otherwise seem to feel that programmers should not be embarrassed about or ashamed of bugs in their code. They feel that bugs are inevitable and one should strive for bug-free code, but realize that this striving will not always be successful. Instead, they should be willing to modify their code until it works.

Which side of the fence do you fall on? Is there a fence at all? Shouldn't craftspersons take pride in their code and strive for bug-free? Are bugs completely inevitable, even in solutions to trivial problems? Should there be any recognition of the frailty of human nature, or should we all be ashamed any time we fall short of godlike perfection?

There seems to be a false dichotomy suggested here: Either we get it right on the first try, or never. Which isn't how it works. Instead, we go through a cycle of writing code and verification (by whatever appropriate means--UnitTests, compiler errors, manual SQA, formal proofs, etc.) until some level of goodness is reached.


One thing is to try to create bug free software. That should be our purpose, but not a goal, since there is no known way to do that.

Another very different thing is to assume that we can effectively write bug free software. That's impossible.


EditText of this page (last edited April 22, 2004) or FindPage with title or text search