Maybe you should add the meaning to the article? I also thought it would be bugs per line of code, a measurement that is useless by itself.
But up-so-far I think pretty much every measurement I have seen is useless.
Just to get it right. A project with 1 file and 100 lines of code in language X with 1 bug has technically a smaller "bug density" then a 50 million lines of code project in language Y with 3 bugs? If "yes", do you think that this is a useful measurement?
thanks for the feedback. I will try to make it more clear!
To your question, yes, that is what I meant by bug density. Language X will have 1 bug per repo and language Y will have 3.
To your particular example, it is useful if the 100 lines of code provide the same amount of functionality than the 50 million lines.
Of course, I don't know any language that is 500k more succinct than other, but I don't either know of any 50 million lines codebase with 3 bugs.
What I do expect is that roughly all developers, no matter the language, have to solve the same problems, so the open source libraries available have roughly the same functionality.
Sure, you don't find a 50 million line code project with just 3 bugs. It will have a lot more. That's the point, the bigger the code size the more bugs you usually have.
Usually a comparison of bugs per line of code is "better". But "better" still doesn't mean useful. Some languages are 2-3 times more succinct for the same functionality. So a more succinct language with the exact same amount of bugs will automatically have a larger "bug density" (considering bugs per line of code).
The assumption that every language somehow solves the same problems is also not really correct. A lot of languages like PHP, Python, Ruby, Perl and so on are primarily web-development. And a lot of stuff is only solved by using C libraries. Or in other word, not really solved at all.
Some binding to GUI frameworks like GTK, Qt or game-engines (what you see in Python and so on) sure never will have the code size or complexity like a whole library in C (its just a binding).
I am indeed generalising and assuming that most of us either build websites or do ETL from source A to source B. Probably because that is what I have done for the whole of my career (boring!).
I think you are right to point out that all languages rely on C or C++, but I think that is true for all of them, not just the ones that you mention.
Thanks for the comments!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.