ZH version is available. Content is displayed in original English for accuracy.
Advertisement
Advertisement
⚡ Community Insights
Discussion Sentiment
64% Positive
Analyzed from 4006 words in the discussion.
Trending Topics
#code#don#write#more#software#human#understand#generated#same#never

Discussion (85 Comments)Read Original on HackerNews
> 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?
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.
I think it will be like the outsourcing wave in the early 2000s. A lot of places ended up pulling development back in house when it became unsustainable.
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
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.
It's not enough. The software model that you produce ends up becoming part of the domain. You need to understand the system. You are the only one who has the potential do that if you have the ability and are willing to work at it.
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.
No, I specifically don’t. My company owns it, and that bastard will lay me off without a second thought.
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.
The vision is that AI owns the process end to end, from autonomous user interviews through spec generation all the way to implementation. We shouldn't need to tell AI what to do for a high level goal, it should figure it out on its own.
I've never been the kind of coder who could easily sit down and get their thoughts out from mind to written lines. I've seen that happen in a few gifted individuals, and AI might be frustrating them, because for them, coding was never the bottleneck, but for me, I would always get stuck in analysis paralysis, and just writing the first line of a project was a daunting prospect.
With AI I'm able to construct an entire ecosystem of programs I've always wanted.
The code isn't perfect, but I understand enough to fix architectural mistakes and to guide the AI to a good enough solution.
Looks like you were never really a coder, to be honest.
I do not understand the bitterness here at all. AI is just a tool you can use for better or worse.
I learnt basic programming at an old age of 10 and 6502 assembler 2 years later from (paper)books.
There was no Internet and I dreamed of one day owning a magical software program called Macro Assembler so I could use labels and advanced loops in assembler programs instead of tediously translating examples from the book or magazines using a pencil and paper into assembly without such features.
The AI today is like that Macro Assembler for me back then. You, a human, are simply moved one layer of abstraction higher.
Did I enjoy writing that assembler back then when the goal was to complete a calculation in the time it took the crt tube's electron gun to draw one line on the screen? Sure. Would I want to write accounting software in it? Hell no.
There have been very crappy coders and great coders before and after AI. Just like almost no one writes assembler anymore, almost no one will write normal code in the age of AI. But knowledge of it, how it should be written is still going to be important.
Your value as a human is in the architecture of the software and choices that influence it's entire functioning. In maintainability, scalability and resilience present in your design from day 1 not added a year later.
You know how much slop and crappy work I saw before AI? A lot.
I'm sure there is some that is indeed genuine. It could even be most. But I'd be surprised if it is all.
Nth iteration of pointless AI navel gazing?
And I'm saying that is true, but it's also enabling a kind of complexity and ambition in outcomes that might be a worthwhile trade-off.
In the same way we accept that cars are no longer something that a mechanic can understand and repair without a laptop, because we trade off the repairability and understanding for better mileage or safer handling.
Either I misunderstood the article, or people are misunderstanding my point, because I'm genuinely confused by being called a bot.
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.
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.)
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.
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.
I published a skill and short article on the technique I settled on: https://condour.github.io/lesson-plan-quiz/
Completely agree with it.
> 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.
It is already understandable if you are producing only required and necessary features. Understandability can be managed by scope control and not getting carried away with being able to produce more and more features.
I believe engineering teams will be working on trying to optimize for more engineering accountability in coming years, as the reality is catching up.
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'.
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...
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.
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.
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.
It's not your code if you just said "implement this" and then you shipped it. It's going to backfire - and if you still think that you own that code... well you're wrong. You're a code custodian rather than a code owner.
Why? Humans can't keep up. We can't keep up with writing the code, we can't keep up with debugging, and I think we're approaching a 'claude code' moment where we won't be able to keep up with system architecture.
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.
> keeping software understandable to humans a first-class design goal in the age of AI.
I'm not sure this is going to be a worthwhile goal for much longer. Rarely is anyone caring about the complexity and comprehensibility of the ASM that GCC or LLVM generates from higher-level C code. I think the code-generation abstraction is just moving even higher now into "prompts". The architecture and engineering process of developing software systems is the important human component. The source code itself is not super valuable. What remains valuable is the input, direction, scrutiny, and "battle testing" of the solution.
"The system should email the customer when their subscription renews."
When? Which timezone? What should we email them? Which email address (the customer changed their email 10 minutes ago, the address at time of the charge?)
I can look at a page of code and answer those questions pretty quickly.
You could write all of those in plain English, but then there are more tiny flaws in the ambiguous language. Maybe we could standardize the language in some way. To reduce ambiguity we start using keywords. When we want to refer to the same thing twice we create a variable or a type. Two things must interleave, let's create concurrency primitives. To check that the prompt is correct, we can write a test for it.
And maybe we DO end up with a different format of prompting that supplies this, but at some point we are still giving directions to computers. If those directions are lossy, the system runs differently every time (which I've noticed is bad for building good software).
Also relevant: including libraries written by others in your own software.
As always it comes down to finding a healthy balance.
That usually makes it safe to use even if you have no idea how it does things inside.
With AI code there is a very good chance you are the first person to ever use that code.
Of course you can go faster if you don’t read the code at all, that’s always been true. But it seems like the ability to emit large quantities of text is already a huge leap in productivity. I don’t think these tools are good enough yet to offload all or our thinking into them.
I’ve noticed that while my coding skills have very noticeably atrophied (to the point I am consciously scheduling time to manually code, just for practice), my ability to read and comprehend code quickly has actually improved quite dramatically.
I notice style inconsistencies and semantic errors far more quickly and consistently when reviewing both human- and LLM-generated code, as compared to a year ago. Cognitive tradeoff hypothesis and all that…
For the AI Act, it is the case for images and videos, don't know about code.
I'm getting older, I have lots of ideas, and now I have tools that can help bring them together faster instead of spending two weeks obsessing about how I want to set up Ubuntu and have nothing to show for it. Helps replace the all-nighters that I used to be able to do.
I still think having decades of experience in everything from domains, DNS, FreeBSD/Linux servers, databases, all sorts of programming languages, and full stack dev helps get more out of these tools compared to somebody that has no idea what they're doing. Especially around the deployment side right now. People keep saying that's changing though.
It’s more like a calculator that does calculations I can’t do.
Can you perform calculations involving roots and logarithms without a calculator? If not, do you claim YOU can calculate them?
So no, having access to the new fancy model does not make the average person a genius in the same way that having access to Stephen King's typewriter does not make anyone a writer of success.