I have two questions about the metric of 'lines of code':
1. How do you actually count this? On a Unix box, I can run 'wc -l'
to get the lines, but of course this includes comments and blank lines.
There are scripts that will give you a line count in terms of source code.
It is usually used by bad managers who want to judge your skills based on
the number of lines of code you produce or by the defect ratio (number of
defects per 1000 lines of code or defects/KLOC). The sad thing is, the
moment a programmer knows that management is doing this they tend to write
code like:
if
(expression)
{
do
something
which
should
be
one
line;
}
Even if they don't do that it makes programmers work less to create short
elegant solutions. For example, in second year at university, for a home
work assignment I had to write some code that handled 17 different
situations. I was very impressed with myself. I figured out how to
classify the 17 different cases into 9 equivalence classes and got the
code down to 2 pages. The professors solution did it in 2 equivalence
classes and only 12 lines of code.
If we are measuring skill by lines of code, I was more skilled then my
professor. Obviously not the case.
Since you are not look for this script for the same reason most people
are, do a search for KLOC and you should end up finding it.
2. What is a fair number of lines of code in a one-man project that
would show decent proficiency (i.e. for a job interview)?
5000? 10,000? 100,000?
The short answer would be 10,000. Just off the top of my head my gut tells
me that writing a 10,000 line program will tend to require the skills of a
proficient programmer.
The long answer is, I have no idea. I have seen code that has a single
function with hundreds of if/elseif/else statements, making the function,
LITERALLY, thousands of lines long. I would have to say that someone who
wrote a three function program that was 10,000 lines long is not someone I
want to hire.
The reality of the situation is that there is more than just the number of
lines written that will determine proficiency. How long has your code been
in use? Did it fail when there was an update to the OS? Has it been
released to the public? How many people are using it? Did you release a
version 2 and 3?
The funny thing is, when I was proficient I knew it. When I'm interviewing
a candidate and asking him questions I tend to know whether or not they
are proficient. I don't have a specific set of questions for determining
proficiency. I will just start chatting with the programmer. If they are
proficient it should become obvious after a few minutes.