4 ms·
People will go out of their way to avoid talking directly to machines at a low level I would put it differently. At 30 bugs per kLOC, I'd prefer my codebase ex
by ip26 5y ago
People will go out of their way to avoid talking directly to machines at a low level
I would put it differently. At 30 bugs per kLOC, I'd prefer my codebase expresses a problem & it's solution- and as little below that level as possible.
Each well-vetted layer of abstraction between a scientific programmer and the machine's low level interface eliminates whole classes of bugs that are irrelevant to the problem that user is actually working on.
- DasIch 5y ago> At 30 bugs per kLOC[...] Where does that number come from?
- arthurcolle 5y agoThe context suggests to me that this was a self-reported approximation from GP
- ip26 5y agoIt’s a median-ish of various studies. You can google “bugs per 1000 lines of code”. The important part wasn’t the exact number, but rather the discovery that the ratio is pretty stable.
- marcosdumay 5y ago> but rather the discovery that the ratio is pretty stable The thing is, it isn't stable. It just doesn't depend on the language, what is very surprising. But it varies enormously from one study to another and, AFAIK, nobody has a good set of factors explaining it.
- fauigerzigerk 5y agoI don't find it that surprising. I think what programming languages (and styles) do is fill up each line of code with information until a roughly constant level of cognitive effort is required to process that line. At that constant level of effort, we make a certain constant number of mistakes. And that's what I think these studies show.
- marcosdumay 5y agoSome languages are very dense, others break things down in more lines. Some languages care about hard to control details of your computer's working, others handle that automatically. Some languages come with builtin validators, others let you write any kind of trash and try to make sense of it. Personally, I suspect the number of bugs per line is defined by social and psychological factors, and what changes from one language to the other is the amount of effort one has to put into testing and debugging. But well, none of this is obvious to me.
- catlifeonmars 5y agoI believe an appropriate term for that low level in this context is undifferentiated lifting