Live data from Hacker News

-2000 Lines of Code (2007)

folklore.org

61–70 of 222 posts

Re: -2000 Lines of Code (2007)

#61

Cartoonish anecdotes like this take away from that actual value that LOC can provide to management, when employed judiciously as one data point among many. It is very informative for managers to take a periodic look at the number/frequency of commits from each engineer and their size, and from there dive into each commit and explore the denseness of the code, the cyclomatic complexity, and the overall nature of the c…

Do you really expect most managers, if any, would do this?

No, probably not. And most don't try. My point is that --with proper context and thoughtful analysis-- it is data that can be useful.

Re: -2000 Lines of Code (2007)

#62

Cartoonish anecdotes like this take away from that actual value that LOC can provide to management, when employed judiciously as one data point among many. It is very informative for managers to take a periodic look at the number/frequency of commits from each engineer and their size, and from there dive into each commit and explore the denseness of the code, the cyclomatic complexity, and the overall nature of the c…

> Why have they reported at every standup the last six months Every what?

Standup. Daily meetings where teams talk about their blockers and so forth.

Re: -2000 Lines of Code (2007)

#63
post #57

Earlier quoted context omitted.

> Should I have received a talk because of that? Of course not. But, if your commit history for last 6 months is just one or two of those one-line changes a month, that might hint that there’s a problem.

This is exactly why KLoC is not a good measurement. If you know about this, you will make sure you match everyone else by embellishing your line count with comments, copy and rename functions or extra deep nesting. The manager will still not know anything without looking at everyones code.

A good manager should look at everyone's code.

A good manager should recognize that if a developer does nothing but annotate code with comments, and that's not what they're expected to be doing, there's a problem.

Re: -2000 Lines of Code (2007)

#64
post #54

Earlier quoted context omitted.

> Should I have received a talk because of that? Of course not. But, if your commit history for last 6 months is just one or two of those one-line changes a month, that might hint that there’s a problem.

Might that hint that the problem that is there is that the metric is bad?

So if you managed a team, and when you look at commit histories you notice that one person has <1 commit a month and you look at the commits and they're trivial... you would disregard any concerns?

Re: -2000 Lines of Code (2007)

#65

Earlier quoted context omitted.

> Why have they reported at every standup the last six months Every what?

Standup. Daily meetings where teams talk about their blockers and so forth.

If six months of daily meetings did not lead anywhere then cancel those meetings.

Re: -2000 Lines of Code (2007)

#66
post #55

Earlier quoted context omitted.

Right. One data point among many. And managers should be looking at everyone’s code, not just the low LOC ones. But there are people (I’ve seen this frequently) who constantly represent their work as having been “much more difficult than expected” but then you discover that they actually are struggling with what should be easy tasks, and looking at code (complexity and volume) is a data point. For me, more often than…

confirmation bias indeed works that way more often than not: it confirms what you already believe

I'm confused which part of this is so off-putting.

Joe is always the one in every standup saying the thing he's working isn't done yet because he's wrestling "one last tough bug." As a manager, you wonder if the technical problems are really that tough or if Joe is just struggling. Let's look at the commit history... yeah, something is off here, Joe has 1/10th the commits of his peers and they really don't seem more complex in any way, but look rather trivial. Time to talk to Joe and look at these commits together and see what's going on.

Is that really such a troubling proposition?

Re: -2000 Lines of Code (2007)

#67
Same nonsense at Convergent in the early days. Jim Frandeen worked on tightening up the OS, saved like 10% memory footprint. Likewise, a negative code count. That manager actually quit.

My own experience was changing a 10K line module with a template in one page. Put some angle-brackets in about 100 references which left a net -9900 LOC

Re: -2000 Lines of Code (2007)

#68
post #26

Earlier quoted context omitted.

Sorry but your argument makes no sense. The 10LOC/day guy is not to be singled out from the 1000LOC/day people because 1000 LOC could be just as trivial; 1LOC could have taken hours to discover.

I wonder what the grandparent would think about a few LOC/month, there were a few rather gnarly performance issues in the codebase at my work for which the fix was usually a one or two liner, but that took an inordinate amount of research to even know where to start looking. I guess I should be grateful for having a workplace that has sufficient understanding for the effort it takes to debug such issues.

Yes, but I'm guessing your commit history over the last year is not just 1/2-liners once a month, right?

Re: -2000 Lines of Code (2007)

#69

Earlier quoted context omitted.

I'm by no means important in my org but when something appears like a shitty idea I will raise that (like other ICs around me) and more often than not it works out fine. I'll agree to give something a shot but if it doesn't work it doesn't work and my managers so far have all realized that a bit into the trial period. Reading comments like yours, I guess I should value my work environment more.

If you want to see an extrema of people being afraid to speak up, just look at the Gemini image examples in a company that in theory encourages people to speak up. There are always topics that are exceptions.

If you're OOTL on Google Gemini ML-based content creator then https://blog.google/products/gemini/gemini-image-generation-... is a pretty good summary.

Ostensibly it appeared to be tuned to be racist.

Maybe Google encourages people to speak up but also has a culture of racism?

Re: -2000 Lines of Code (2007)

#70

Cartoonish anecdotes like this take away from that actual value that LOC can provide to management, when employed judiciously as one data point among many. It is very informative for managers to take a periodic look at the number/frequency of commits from each engineer and their size, and from there dive into each commit and explore the denseness of the code, the cyclomatic complexity, and the overall nature of the c…

LOC as a datapoint provide no value that a manager couldn’t get quicker and with less ambiguity via other sources. For example, identifying engineers struggling for a month on a topic, as you described, can be uncovered way earlier by replacing a reporting-Like „standup“ with collaborative structures that help the team, and the manager, understand progress and potential blockers. LOC are lagging way behind on issues…

With the exception of engineers whose role is strictly advisory, architectural, etc, for most engineers the direct literal expression of their work is the code that they commit. Not the design document, not the ideas in their head, but the code in the repo. Managers should be looking at this code in their evaluation of everyone's work. Someone with an unusually-small amount of code shouldn't be "punished" but it is something that should be noticed and examined.
Post reply on HN