4 ms·
And this is exactly why humans write bugs. We are not very good at understanding systems of systems.
by jacobush 11y ago
And this is exactly why humans write bugs. We are not very good at understanding systems of systems.
- stinos 11y agoThis. Anytime a major company (or major OSS instance) has software with some seemingly stupid bug, I'm amazed by some comments on HN like 'how is this even possible' or 'those programmers must be shit compared to company X or Y'. While if you just reflect on programming and yourself a bit, it should be fairly easy to recognize such bugs are just as easy to introduce as others and that tests preventing them equally hard to write.
- rbanffy 11y agoI didn't want to come across as arrogant, but the exercise of trying to understand what would drive us to a specific failure is always an interesting one. You must identify the patterns that are behind bugs that look stupid like this one. Is the code making decisions based on the username instead of a specific attribute of the user structure? That's one recognizable anti-pattern. Is it trying to parse the user's home path and encountering what looks like a folder with a special name?
- pessimizer 11y agoYou don't have to be arrogant to feel superior to this bug. There's no way that this is some inadvertent emergent effect of complex mechanisms reacting to each other. Somebody wrote code that in some context searches username strings for the substring "user." Even worse, under many circumstances when it finds one, it just shits itself probably looking to check that user against something it can't find, then looks for again, but can't find, then looks for again... The fact that it's obsessing you to figure out what kind of thought process could originate code that produces an interaction that expresses itself in this way IMO means that you'll probably never write code like this. Magic words, magic numbers...
- Piskvorrr 11y agoAll we know is that it triggers on the string "user"; could be that it CRCs to "00000000" or some other magic value, which then actually triggers the bug - and that there are other strings that could do this. (Which doesn't make your explanation implausible - per Occam's razor, yours would require fewer extra entities, and thus looks more likely - just that we don't know for sure)