2 ms·
Without going into too much detail Please do go into detail. What is some of this "quite a lot" of knowledge that sheds light on the questions at hand? It woul
by gruseom 13y ago
Without going into too much detail
Please do go into detail. What is some of this "quite a lot" of knowledge that sheds light on the questions at hand? It would be great to have new references.
"code size" is an awful metric
This has come up on HN before and the evidence does not support what you're saying. The gold standard in recent work [1] found that more complicated metrics have no value beyond simple program length: "After controlling for size none of the metrics we studied were associated with fault-proneness anymore."
it's about as verifiable and confirmed as cyclomatic complexity is
Do you mean they're both awful? Actually, if what you say is literally true, it follows by Occam that cyclomatic measurements are worthless, since they are far more complicated and no more valuable than the most trivial metric there is.
The studies may be weak and often old, but at least there is a body of evidence around this, and the body of evidence points reasonably consistently to the conclusion that code size is (a) the best measurement of complexity that we have, and (b) the best predictor of error rates. (The only other one I know of that has repeatedly been verified is code inspections, and that's a process not a metric.) Contradictory evidence is welcome.
It's true that there's a debate around how best to measure code size. But that's a separate question. That also has received some pretty high-quality discussion on HN in the past--see the link below. It changed my thinking, for one; I highly recommend the comments by anon_d in that thread.
[1] http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.20.2141 http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.20.2...,
via http://blog.vivekhaldar.com/post/10669678292/size-is-the-best-predictor-of-code-quality http://blog.vivekhaldar.com/post/10669678292/size-is-the-bes...,
discussed at https://news.ycombinator.com/item?id=3037293 https://news.ycombinator.com/item?id=3037293.