3 ms·
The issue I happen to be working on right now is: the operating system returns an incorrect value, for a particular function call, in many cases. I'm reminded
by ken 7y ago
The issue I happen to be working on right now is: the operating system returns an incorrect value, for a particular function call, in many cases.
I'm reminded of an article I once read about determining whether a large number is prime. There are probabilistic algorithms that are much faster than actually checking every possible factor, and surprisingly accurate. Also, if you run any algorithm long enough, it's susceptible to bit flips (due to a cosmic ray or bad RAM or whatever). Together, this means that beyond some point, you're more likely to get the right answer with the probabilistic test than a perfect algorithm.
What's the "one right way" to deal with a bug in the OS? Sure, in the worst case, I could reimplement that entire subsystem, if I had infinite time and money ... but it's a large enough subsystem, odds are I'd introduce even more bugs in any replacement.
That's the tricky side of engineering. Sometimes "not cost-effective" is so expensive it defeats the entire purpose of whatever you're building. You very quickly get into massless elephants and frictionless inclined planes, and that doesn't help anyone.
I don't believe in "one right way" except in the simplest cases. As Harvey Pekar said, "Ordinary life is pretty complex stuff."
- inimino 7y ago> The issue I happen to be working on right now is: the operating system returns an incorrect value, for a particular function call, in many cases. Yes! Great example. So the right way is to fix the bug. The bug is not in your source code and fixing a bug in someone else's source code that you rely on is not cost effective because, in the words of Bob Dylan, "everything is broken."