Ask HN: Can a software ever be 100% bug free?
1–10 of 20 posts
Re: Ask HN: Can a software ever be 100% bug free?
#2Probably the closest the world has ever come to bug-free code of substance is that produced by NASA for their space shuttles, and it cost ~$1,000 per line. (http://history.nasa.gov/sts1/pages/computer.html) This would make the typical YC app cost tens or hundreds of millions just to launch, and would put something like e.g. the operating system for your cell phone outside of the budget of most nations.
There are a host of other engineering tradeoffs that have to be made, too. In addition to prioritizing cost over bugs, shipping speed over bugs, feature set over bugs, being able to actually hire programmers over bugs [+], etc, are all important.
[+] Many programmers would consider the type of work environment you need to get bugs down to zero to be an oppressive place to work in. Among other things, it will quite literally try to crush any creativity out of you, turning you into an automaton which exactly implements the specs given to you. Those specs were dictated by Really Important People. You're not one. Write your function. Your last function was non-compliant with rule 436 2a subsection b. Improve your performance or we'll find someone who is not a threat to our software quality.
Re: Ask HN: Can a software ever be 100% bug free?
#3Re: Ask HN: Can a software ever be 100% bug free?
#4There are provers that help as well, such as Alloy.
For the typically/average project put there, the mayor problem I see is that people still rely on code coverage as the one and only metric for quality of their tests (if they even implement tests at all). Code coverage is a lazy, flimsy and unreliable metric that has been subsumed by the more powerful metric called mutation score.
If devs utilized mutation analysis more, they would provably have much better quality software.
See this video: http://confreaks.tv/videos/mwrc2014-re-thinking-regression-t...
Re: Ask HN: Can a software ever be 100% bug free?
#5It probably has a lot to do with how many users you have. 10 users, then bug-free is possible. 10,000+ well that is a different story. The more users you have, the more weird scenarios they come up with on how to break stuff.
It doesn't have anything to do with users or weird scenarios.
Re: Ask HN: Can a software ever be 100% bug free?
#6However, these techniques are often too computationally expensive in many practical cases. Moreover, formal verification requires one to very precisely specify how a piece of code should behave, as well as how the environment in which it operates may behave. (Think of OS, network I/O, user interaction, etc.) This is another source of often prohibitive complexity.
Re: Ask HN: Can a software ever be 100% bug free?
#7There is research being done on programs that can be proven to be correct and some progress has been made on practical languages. See Idris and Coq.
Re: Ask HN: Can a software ever be 100% bug free?
#8Programs that produce an output from an input and exit can get very close. See TeX as an example. There is research being done on programs that can be proven to be correct and some progress has been made on practical languages. See Idris and Coq.
Moreover, it's very common to use many LaTeX packages that are slightly incompatible, or have to be loaded in a fixed order, or don't handle accented letters, or ...
Re: Ask HN: Can a software ever be 100% bug free?
#9Re: Ask HN: Can a software ever be 100% bug free?
#10If we can agree that low-level hardware such as CPUs are essentially physical software, then it would seem that there are many bug-free software pieces out there. Many operating systems these days seem to have perfect or near perfect memory and thread management. Kernel mode drivers in general require a high level of quality since bugs usually mean death. User mode is where things get sloppy, and front-end Web Develo…
I don't think that you can consider CPUs to be bug-free. Just to pick one, Intel got SYSRET wrong: https://blog.xenproject.org/2012/06/13/the-intel-sysret-priv...