frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Lines of Code Are Back (and It's Worse Than Before)

https://www.thepragmaticcto.com/p/lines-of-code-are-back-and-its-worse
64•birdculture•2h ago

Comments

kittikitti•1h ago
When I was just beginning, all of the productivity measures would be 0 and I felt like a failure. The most attainable was lines of code. Currently, it's not a great measure of productivity as I'm achieving more advanced tasks. I've heard so many opinions about how LOC isn't a great measure and then the same people get to trample on all of the work I've done out of spite because I've written more code than them. I think LOC is great because productivity measures are for beginners and people who don't understand code. The audience doesn't know the difference between writing a hundred or thousands of lines of code, both are trophies for them.

These metrics for advanced roles are not applicable, no matter what you come up with. But even lines of code are good enough to see progress from a blank slate. Every developer or advanced AI agent must be judged on a case by case basis.

kemotep•1h ago
But if removing 1kLOC and replacing them with 25 for a much better function, there is a -975 LOC report. Does this count as negative productivity? Having brackets start and stop on their own lines could double LOC counts but would that actually improve the code base? Be a sign of doubling productivity?

The OpenBSD project prides itself on producing very secure, bug free software, and they largely trend towards as low of lines of codes as they can possibly get away with while maintaining readability (so no codegolf tricks for the most part). I would rather we write secure bug free software than speed up the ability to output 10kLOC. The typing out code isn’t the difficult part in that scenario.

skydhash•45m ago
No one judges a painting by the amount of paint, or a wooden chair by the number of nails in it. The amount of LoC doesn’t matter. What matters is that the code is bug-free, readable, and maintainable.

But reducing the amount of LoC helps, just like using the correct word helps in writing text. That’s the craft part of software engineering, having the taste to write clear and good code.

And just like writing and any other craft, the best way to acquire such taste is to study others works.

countWSS•1h ago
The code written by AI in most cases is throwaway code to be improved/refined later. Its likely to be large, verbose and bloated. The design of some agents have "simplify/refactor" as final step to remedy this, but typically your average vibe coder will be satisfied that the code just compiles/passes the minimal tests. Lines of code are easy to grow. If you refine the AI code with iterative back-and-forth questions, the AI can be forced to write much more compact or elegant version in principle, but you can't apply this to most large systems without breaking something, as AI doesn't have context of what is actually changing: so e.g. an isolated function can be improved easily, but AI can't handle when complexity of abstraction stacks and interfacing multiple systems, typically because it confuses states where global context is altered.
Kerrick•34m ago
I've been working to overcome this exact problem. I believe it's fully tractable. With proper deterministic tooling, the right words in context to anchor latent space, and a pilot with the software design skills to do it themselves, AI can help the pilot write and iterate upon properly-designed code faster than typing and using a traditional IDE. And along the way, it serves as a better rubber duck (but worse than a skilled pair programmer).
crazygringo•1h ago
I think the author is missing a key distinction.

Before, lines of code was (mis)used to try to measure individual developer productivity. And there was the collective realization that this fails, because good refactoring can reduce LoC, a better design may use less lines, etc.

But LoC never went away, for example, for estimating the overall level of complexity of a project. There's generally a valid distinction between an app that has 1K, 10K, 100K, or 1M lines of code.

Now, the author is describing LoC as a metric for determining the proportion of AI-generated code in a codebase. And just like estimating overall project complexity, there doesn't seem to be anything inherently problematic about this. It seems good to understand whether 5% or 50% of your code is written using AI, because that has gigantic implications for how the project is managed, particularly from a quality perspective.

Yes, as the author explains, if the AI code is more repetitive and needs refactoring, then the AI proportion will seem overly high in terms of how much functionality the AI proportion contributes. But at the same time, it's entirely accurate in terms of how this is possibly a larger surface for bugs, exploits, etc.

And when the author talks about big tech companies bragging about the high percentage of LoC being generated with AI... who cares? It's obviously just for press. I would assume (hope) that code review practices haven't changed inside of Microsoft or Google. The point is, I don't see these numbers as being "targets" in the way that LoC once were for individual developer productivity... there's more just a description of how useful these tools are becoming, and a vanity metric for companies signaling to investors that they're using new tools efficiently.

o_nate•55m ago
I don't think the author is missing this distinction. It seems that you agree with him in his main point which is that companies bragging about LOCs generated by AI should be ignored by right-thinking people. It's just you buried that substantive agreement at the end of your "rebuttal".
jihadjihad•46m ago
> It seems good to understand whether 5% or 50% of your code is written using AI, because that has gigantic implications for how the project is managed, particularly from a quality perspective.

I'd say you're operating on a higher plane of thought than the majority in this industry right now. Because the majority view roughly appears to be "Need bigger number!", with very little thought, let alone deep thought, employed towards the whys or wherefores thereof.

Kerrick•43m ago
> the overall level of complexity of a project

The overall level of complexity of a project is not an "up means good" kind of measure. If you can achieve the same amount of functionality, obtain the same user experience, and have the same reliability with less complexity, you should.

Accidental complexity, as defined by Brooks in No Silver Bullet, should be minimized.

saidnooneever•38m ago
a bit of a nit but accidental complexity is still complexity, so even if that 1M lines could reduce to 2 kines its still way more complex to maintain and patch than a codebase thats properly minimized and say 10k lines. (even though this sounds unreasonable i dont doubt it happen..)
mehagar•16m ago
So the question is, are these AI tools primarily creating inherent complexity, or is it a significant amount of accidental complexity?

And if AI tools are writing all of the code, does it even matter anymore?

mehagar•13m ago
If tech companies want to show they have a high percentage of LoC being generated by AI, it's likely they are going to encourage developers to use AI to further increase these numbers, at which point is does become a measure of productivity.
VirusNewbie•9m ago
> would assume (hope) that code review practices haven't changed inside of Microsoft or Google.

Google engineer perspective:

I'm actually thinking code reviews are one of the lowest hanging fruits for AI here. We have AI reviewers now in addition to the required human reviews, but it can do anything from be overly defensive at times to finding out variables are inconsistently named (helpful) to sometimes finding a pretty big footgun that might have otherwise been missed.

Even if it's not better than a huamn reviwer, the faster turnaround time for some small % of potential bugs is a big productivity boost.

dimgl•1h ago
I was enjoying the article, and then the author hit me with one of these:

> AI didn't just repeat the mistake. It broke the mistake open.

Come on bruh

MyHonestOpinon•1h ago
It reminds me. When I had my consulting company 20 years ago, I defined these "metrics" to decide if a project was successful.

- Is the client happy? - Are the team members growing(as in learning)? - Were we able to make a profit?

Everything else was less relevant. For example: Why do I care that the project took bit longer, if at the end the client was happy with the result, and we can continue the relationship with new projects. It frees you from the cruelty of dates that are often set arbitrary.

So perhaps we should evaluate AI coding tools the same. If we can deliver successful projects in a sustainable way, then we are good.

ziml77•1h ago
I've noticed that it's super easy to end up with tons of extra lines of code when using AI. It will write code that's already available (whether that's in external libraries, internal libraries, or code already the same project). I don't mind trying to keep dependencies down, but I also don't want every project to have its own poorly tested CSV parser.

It also also often fails to clean up after itself. When you remove a feature (one that you may not have even explicitly asked for) it will sometimes just leave behind the unused code. This is really annoying when reviewing and you realize one of the files you read through is referenced nowhere.

You have to keep a close eye out to prevent bloat from these issues.

viktorcode•58m ago
LoC is a good code quality metric, only it has to be inverted. Not "it wrote C compiler in 100 000 lines of code", but "in just 2000 lines of code". Now that is impressive and deserves praise.
Kerrick•39m ago
I don't want to maintain an information system written in the style of code golf competitions, either.

I like the author's proposed "Comprehension coverage" metric. It aligns well with Naur's Programming as Theory Building.

hamuraijack•33m ago
this is also easily gameable. Any language can easily be converted into a single LOC
CuriouslyC•54m ago
Lines of code changed are a very bad measure for humans because they can be gamed. It's an ok measure for "work done" with AI if you're don't prompt the model to game it. It's useful because it's quick to calculate and concrete, but if you use it as more than a proxy it'll bite you.
elischleifer•44m ago
Detection of copy-pasta is interesting - what it's calling out is not a deficiency in LLM's to code but in agentic rules in place that should just remind the agent to refactor into a common function when appropriate.
skeeter2020•23m ago
>> that should just remind the agent to refactor into a common function when appropriate.

This off-the-cuff statement buries so much complexity. Sure it catches new code the exactly implements existing code, but IME it is __way__ more common to need to slightly (or not so slightly) change existing code that can now be used by multiple consumers, and then delete the new "duplicate" code. That is not trivial and requires (1) judgement from your AI coder and (2) deep reviewer expertise from your human coder.

skeeter2020•26m ago
Forget about if LoC is (or ever was) a meaningful metric; in a world where humans - and now AI - essentially wires up massive amounts of existing functionality with relatively little glue code I don't even know how to measure it.
ptdorf•7m ago
I should change my linkedin to vibe coder fixer

An AI agent published a hit piece on me

https://theshamblog.com/an-ai-agent-published-a-hit-piece-on-me/
510•scottshambaugh•1h ago•252 comments

ai;dr

https://www.0xsid.com/blog/aidr
179•ssiddharth•58m ago•82 comments

Email is tough: Major European Payment Processor's Emails rejected by GWorkspace

https://atha.io/blog/2026-02-12-viva
249•thatha7777•3h ago•166 comments

Launch HN: Omnara (YC S25) – Run Claude Code and Codex from Anywhere

20•kmansm27•47m ago•23 comments

Shut Up: Comment Blocker

https://rickyromero.com/shutup/
20•mefengl•56m ago•6 comments

Improving 15 LLMs at Coding in One Afternoon. Only the Harness Changed

http://blog.can.ac/2026/02/12/the-harness-problem/
334•kachapopopow•4h ago•142 comments

A brief history of barbed wire fence telephone networks (2024)

https://loriemerson.net/2024/08/31/a-brief-history-of-barbed-wire-fence-telephone-networks/
61•keepamovin•3h ago•16 comments

Culture Is the Mass-Synchronization of Framings

https://aethermug.com/posts/culture-is-the-mass-synchronization-of-framings
61•mrcgnc•3h ago•38 comments

Apache Arrow is 10 years old

https://arrow.apache.org/blog/2026/02/12/arrow-anniversary/
102•tosh•4h ago•19 comments

Warcraft III Peon Voice Notifications for Claude Code

https://github.com/tonyyont/peon-ping
802•doppp•12h ago•253 comments

The "Crown of Nobles" Noble Gas Tube Display (2024)

https://theshamblog.com/the-crown-of-nobles-noble-gas-tube-display/
103•Ivoah•5h ago•20 comments

US businesses and consumers pay 90% of tariff costs, New York Fed says

https://www.ft.com/content/c4f886a1-1633-418c-b6b5-16f700f8bb0d
189•mraniki•2h ago•157 comments

The Future for Tyr, a Rust GPU Driver for Arm Mali Hardware

https://lwn.net/Articles/1055590/
67•todsacerdoti•3h ago•17 comments

Gemini 3 Deep Think

https://twitter.com/GoogleDeepMind/status/2021981510400709092
95•tosh•1h ago•29 comments

I Wrote a Scheme in 2025

https://maplant.com/2026-02-09-I-Wrote-a-Scheme-in-2025.html
86•maplant•3d ago•11 comments

MiniMax M2.5 released: 80.2% in SWE-bench Verified

https://www.minimax.io/news/minimax-m25
51•denysvitali•1h ago•12 comments

So many trees planted in Taklamakan Desert that it's turned into a carbon sink

https://www.livescience.com/planet-earth/plants/china-has-planted-so-many-trees-around-the-taklam...
68•Brajeshwar•1h ago•13 comments

Show HN: 20+ Claude Code agents coordinating on real work (open source)

https://github.com/mutable-state-inc/lean-collab
18•austinbaggio•1h ago•20 comments

Run Pebble OS in Browser via WASM

https://ericmigi.github.io/pebble-qemu-wasm/
63•goranmoomin•4h ago•10 comments

Apple patches decade-old iOS zero-day, possibly exploited by commercial spyware

https://www.theregister.com/2026/02/12/apple_ios_263/
169•beardyw•3h ago•94 comments

Beginning autonomous operations with the 6th-generation Waymo Driver

https://waymo.com/blog/2026/02/ro-on-6th-gen-waymo-driver
17•ra7•1h ago•11 comments

Lines of Code Are Back (and It's Worse Than Before)

https://www.thepragmaticcto.com/p/lines-of-code-are-back-and-its-worse
64•birdculture•2h ago•25 comments

Carl Sagan's Baloney Detection Kit: Tools for Thinking Critically (2025)

https://www.openculture.com/2025/09/the-carl-sagan-baloney-detection-kit.html
114•nobody9999•11h ago•64 comments

The missing digit of Stela C

https://johncarlosbaez.wordpress.com/2026/02/12/stela-c/
88•chmaynard•9h ago•14 comments

Fast Properties in V8 (2017)

https://v8.dev/blog/fast-properties
5•aragonite•4d ago•0 comments

TikTok is tracking you, even if you don't use the app

https://www.bbc.com/future/article/20260210-tiktok-is-tracking-you-even-if-you-dont-use-the-app-h...
105•belter•3h ago•78 comments

“Nothing” is the secret to structuring your work

https://www.vangemert.dev/blog/nothing
401•spmvg•4d ago•162 comments

Show HN: Inamate – Open-source 2D animation tool (alternative to Adobe Animate)

10•hactually•2d ago•7 comments

HeyWhatsThat

https://www.heywhatsthat.com/faq.html
116•1970-01-01•3d ago•22 comments

Using an engineering notebook

https://ntietz.com/blog/using-an-engineering-notebook/
285•evakhoury•2d ago•117 comments