3 ms·
Tests don't catch all bugs, even well written ones. Infact if tests could catch all bugs, you'd be able to write a test to determine if any program halts (!).
by quickthrower2 7y ago
Tests don't catch all bugs, even well written ones. Infact if tests could catch all bugs, you'd be able to write a test to determine if any program halts (!).
Now let's look at the nature of programmers. What mistakes are they most likely to make on a regular basis? Well they are human, and they are whacking these big fingers at a keyboard. Maybe typos? Also programmers are bad at spelling, from the source code I've read.
Now could a unit test catch all typo-led mistakes? Well I doubt it. Not for a big program with 10's of KLCs.
Does typing help? Yes - and I'd say typing speeds up programming by allowing autocomplete of code (because of less er... typing as in the finger kind). Since the IDE knows the type it can help you find the write method.
- heartbreak 7y ago> you'd be able to write a test to determine if any program halts Halt != bug, so this problem doesn't really apply. You can write provably correct software, even if we still haven't solved the halting problem.
- ehaliewicz2 7y agoIn most languages you can definitely introduce a bug which causes a program to not halt.
- owl57 7y agoYes, but do you often need to automatically determine if a bug causes a program to run indefinitely or only much longer than expected? That would be the halting problem, yes (strictly speaking, some subset of it, and for many programs a decidable one).
- dragonwriter 7y ago> Yes - and I'd say typing speeds up programming by allowing autocomplete of code Autocompletion is available in numerous IDEs and editor plugins for many popular dynamic languages (and some dynamic language REPLs, too); static typing certainly can provide a source of data for autocompletion, but it's not necessary for it.