Remix.run Logo
atn34 4 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].

[1]: https://en.wikipedia.org/wiki/Busy_beaver

Xmd5a 4 hours ago | parent [-]

flipping > to >= works quite often though!

lilbigdoot 3 hours ago | parent [-]

I was about to say a lot of algorithms or invariant bugs for me are slight mistakes at an edge of something

oblio 3 hours ago | parent [-]

"There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors."