Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- I find it incredibly difficult to contribute to code files that were initiated by LLMs. Need to dig deeper to understand why but I just don't like it. I end up prompting my way out of any issues I see, sometimes it works out sometimes it doesn't.
- My father-in-law has (among other things) done a fair amount of editing or proofreading prose, mostly on paper with red and blue pens. He says that when the page looks like it's covered in blood, that means it was good writing. For bad writing, it's so bad that you can't really work with it.
I would not want to take a block of text written by AI and try to edit it to sound human. It's too hard to fix. (And I suspect this is why people don't - they just paste the AI output.)
I think the same may be true of AI code. You're not going to fix it. You can't edit it to be the code you would write. All you can do is re-prompt to try to get the AI to fix it.
by AnimalMuppet - I don't believe that AI is the 'higher level of abstraction[1]' that it is often claimed to be. However I wonder if it's possible to work with a codebase when other developers are treating AI as a higher level of abstraction.
Analogously, people can write in assembly, but can you write in assembly when the codebase is frequently altered by someone with an optimizing compiler?
[1] - Do higher levels of abstractions even exist? By my way of thinking that's called not an abstraction. C isn't a higher level of abstraction; it's a different abstraction implemented by assembly. There are more powerful abstractions and more ergonomic abstractions, but that doesn't make them 'higher level'.
by Verdex - > can you write in assembly when the codebase is frequently altered by someone with an optimizing compiler
This itself is quite normal (e.g. we have .S files and .c files and link them together), but I suppose a more accurate analogy would be that someone is dumping their optimising compiler output directly into your .S files.
Maybe what we need is better ways to partition the slop-code and the not-slop code.
by Retr0id - Sounds like you just don't like the phrase 'higher level'. To most people this is synonymous to 'powerful abstractions' and 'more ergonomic abstractions' in the sense that they allow us to think "at a higher level" - map instead of loop, objects instead of memory addresses and size, modules instead of gotos.by exe34
- > Analogously, people can write in assembly, but can you write in assembly when the codebase is frequently altered by someone with an optimizing compiler?
Yes. There's an interface boundary in the form of function prototypes and ABI rules. To the optimizing compiler, your assembly code is undistinguishable from separately compiled high-level code, and to your assembly code, the compiler output is undistinguishable from separately assembled low-level code.
One problem with LLMs, is that they don't respect these boundaries like an optimizing compiler would.
by cesarb - You wouldn't be the first person to eventually conclude that C is just a very fancy macro assembler.
But AI generated code is much like every other generated code: it is more voluminous and rather less elegant than what you'd write as a person. And here too there is a link with assembly: early compilers routinely put out absolutely terrible assembly by assembly programmers' standards of the day. And then they got better. To the point that today it takes some pretty rare niches that it pays off to break out the assembler and roll your own.
I expect AI generated code to develop in the same way, and the way to get them to improve is to hold generated code to high standards. The problem is the perverse incentive: generated code of low quality will eventually result in many more tokens burned than a one-shot piece of perfect and elegant code. Here you can draw a link with medicine...
by jacquesm - > We’ve never needed to treat understanding our own code as a separate cost from writing it, because writing it largely forced us to understand it.
Once a system gets to a certain scale, understanding it has always been a problem; it's just exacerbated in the age of LLMs. On many occasions, I've even seen folks write code they didn't understand, in the hopes that it would solve issues we were experiencing. Sometimes this code shipped. AI has just laid it bare.
I've been working for many months on exactly this problem: a tool to codify and accelerate understanding. Help with prod incidents. Architect better. Get to systematic understanding faster to save businesses valuable time (read: money). This is only getting worse in the AI age, but it has always been a problem for software at scale, and I'm thoroughly enjoying solving problems that I and my teams have had for many years.
by jodacola - This is why I don't use AI to write code directly but instead will use it to generate code snippets or ideas or critique, or even just use it as documentation I can talk to.
By doing this I can still get the benefits of the technology including - and this is crucial - as a learning aid to improve my own skills, while not entirely outsourcing my own thinking to the machine.
by andincl - This is exactly how AI should be used when coding. "Agentic" AI produces garbage code. The entire codebase should never be accessible to the context (even if parts at a time, if the agent chooses the parts). And the entire codebase should never be write accessible. Only limited scope writes, human read, and approved.by daveguy
- The balance sheets of the AI providers are pretty clear on this ownership thing: I shouldn't own it, NVidia should. Instead, I should pay at least once a very large amount to initially produce it. And then I should have a recurring usage-based monthly fee - for a license allowing me to say it's "my code". That's on top of hosting fees, etc.
- I'm fine with it. I'm just as liable or likely to write bugs in my own handwritten code as I am in generating code via AI, if not more likely.by nullbio
- My tiny two pet projects I keep developing with LLMs taught me how useful TDD is - I'm not a software engineer so I've been never formally introduced to these, but now I learn the best practices.
So in consequence I have less bugs in this code than what I could achieve myself, and as a second outcome of these is a solid workspace templates that make it faster and easier to get another small thing up to speed, the way that's good and "me". And the very short leash, sandbox and hooks make sure I learn a lot in the process too.
by subscribed - The question of code ownership highlighted in some of the comments herein (e.g., "when you build software, you own it... "No, I specifically don’t. My company owns it...") takes me back to a paper I read years ago on password management and extrinsic risk: The basic idea was that employees have no real motivation to maintain password hygiene because they bear little to no risk of password compromise. They are asked both to be productive and to be secure, they are more likely to be sanctioned for productivity problems than security problems, so they sacrifice company security in favour of employment safety.
We've seen commentary along these lines re AI productivity gains Vs code maintenance costs and quality concerns for months/years now, but somehow, for me at least, viewing this through the lens of code ownership (literal ownership, not metaphorical/moral ownership in the 'take pride in your work and do it well, regardless' sense) makes this extrinsic risk all the more clear.
It also makes me think of the estimated billions lost to spreadsheet errors: non-programmers unaware that they were programming creating spreadsheet macros that appeared to do exactly what they wanted, but that in reality only did so most of the time, with edge cases and error handling omitted entirely, leading to significant financial losses for their employers.
In that case, the lack of sanction is far clearer: They were not programmers, they did their best, no one noticed and it wasn't their job to do so, etc.
The case of AI isn't that different, especially since it is just as available to the non-programmer as it is to the cavalier, or to the pressured junior, or to the responsible, take-ownership-and-maintain developer.
AI without governance and program management leads organizations to assume unqualified and unquantified risk with diffused responsibility; outside the small class of take-ownership-and-maintain professional, all risks are extrinsic to individuals so why should they care if it gets the job (mostly) done?
They don't and they won't.
(Reaches for popcorn to watch imminent train wrecks whilst hoping his water supply remains uncompromised.)
- we will go full circle "what software would look like if we made keeping software understandable to humans" maybe we invent a pseudo programming language so we get deterministic results ;)by delijati
- I honestly have a vision of a database of .md files that fully describes an application in human-readable, (ok, engineer-readable), text. Making a change is committing a change to the human-readable text, and then AI comes and figures out the rest and/or suggests edits to the human-readable text. (Or asks questions.)by gwbas1c
- Some guy posted that project like a week ago on HN, no joke. Circle has been circled.by alasano
- I'm not OK with it, but I have no choice besides maybe quitting my job.
I've also tried to understand the code that AI writes, but it's often insane and untangling it would slow me down so much that it would nullify the gains in speed that AI brings.
To me, either companies realize they're spending a lot more money to ship crappier code and AI becomes a niche, or we'll just stop looking at code. I don't think there's any other option because I don't see AI getting better at it. It seems to actually be getting worse and more annoying to use.
by altern8 - > I've also tried to understand the code that AI writes, but it's often insane and untangling it would slow me down
I hear that a lot, but it is very different from my experience using Claude Code every day. The code it generates is pretty much what I would have written myself. My colleagues have always said my code is easy to read and understand, so hopefully it is not just because my code is insane too :)
So I wonder: how are you using LLMs?
- My company recently had to cut back our usage to effectively nothing and I get to code by hand again. I'm going to appreciate it while I can. The AI just wasn't providing enough value for usby mortalapeman
- There is an in between here that developers seem to keep forgetting: Design the software architecture yourself — do some whiteboarding, figure out your abstractions and your UML, then write that in your prompt for the LLM to implement through a plan.
Velocity stays high. Cognitive overhead remains low. You know enough of your architecture from the “unit” level to see how the pieces work meaning you can still work fast and understand it without hating the quality it produces. This has worked wonders for my company; I’ve managed to personally write tools that are barely distinguishable from what I’d write by hand, and I’m confident enough to discuss its architecture from top to bottom. If the LLM ever produces a unit with a poor implementation, I just rewrite that unit.
Basically: do the “engineering” part of software engineering instead of throwing LLMs at the wall until code sticks. It doesn’t take much time to come up with a good design, compared to repeatedly iterating on a bad design and maintaining it for years to come.
LLMs suck at design, and that’s why they lead to this bad code. But if a human spends an hour to build nice SOLID abstractions, and tell the LLM each responsibility — they are pretty good at using and wiring these parts together.
by bitwizeshift - Interestingly enough, the question "do we want to support it" has been the main one (not "can we write it") in any sufficiently large and mature project for as long as I remember.
Now, becoming large is now a solved problem essentially, but that's still only maybe 10-20% of the software engineering work in the long run. I'm grateful I can delegate some grunt work to LLMs, but, essentially, the main reason why large projects slow down development has never been due to inability to write lots of code quickly.
by nasretdinov - > when you build software, you own it
No, I specifically don’t. My company owns it, and that bastard will lay me off without a second thought.
by phoghed - Especially if they can use code you submitted as an excuse
- Yeah but only _you_ know what to do when your code breaks, ha ha.by amelius
- > It’s crystal clear that AI can be a complexity factory.
> I’ve been thinking a lot lately about what software would look like if we made keeping software understandable to humans a first-class design goal in the age of AI.
I agree, and I've been thinking similarly. But I don't think there's anything "new" about what understandable and well-factored code should look like. It's the same principles as ever.
A lot of agent-written code looks like what you'd get if you gave an enthusiastic human slightly too many stimulants and asked them to take the shortest path to reach the goal. Plausibly this is just a result of the LLMs not being "smart enough" to do any better, but I think there's also an incentives problem. How do you reward human-understandability in benchmarks and unsupervised training?
by Retr0id - Same way you do with humans.
Set acceptable review standards, outline appropriate frameworking, document approaches, test standards, documentation standards and overall just set good examples in both context and the codebase.
If your codebase is slop it's because you approved it.
by fjcururuvy7 - I don't think these comparisons between AI generated code and an idealised version of the code are productive. We have to compare with code that exists in the real world, so AI against human, and not only that, good AI generated code with good human written code, as well as AI slop with human slop.
I think if we did that we'd see that on average the code written by humans are less legible, parts of the intention will live forever in the mind of the developer at time of writing, and more prone to complexity build-up over time, simply because there wasn't time and incentive to go back and refactor code that works, apparently.
Now with AI sure you produce a lot more complexity, more than the human prompter could write by himself, but complexity can be managed with the same workflow that created it, by analysing and removing code paths, changing code architecture, replacing reimplementation with consolidated libs etc...
It's a matter of knowing how to use the tool and not creating a false sense of nostalgia where we feel like we had it better in the old days, which is not true at all.
> How do you reward human-understandability in benchmarks and unsupervised training?
And to answer this, there is no replacement for humans immersed in their world yet, so we need developers with with good understanding of the domain and that are able to write good descriptive prose in order to steer agents into producing acceptable code.
by gchamonlive - There are deterministically computable metrics for cognitive complexity and readability[0].
They’re not perfect by any means — and I suspect they’re already included in the RL process for coding evals, and have been for some time. I do think we’ll see ongoing improvement in this area though.
[0] (pdf warning) https://www.sonarsource.com/docs/CognitiveComplexity.pdf
by MyelinatedT - I think the worst part is that to the bullshit artists that usually float to the top of any org chart, AI generated docs, and implementation plans, and code is superficially plausible. It's hard to find any particular thing that is wrong with all of it - just a general vibe of verbosity. I am observing entire engineering departments drowning in AI generated RFCs and TDDs and thousand plus word Jira tickets and PR reviews and feedback to the PRs. All just Claude talking to itself via various meat-based secretaries.
Meanwhile, as far as leadership is concerned, they don't really understand what is being delivered they just know there's a lot of it. So they're happy - for now.
I think a lot of shops are going to have to go through a couple years of Github-style "why the fuck is our service always down?" before they put 2 and 2 together.
by ryandvm