3 ms·
So , really - you actually see typo bugs in the wild? I haven't seen one of those for 20 years. I do see lots of cases where people didn't test it or used the
by ArkyBeagle 11y ago
So , really - you actually see typo bugs in the wild? I haven't seen one of those for 20 years.
I do see lots of cases where people didn't test it or used the wrong mechanism.
I have to go slowly because somebody already went fast and broke it.
And a friend once told me "LZW can compress code faster than you can." :) Which does not go to the value of orthogonality of purpose in source code, but I enjoyed the irony of the comment very much.
- collyw 11y agoProbably happens more frequently than you think in dynamic languages. Even in compiled languages I imagine its reasonably common to compare something to a hard coded string that could easily be mistyped.
- ArkyBeagle 11y agoI wasn't thinking of dynamic languages at all. I'd agree.
- chipsy 11y agoMath-heavy code tends to involve a lot of very similar algorithms, leading to a copy-paste-rename situation that isn't really helped by using a function. As such it's incredibly common to end up with bugs from assigning to "x, y, y" and not "x, y, z" etc. Sometimes a clever compiler will warn you that you have done something odd, other times you'll be left to discover the runtime error.
- ArkyBeagle 11y agoYeah, there's that. I've printed out code like that and colored different variables with different color highlighters to deal with it.
- ktRolster 11y agoHere's one more recent than 20 years: http://www.theregister.co.uk/2009/07/30/typo_caused_massive_ms_bug/ http://www.theregister.co.uk/2009/07/30/typo_caused_massive_... You're right though, with care and skill, typos really shouldn't be an issue