What a load of crap from a bunch of whiners.
Most of the replies in this topic are wheedling responses
about how one can manipulate "lines of code" related metrics
and why less is more. You should all be laid off as overpaid
watercooler yakkers. Hell, I bet you're reading this right now on work
time you lazy bastards.
Sure, it can all be manipulated. But in response to the original
posters question:
"wc -l" is a one perfectly valid and useful metric for tracking
both progress on a coding project and for tracking the complexity
of the code. So are some of the other proposals (semicolons, etc)
Having hired literally dozens of people in demanding startup
environments, I've certainly asked people about what sort of volume
of code they've produced on their more complex projects. Why? Because
if they can't crank out at least 1,000 lines of debugged code a month
they're not qualified to do jack shit on some of my projects.
(Though they may be well qualified for other projects)
Obviously project contexts vary. A complicated existing body of code
confronted by a new programmer will have a less productive code curve.
And sure, there are issues of refactoring (which every good programmer
had better be doing). Similarly, the programming language used and
application domain can vary a lot too. Parallel programming has more
complexity than single threaded computations. C++ requires more code to
get a task done than Java. The list is endless.
When evaluating a programmer for capability and experience, if the
developer can't crank out
6-12kloc (with comments) in 6 months then we can start to categorize
the programmer for suitability to particular projects. In this case,
the programmer isn't someone I'd put on a mission critical new coding
project. I'd put them on something with less risk and time demand,
and I'd also pay them less than I'd pay a more qualified candidate.
Being a slower, or less experienced, or a less capable programmer isn't
a sin. It's important to set expectations appropriately. Really good
engineers can product 500-1000 debugged lines of code a DAY on a good
day. And good engineers can also crank out meaningful project
schedules, design documents, unit tests, and other things besides the
basic code.
As an interview candidate, you need to make sure that what you can do is
clearly understood by a prospective employer so that you're not getting
in above your head. It doesn't mean you won't get a job. It means
you'll have a better chance of getting the RIGHT job. And maybe,
with a series of the RIGHT jobs, you'll be one of those 500-1000 loc/day
coders someday too.
And there's a perfectly good market for people who never tweak more
than few lines of code a day as well. Different people bring different
skills to the table. Some people are good at reading existing code
and fixing it, without huge code output. Some people good at writing
lots of new code are BAD at reading existing code. (And some people who
can write a lot of code should NOT, because they write crappy code).
"wc -l" is useful as a progress indicator and rough rule of thumb.
I'll ask a candidate how much code they wrote on a project they're
particularly proud of as an accomplishement. If their net project
contribution
is ~10kloc+ in < 1 year, then I know they've probably crossed a certain
threshold
as a programmer that many programmers will never cross.
If they only produce a few hundred lines here and there, I wouldn't
hire them for new product development in a startup, but that doesn't
mean I wouldn't hire them. It means I'd consider their talents for the
jobs I have open and try to match them accordingly.
And if a programmer spent as much time making excuses as most of the
people in this topic did, the interview would be short. Better that
than hiring and firing someone because of a mismatch in expectations.
That's not good for the employer (late project deliverables), or the
employee (stigma of firing, depression, etc).
Productivity matters. So does quality, complexity, and dozens of other
factors. Asking about "how much code" doesn't make a bad interviewer.
It's just one metric for measuring
a person's skills. If it was the only metric used then the interviewer
wouldn't be good, obviously.
Note to the original poster: showing a 10kloc task is good. But it's
more credible if it finds its way into a revenue producing product or
infrastructure than if it's just something like a 10kloc script or pet
project. Some 10k lines of code are a lot easier to write than others.
Hopefully the interview discusses the nature of the code and context of
the project. How much design was required. What was the level of design
complexity. What safeguards were placed in the code to ensure correct
operation and also correct maintenance down the road. 10kloc is useless
if it isn't maintainable by people other than the original author.
Trolling or valid point of view, you decide