The Debugging Mindset
Of course, Dijkstra had his view on it. I try to adhere to his position and prefer proof by type-checking over proof by single example.<p>&quot;A common approach to get a program correct is called &quot;debugging&quot; and when the most patent bugs have been found and removed one tries to raise the confidence level further by subjecting the program to numerous test cases. From the failures around us we can derive ample evidence that this approach is inadequate. To remedy the situation it has been suggested that what we really need are &quot;automatic test case generators&quot; by which the pieces of program to be validated can be exercised still more extensively. But will this really help? I don&#x27;t think so.&quot; [1]<p>Linus (used) to have a similar position [2]<p>Debugging hides the underlying architectural problem: to either communicate or abstract the algorithm in such a way that it can be understood by the programmer. If something needs debugging, not the bug needs to be fixed, but the architecture to understand the bug before debugging.<p>[1] Edsger Wybe Dijkstra - EWD303. <a href="https:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;users&#x2F;EWD&#x2F;transcriptions&#x2F;EWD03xx&#x2F;EWD303.html" rel="nofollow">https:&#x2F;&#x2F;www.cs.utexas.edu&#x2F;users&#x2F;EWD&#x2F;transcriptions&#x2F;EWD03xx&#x2F;E...</a><p>[2] <a href="http:&#x2F;&#x2F;lwn.net&#x2F;2000&#x2F;0914&#x2F;a&#x2F;lt-debugger.php3" rel="nofollow">http:&#x2F;&#x2F;lwn.net&#x2F;2000&#x2F;0914&#x2F;a&#x2F;lt-debugger.php3</a>