4 ms·
There is no right way, because the term "right" is ambiguous and subjective. Even a ridicuously bug-ridden software can be considered "done right" if the requir
by drdaeman 14y ago
There is no right way, because the term "right" is ambiguous and subjective. Even a ridicuously bug-ridden software can be considered "done right" if the requirements were quick development time and correct results for a single certain case (think of single-use one-liners). However, for example, the only known way to [provably] have a bug-free code is, unsurprisingly, to prove the code is mathematically correct.
- aidenn0 14y agoProving the code is mathematically correct is insufficient. Partial list of bugs I've found before, that (for at least some definitions of "prove") would not be detected by what you suggest. Note that rigorous testing can (and, in fact did) find these. * CPU Bugs (Including one that was unknown to the CPU manufacturer after nearly a decade of deployment) * Memory Bugs * Standard Library Bugs * Compiler Bugs Regehr even gives an example of a proven correct C compiler generating incorrect code (due to an incorrect system header), which was uncovered by testing. [edit] Lest people misunderstand my position, I still think TDD (as it has been explained to me) is BS, but testing, in general, is a necessary part of making reliable software.
- shared4you 14y agoStandard Library and Compiler are also pieces of software, so assuming they could be mathematically proved correct, they won't have bugs either. CPU bug & Memory bugs, yeah, you are right. EDIT: Oh ok, so the system header was not proved mathematically correct :)