Hacker News new | ask | show | jobs
by ben_w 1320 days ago
> My point is that if your productivity can be easily measured by LOC, then don’t tell me that LOC is a bad metric.

OK, so, I fundamentally disagree with the if condition.

This is in no small because of a previous coworker, in a place that shall not be named, who regularly duplicated entire class files rather than subclassing them, and his given argument when we challenged him on this was that he "couldn't subclass because the access specifiers were set to private" (yes really his defence was that bad).

Worse, I'd already added some "TODO: deduplicate this method" comments to the original, because the original was already a mess of copypasta code, and the new class duplicated all of these too.

So, a lot of new LOC that day, but none of them were good additions.

1 comments

If anything that guy’s a great example of why to use LOC as a metric because when he shows you a huge number of LOC, you say, “That’s a lot more than I expected, let’s take a look…” and you see that his performance sucks.

I think of metrics like this as a way to guide deeper looks and decision making. You just have to accept that “all models are wrong, but some models are useful.” LOC can be useful when it guides you to the right questions. It’s a starting point not the end of the conversation.

I don't think you're using the word "metric" the same way as those of us who are criticising the use of LOC as one.
Can you share the definition you think you’re using and the one you think I’m using?
I think you're using metric to mean "any measurement" even when that measurement feeds into an opaque function f(LOC).

I think what's being criticised is when its used as a direct scoring system (e.g. bonus = k * LOC).