|
|
|
|
|
by makecheck
3816 days ago
|
|
Well the problem with that analysis is, what qualifies as a "line" of code? An efficient algorithm may be punished over an inefficient one. An optimal one-liner can certainly cost a lot to develop (maybe you need a smart engineer, a lot of testing and a lot of time to figure it out) yet it would appear to be cheap. Then there's just textual differences. It depends on the programming language. And it can be different even in the same language... This function has one line: void f() { ... }
This function has 5 lines: void
f()
{
...
}
This function has many lines: /*
<several lines of comments>
*/
void
f()
{
...
}
|
|
The thing about "lines of code" is that it's CHEAP and EASY. It is also WAY better than having nothing. Which system is more complex, system A written in C++ 2003 or system B which was written Java in 2013? Which system is more complex, System C which is 200,000 lines or system D which is 10,000 lines? Even if I don't tell you how "lines" were defined in those two estimates, you can still tell more about C and D than about A and B.
"Lines of code" is a terrible metric, which can give only order of magnitude estimates. But that makes it enormously better than no metric at all, or a complex metric which we haven't actually measured.