Comment by atn34
9 hours ago
One of my professors used an example like this to encourage you to pause if you ever find yourself doing something like "maybe if I just flip this < to > the tests will pass". The space of incorrect programs (even ones that pass your tests) is enormous compared to the space of correct programs.
If you like thinking about this and haven't seen this before, check out the busy beaver problem[1].
flipping > to >= works quite often though!
I was about to say a lot of algorithms or invariant bugs for me are slight mistakes at an edge of something
"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."
1 reply →