Aug 032010

Hopefully gone are the days when programmers work was measured in the number of lines of code they produced!  Any programmer knows this is in fact entirely the worst possible measurement of a programmers skill, the same result in half the code almost invariably means better, more easily maintained code.

Every so often howevert it’s useful to know the size of a code base you are working on so it gives you some idea of the scale of work that may be required, at this stage you need a free source code line counter,  and having looked recently the best one I found was one called CLOC – short for Count Lines of Code.

Amazingly fast, great language coverage, and awesome reporting.  With a single line of code I get a break down of all the programming languages in use, and how many lines of source code exist for each.

On Windows it’s as simple as:

cloc-1.51 --by-file-by-lang "C:\path-to-folder-requiring-count" --out="C:\path-to-ouput\count.txt"

Check it out:


 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>




This site uses Akismet to reduce spam. Learn how your comment data is processed.