This program uses disk, directory, and file list boxes to make selecting files easy.
WJK says:
The function "lines in file" is a text file line counter and works, but I think we want lines of code.... so a blank line should not be counted.
Also, a remark line should not be counted. I might get some disagreement on this. Of course I consider remarks VERY important, they are not code
and irrelevant to the compiler.
What about lines of code that span multiple text lines? This is not picked up with this routine. Guess it all gets down to ones definition of line count. When all is Said and done, what can the figure actually be used for??
He's right about it all coming down to point of view.
I've worked in organizations where they carefully defined all this because
they tied your maintenance budget to lines of code. They didn't count
comments or blank space and counted continued lines as one statement. So you
could find code like this:
x = x + 1
x = x + 1
x = x + 1
Instead of
x = x + 3
All their careful definitions didn't stop programmers from abusing the
system.
People have argued that the real way to measure quantity of software is by counting function points. These are more or less places where the code can
branch. You can fool that, too.
Overall I just use a general line count to give me an idea of how much code I have to maintain. And I consider comments and white space used for formatting to be an important part of the code.
|