3 ms·
Off by one errors are one of the most common type of errors. So it's a real gotcha for most programmers
by jimsimmons 5y ago
Off by one errors are one of the most common type of errors. So it's a real gotcha for most programmers
- deleted 5y ago[deleted]
- brabel 5y agoOff by one errors are also the easiest thing in the world to test. I never think much about whether I should do `n` or `n - 1`, I just write a test and then fix it if needed.