3 ms·
That's what you'd think. And then you go and review code written by people who know their stuff. And you find fault after fault after fault. A well known HN'er
by jacquesm 9y ago
That's what you'd think. And then you go and review code written by people who know their stuff. And you find fault after fault after fault. A well known HN'er commisioned a very simple little bit of code as a test and got sent a lot of submissions to evaluate (100+). A very large number of those contained obvious bugs, and this is from a group that would likely consider themselves to be 'above average'.
I've got 30+ years of C under my belt and I still would be very careful to make the claim that I could write a fault-free allocator on the first try. Three years ago or so this exact problem came up in one of my jobs and I reviewed the code of someone who was pretty good by most measures. The number of bugs was embarrassing.
So, maybe my experience is totally different than yours and this is all at the level of anecdotal evidence but it appears to me that writing bug free code is hard, in any language.