Live data from Hacker News

-2000 Lines of Code (2007)

folklore.org

91–100 of 222 posts

Re: -2000 Lines of Code (2007)

#91
Counting lines of code as a production metric is very stupid. I remember solving an unsolvable 20 years old bug with a line of code, another 3 years old with a order by. How to measure the impact of a line of code? And in my experience, bad programmers write a lot more code...

I will never forget the story[1] of a Microsoft developer rewriting a piece of IBM code that had 33 thousand characters, after rewrite ... 220. This generated a war because MS's work was... negative.

[1] https://archive.org/details/bigbluesunmaking00carr/page/4/mo... page 101

Re: -2000 Lines of Code (2007)

#92
post #51
post #5

> they stopped asking Bill to fill out the form which is only possible because he's so important. imagine doing this as a stack-ranked IC in an org like AWS. The old days of a software as an artisanal craft is long over imho.

And now you understand why programmers need to be part of a Trade Union. Protection from retaliation and group negotiation on working conditions are brilliant for people who aren't as "important" as Bill.

And the probability of creating a Macintosh in a union shop is zero.

Abusive boss, normalized unpaid overtime, compensation based heavily on stock options, pay and promotions being based on merit and not on seniority and time spent in a company.

Re: -2000 Lines of Code (2007)

#93
post #89

Earlier quoted context omitted.

600dd:w shouldn’t cause RSI ;)

It was five to six lines of code repeated in half a dozen spots in a dozen files, with different variable names, and different arguments. And I wasn’t deleting them, I was replacing them with the same function call.

That’s got “macro” written all over it.

Re: -2000 Lines of Code (2007)

#95

A corresponding thought-experiment is to consider the results of the opposite situation: if a manager read this article, and simplemindedly decided to measure by lines of code removed instead. Would that make things better or worse?

Worse, because codegolfing the entire codebase is undesirable.

Re: -2000 Lines of Code (2007)

#96
post #93
post #89

Earlier quoted context omitted.

It was five to six lines of code repeated in half a dozen spots in a dozen files, with different variable names, and different arguments. And I wasn’t deleting them, I was replacing them with the same function call.

That’s got “macro” written all over it.

That's a sed /d of course. Or a "Replace all in folder" in any decent code editor.

Or a sufficiently efficient "extract to method" on a decent IDE, that notices the different occurrences even with renamed variables.

Unless those lines of code were subtly edited all over the place and needed careful and subtly different replace for each occurrence, or at last review because that's what's truly evil with duplicated code. It's forks that diverged to maintain N times in your codebase.

Re: -2000 Lines of Code (2007)

#97
This comes up often! A few previous discussions:

https://news.ycombinator.com/item?id=33483165 (2022)

https://news.ycombinator.com/item?id=26387179 (2021)

https://news.ycombinator.com/item?id=10734815 (2015)

https://news.ycombinator.com/item?id=7516671 (2014)

https://news.ycombinator.com/item?id=4040082 (2012)

https://news.ycombinator.com/item?id=1114223 (2010)

https://news.ycombinator.com/item?id=1545452 (2010)

Re: -2000 Lines of Code (2007)

#98

Earlier quoted context omitted.

heh, I note your recent comment history is you being salty about everything you deem "cargo cult agile", and people patiently responding to that. Yes, having a chat between the team for fifteen minutes every day is in fact quite useful, believe it or not. We're not talking about hour long waterfall-y management progress review meetings here.

Daily status updates are not useful. Linux kernel developers don't do them. I trust that nothing is stopping your engineers from having a chat and that their manager doesn't need to schedule their chats for them.

You speak in absolutes. What works for me, works for me :)

Re: -2000 Lines of Code (2007)

#99
There is a deeper lesson here: Someone was thinking of lines of code as an asset, not a cost. It's a an error you also see in junior programmers writing reams and reams of code. The lesson is a harsh one for us code lovers, at least it was for me:

Code is a means to an end, and an expensive one at that. The best code is the code never written. Our job is to solve problems, not to write code.

You can use LOC as a crude measure of progress, in the same way as tons of concrete used is a crude measure of progress when building a skyscraper.

Re: -2000 Lines of Code (2007)

#100

Earlier quoted context omitted.

Not much of an achievement, but I once deleted a 45k line Jest snapshot test for a React component that basically asserted that a div is rendered.

Maybe you are being sarcastic... Or you've completely missed the point of the article/story. The point is lines of code are almost meaningless. In this story the person saved 2k lines of code by rewriting a rendering engine, and use somehow think that's less than deleting a 45 k line jest snapshot.

“Not much of an achievement, but” here refers to the commenter’s action, not the one in the article
Post reply on HN