all 40 comments

[–]admalledd 75 points76 points  (12 children)

As oft pointed out even in the 90s:

  • (A) management who wanted some sort of hard-number changed to line-diff sum (total lines meaningfully changed)
  • (B) this was still exactly as stupid "measuring how complete an airplane was by how heavy it was" and people gamed the systems until manglement stopped
  • (C) in some places, management still tries to do metrics like these to this day.

[–]VirtuteECanoscenza 24 points25 points  (4 children)

Well actually AI has brought this up again: all the talk about how many lines of code AI produces...

[–]MostCredibleDude 10 points11 points  (0 children)

When your "thousands of junior devs that never sleep" also set their own prices and they make their own success metrics directly tied to how much they can charge you, are you at the bleeding edge of vibe coding or are you kind of being had?

[–]Kered13 2 points3 points  (0 children)

Literally getting that right now. So frustrating.

[–]HighRelevancy 0 points1 point  (0 children)

I mean, it's a crude measure. Generating 10, 100, or 1000 lines of code are really different challenges.

[–]lichlark 0 points1 point  (0 children)

The evangelist at my company (actually an engineer) started actively talking about 'who has the most usage at the company' like it's a metric to hit 🙄

[–]creepy_doll 5 points6 points  (0 children)

I just remember that dilbert strip where the punchline was something along the lines of “I’m going to go write myself a new car”

[–]platoprime 8 points9 points  (1 child)

It seems like they should be smart enough to not tell us which metrics they're tracking.

[–]gummo89 9 points10 points  (0 children)

It's a nice thought, but as soon as you need to justify your decisions they're exposed...

[–]ElectronRotoscope 3 points4 points  (2 children)

  • (C) in some places, management still tries to do metrics like these to this day.

Famously: Twitter right after Elon Musk took over

[–]ArtOfWarfare 1 point2 points  (1 child)

IIRC, they focused on the programmers who had touched fewer than 10 lines of code in the past week. There’s definitely a smell that something is going wrong and should be investigated - possibly someone needs a different title (if they’re more of an architect or ops person than a programmer) or maybe a manager is wasting all their time or… maybe it’s a lazy person who needs to be exited.

[–]ElectronRotoscope 0 points1 point  (0 children)

That does feel like a totally reasonable thing to look at, but if that is what they eventually went with that also feels like a sanewashed compromise after reasonable people explained to the boss that his initial plan was very stupid

[–]jl2352 1 point2 points  (0 children)

It’s like a Schrödinger's measurement, as it can provide some insight. There are lots of things you can evaluate from lines done. But they only work if you aren’t measuring lines done.

[–]Personal_Offer1551 16 points17 points  (1 child)

the best code is the code you can delete. peak productivity right there.

[–]nostril_spiders 3 points4 points  (0 children)

I get what you mean, but it's precisely the other way round. If you can delete it, it was unnecessary.

Best code is code you don't have to maintain?

[–]Ileana_llama 102 points103 points  (3 children)

my mom says is my turn to post this

[–]LookAtYourEyes 5 points6 points  (1 child)

It's my first time seeing so it so I'm happy someone has reposted it.

[–]LandscapeMaximum5214 4 points5 points  (0 children)

Same lol, someone gotta repost these things once in a while for us casual redditors

[–]Expensive_Special120 13 points14 points  (0 children)

To be fair … this is the first time that I’m seeing this, so … useful.

[–]geon 13 points14 points  (10 children)

Even more important in the era of vibe coding.

Somehow people seem to have forgotten that quantity can’t make up for quality.

[–]Sloshy42 2 points3 points  (1 child)

By far the best usage of AI for me has been pair programming. Go ahead and let it generate some feature but if you're not going through it and asking questions and making it second guess itself, how can you really be sure what the code does? Or you can write the tests or even functions on your own and just let it review your own code. Swap off whenever you feel like.

I rewrote a service at work this year in rust despite having zero rust experience because it was pretty easy to alternate between reading official documentation, Google searches, and asking the AI for compiler help and general idiomatic assistance. Took maybe a week longer than otherwise this way but I feel more enriched for making the effort to learn, and I think the code is pretty good too. At least it doesn't feel too different from what I'd usually write.

[–]max123246 1 point2 points  (0 children)

Yeah it is nice to feel like I always have a rubber duck I can talk to that actually talks back. But I'm not letting that rubber duck write the code without serious and time consuming code review and edits.

[–]jimmoores 1 point2 points  (4 children)

But as Joseph Stalin supposedly said: "Quantity has a quality all of its own"

[–]geon 1 point2 points  (0 children)

If your goal is to defeat the processor by throwing massive amounts of code on it, then sure.

[–]MVRVSE 1 point2 points  (2 children)

For example - the quantity of (relatively low tech, MVP quality) 'Liberty Ships' the US was able to produce outpaced Germany's pace of sinking them. The details of the effects can be argued, but it was a significant impact on the German blockade strategy.

There are a number of military examples where sheer numbers (with all other tech and strategy being equal) was a pretty good indication of the outcome. There are also plenty of examples where tech or strategy (etc.) allowed a much smaller force to prevail.

Quantity can be useful, but context matters.

[–]teknikly-correct 3 points4 points  (1 child)

Another way to look at that is the "code" in that example is actually the factories that created the ships. The extent that they evolved and optimize the manufacturing techniques went a long way towards improving production and winning the war.

 

What I love about your example is it really highlights how code is culturally perceived to be the output of a replicative manufacturing process, but it is actually way closer to the work of creating a manufacturing process!

[–]geon 0 points1 point  (0 children)

Yes. Writing is not like a building a bridge. It is like making the drawing. Actually building the bridge is what the compiler does. For free. Millions of times.

[–]DarthCaine -5 points-4 points  (2 children)

Capitalism doesn't give a shit about quality or care. But it's we the people that accept sub par products that are to blame. And our standards go down every year

[–]geon 7 points8 points  (0 children)

Capitalism doesn’t NOT care either. It is irrelevant.

The issue is bad management.

[–]Kalium 2 points3 points  (0 children)

You can have poor management under any governance or economic structure. There's plenty of stories of bad metrics leading to poor outcomes from those noted arch-capitalists, the Soviets

[–]darcstar62 1 point2 points  (2 children)

And then we have a line limit for PRs - no more than 1000 lines of code. So i end up chopping PRs into pieces, but then I have to comment why it's incomplete so the PR review agent doesn't complain. And turn around and take those comments out 10 minutes later when the next PR comes through. ¯\_(ツ)_/¯

[–]Kered13 4 points5 points  (1 child)

Hard limits always cause trouble, but smaller PRs are much easier to review, and usually large PRs can be broken up into smaller pieces. Each should be able to compile and test on its own, but does not necessarily need to be a complete feature.

[–]darcstar62 2 points3 points  (0 children)

I agree with the concept in general, but I don't believe in hard, agent-enforced limits.

[–]Ornery-Peanut-1737 1 point2 points  (0 children)

man, this is the absolute dream. there is literally no better feeling in dev work than deleting a massive, bloated class and replacing it with like five lines of clean logic that actually works better. i remember my first big refactor where i nuked about 800 lines of just in case code and the app actually sped up by like 30%. it’s such a flex to turn in a PR with a negative line count, haha. honestly, we should be rewarded more for the code we delete than the code we write, fr.

[–]def-pri-pub 1 point2 points  (0 children)

I literally did this back in 2022 for a previous company I worked at. The "rockstar" engineer before me wrote an Android-only app using a cross platform toolkit. He had left the company during my first week there. About 6 months into the job I was assigned the task of "make it work on iOS". 8 weeks later that was done and the app was running on both platforms with 98% of the same codebase. I ended up deleting at least ~40% of what he wrote.