4 ms·
The assumption any dev should have is: "The bug is yours" That isn't a true statement, as there are exceptions. It's just that you are unlikely to be the exce
by buro9 13y ago
The assumption any dev should have is:
"The bug is yours"
That isn't a true statement, as there are exceptions. It's just that you are unlikely to be the exception.
Whether you're relying on a compiler, network, some other application, a library, an API... the bug is nearly always yours and you should more rigorously check your code without making any assumptions, until you fully understand the root cause of a bug.
If you actually have got to the root cause of a bug, you'll find in nearly all cases the problem was with your code.
- shortstuffsushi 13y agoCame to say the same thing. "Innocent until proven guilty" when it comes to others' codebases. If you can strip an issue down to the bare minimum, and then prove that the issue is not within your own code, then it's time to start digging elsewhere. Rarely is that the right place to start, though.
- mratzloff 13y agoYes. Similar to the hyperbole in the article title, I say "All bugs are logic bugs" (in your code). Now, it's not strictly always true--sometimes it's environmental or in a library you depend on, or it's a garbage collection bug with the language, or what have you. But some developers (myself included, sometimes) reach for those excuses first because their code couldn't possibly be exhibiting that strange behavior on its own. After all, it worked perfectly in (insert situations). No, it's almost certainly a logic bug: a race condition, a parallel execution problem, something doesn't get set correctly in a very uncommon case, etc.