6 ms·
>If I make an off-by-one error, where, other than me, did it come from? Could have come from confusing documentation on the appropriate bounds, could have come
by aeturnum 7y ago
>If I make an off-by-one error, where, other than me, did it come from?
Could have come from confusing documentation on the appropriate bounds, could have come from an unclear exit condition for the loop, could have come from contradictory requirements that had no real solution. That you're the agent at the end of a chain doesn't release the chain from responsibility.
> If I make an off-by-one error, I could have done better.
People often miss targets by small amounts. Tyson Gay is only behind Usain Bolt in the 100 meter world record by 0.11 seconds[1]. Is that all on Tyson not working hard enough, or are there maybe other factors?
> It is not about shame, it is about responsibility.
If it's about responsibility, then there should be a process for understanding why engineers end up writing bad code. Of course it can be that the engineer made a mistake, but it can also come from many other factors. Assuming that the person who wrote a bad line of code should "take responsibility" puts the cart before the horse in building a good process.
After all - it's the compiler that emitted machine code that did the wrong thing. Maybe the compiler is the real villain here.
> We should all aspire to do better.
I agree!
[1] https://en.wikipedia.org/wiki/100_metres https://en.wikipedia.org/wiki/100_metres
- mannykannot 7y ago>>If I make an off-by-one error, where, other than me, did it come from? > Could have come from confusing documentation on the appropriate bounds... If you are blindly following direction to that level of detail, are you a programmer or a typist? Maybe there will be corner cases like this, but they do not invalidate my point. > Tyson Gay is only behind Usain Bolt in the 100 meter world record by 0.11 seconds. This is not a comparable situation. For one thing, off-by-one errors are not off-by-0.11 errors, though the difference is more significant than that. > If it's about responsibility, then there should be a process for understanding why engineers end up writing bad code. Of course, and there is no shame in that. Part of answering that question, and in becoming a better programmer, comes from acknowledging and understanding the mistakes we make (this is an important part of aviation safety, and the last thing an instructor wants to see is a student who has a tendentious excuse for every lapse.) And no-one is responsible for things they cannot control, unless they set them in motion themselves, or ignored the likelehood that they could happen. >> We should all aspire to do better. > I agree! Yes! this is the most imprtant point - and there is no shame simply from falling short.