3 ms·
This guy is wrong, plain and simple. Unforeseeable bit-copying errors caused by cosmic rays and similar circumstances, which do exist, probably account for less
by jng 15y ago
This guy is wrong, plain and simple. Unforeseeable bit-copying errors caused by cosmic rays and similar circumstances, which do exist, probably account for less than a one out of every billion actual bugs/crashes experienced out there. When a bit is toggled by a cosmic ray in memory, if it hits program memory, it will with a significant frequency crash your program.
Most bugs you experience daily (Word or your favorite game/appp crashing, etc...) are caused by actual software errors in overly complex systems with many dependencies. Multithreaded-coding errors can often account for many of those, but not only, complex system with many layers and complex dependencies can often hide obscure behaviors that can cause crashes in a given machine if, for example, you have a weird combination of disk drivers, file system code, and an antivirus hooking and acting on every filesystem read or write.
When, for example, a Word plug-in makes a call to Word's object model, this goes through easily 10 software layers until it reaches its target, some of these layers being configured via the flaky Windows registry, others going through jumps from VM-based to native code using weird "marshalling" techniques, etc... in these cases, you may encounter buggy behavior in any one of the 10 layers, or in a combination of two of them, even if it seems like you are just incrementing a simple counter.
Most of the time, though, bugs are caused by the app's own code (your own code): careless code, dangerous practices, lack of solid control-flow design, etc... if you write really good code, it's unlikely you will have many support issues. Only if you are working in some problem-prone area: plug-ins to other complex, often poorly-designed products, code pushing graphics drivers to the max, etc... where you get into "complex system" behavior.
Even if you use multithreading, if you control all the code, you can write very solid code. If your multithreaded code is perfect, it won't crash. Although it can uncover bugs in third-party libraries, etc... which is why I tend to write only "worker threads" with no third-party dependency if multithreading is required.
And I think it's very dangerous to warn novice programmers to think that the bug is probably somewhere else.
- gwc 15y agoHis point makes a lot more sense in the context it was originally intended. He's not making a point about programming or debugging in general; he's specifically discussing tech support as a one-man indie game shop. In particular, it's all about the cost-benefit tradeoff. In his words (taken from the first post in the series - http://jeff-vogel.blogspot.com/2011/06/seven-tips-for-giving-good-tech-support.html http://jeff-vogel.blogspot.com/2011/06/seven-tips-for-giving...): But at the same time, as a small developer, you have very little time to spare for support. Time spent getting the game working for one person is time not spent making a new game for everyone. You will need to develop a sense of when the time lost helping a person is not worth it, either because you won't be able to solve their problem or because they will not able to implement the fix you provide. ... Remember: It's only worth the time to do tech support if you have the chance to, in a reasonable amount of time, fix a problem and make a loyal customer. If you realize that, at the end of the road, you aren't going to end with a happy person and a working product, end the conversation as quickly and pleasantly as possible. In that context, I think his approach is very rational. If you pushed him, he'd probably agree that more often than not the issue is in his code (even if it's just a question of inadequate error handling). However, if the problem is only seen by a single user and will be a significant investment to try and fix, then it's simply not worth the time when he could be working on a new game, a port, or even a different problem that has been seen by multiple users.