Ever want to brag about how big this program you’ve written is? Sure, you could just shout out the number on the last line in your editor, but anyone who knows knows that you can’t trust that. I myself have seen programs so padded with white space that what would take me 20 lines is sprawled over an entire page. Wouldn’t it be great if there was a way to count the actual, functional, lines of code in a program.
Would I be bringing it up if there weren’t a way?
If you’re in a linux environment SLOCCount is just such a solution. Technically it runs in windows, but getting it there is almost as easy as installing Linux on a second partition. Actually, it’s not that bad, just setting up CygWin, which I think I might have done.
In all honesty I haven’t used the tool myself yet because of the limitation of the system (if someone could compile a windows native version, that’d be great) but I decided to post about it here anyways. I can defiantly see the value.


October 12th, 2009 - 5:40 am
Sounds useful – I use the CodeBlocks IDE, but I’ve never worked-out how to get the total number of lines, if you can even do it.
October 12th, 2009 - 12:15 pm
I think that sounds like a really cool program. I use Linux, and it’s in my distro’s package repositories, so installing it is a snap. Now let’s give this thing a test run on some Python code.
Hmm…it seems a very small Python game I’m working on that I’ll turn into C eventually currently takes .32 developers :-P