Tool to count Lines of Code
Do you know where I can find information about tools that automatically count the number of lines of code of set of source files?
I read in a lot of places that it is better to use the Function Points method to calculate the size of a project but I thing that it is a bit complicated for a person to calculate the # of FP for a big project, and even more complicated for someone that is outside of the reuirements and/or development teams.
Thanks in advance for your help
Re: Tool to count Lines of Code
I have usually found it easiest just to write something in the language I am programming in and check the lines. I have done this, for example, in Visual Basic. You can also check out various code complexity checking type programs that will probably give you a line count. (Again, I find it easier to just build this kind of stuff.)
You also have to consider what you are going to count. Of course you will include all executable lines, as well as declaration statements, etc. But are you going to include comments? (Most, obviously, do not.) Do you include preprocessor directives. (Most, obviously, do but I have found some who do not.) It is especially telling when you get into programs like the AppWizard of Visual C++.
There was a program called SLOCC (Source Lines of Code) but I am not sure if it is still around. There was also CCCC that mainly supported C++ but I think it could handle Java as well. Again, however - it is usually just easier to either build something yourself or have one of your developers do it if you are not proficient in the particular language. Some IDEs do come with this ability built-in or provide code to do it out-of-the-box.