Ask HN: How to deal with shipping AI-written code you don't understand?
630 pointshttps://www.linkedin.com/posts/ali-hamie_im-an-engineer-at-m...
> I'm an engineer at Meta and I never felt this uncomfortable doing my job. I'm writing code these days and it all feels like a black box. This new standard of shipping with AI is moving so fast that if we're going to spend our time checking each line of code, it's going to take forever. That means you can end up with systems you've built where you don't truly understand how all the code works. You understand the high level, but not every detail. And maybe this is becoming the new standard. It goes against every instinct of being a software engineer. I'm used to understanding what I'm building. Now I'm trying to figure out how much I need to understand before I'm comfortable moving forward. Are other engineers feeling this too?
How are you handling this?
Comments (767) 238 threads
Earlier commentsThe further away I got from the implementation details, the fuzzier the semantics became. To the point that now I could not in good faith say I understand the system I have built from the ground-up and worked on the last ~4-5 years.
The solution to this, in my mind, is not to revert back to reviewing implementation details. The economics of that from a business/productivity perspective don't play out well.
The only viable solution in my mind is adapting code/languages themselves to the shift by making programs formally verifiable. That way you can be sure that the code "does what it says on the tin", and provably so.
I feel so strongly about this I've written on it:
https://gavinray97.github.io/blog/design-by-contract-and-eff...
You weren't programming with LLMs in 2021 or 2022, be real. More like 2024 (that's already pushing it) or 2025.
https://i.imgur.com/CNAUczi.png
The point is that it's easy to lose understanding of the finer details, even of a codebase you lovingly created, once this switch occurs and an LLM gets its hands on it.
The bridge is built. How do we test the load? Drive bigger and bigger trucks until it fails, note the weight, print the sign and rebuild the bridge the same way.
Right now I have 8 agents open in my terminal and I know I'm on the more-sceptic end of AI users. Some folks here pull thousands of lines of changes, day after day.
With this many agents I don't even have time to read what they output, not talking about the code - just their output. My work today has been (sadly) degraded to: 1. Ask AI to explore the repo. 2. Pick a solution that works for the 3 solutions that AI proposed. 3. Maybe do few rounds of follow ups. 4. Create PRs. 5. Ask agent to verify if everything works post merge.
Some of my colleagues apparently skim through the code. I pretty much don't look at the code anymore.
It's just sad. I'm self taught programmer, hobbyist. I always liked working on my stuff and always were trying to deliver high quality. I no longer can't say that, despite my best efforts.
I literally have tasks right now where not only I don't understand what the agent is doing, I don't fully understand the problem either. I could invest time to understand it and agents do a pretty good job themselves, but remember, I don't read the damn output.
That said, I work in the infra team, not in the product team, so there's that.
Try it, you might like it. First month's free and you can still quit if it's not for you.
You trust the label. The person. The company. You hope someone did their due diligence.
Sometimes taste the shell. That is an acceptable risk.
(made a small edit)
The latter look very promising for agentic coding. The former isn't quite there yet. We'll see, but I'd suggest the prior is moderately to strongly predicting that agentic coding is not a mania, but is very much here to stay.
(Obviously still the unpopular opinion here, mind you, and I may be wrong.)
Continue this thread — 1 reply
To me it's the memetic dynamic. There's "Old Wisdom". It's entrenched over a few generations now (and maybe some of it comes from before computers). "Old Wisdom" would have never allowed people to seriously start shipping code that they don't even understand. "Old Wisdom" has in fact prepared us for every possible "shiny new thing". That stubbornness was actually a good thing and held things together.
But now "shiny new thing" is so shiny that people convince themselves that it's actually okay. But they have to break the "Old Wisdom" in others. And this stubbornness (again, a good thing) is now rebranded as "being stuck in the old ways". You don't want to be stuck in the old ways, do you? So rather than coming up with real arguments, they're gaslighting people out of their defensive "be prepared for the shiny new thing" posture.
Once a person has been gaslit out of it, it's their turn to gaslight the next people. Pretty soon anyone who is holding back is the weird one. "I guess this is the new thing now?". This rolling effect is what I describe as a mania.
On the flip side, maybe it really is okay and it'll become the "New Wisdom" soon. This is probably also how things change. I still don't care for it because it's very disrespectful to people who have held their ground for good until the point where it's no longer useful. They've believed in something that wasn't actually true, it just temporarily served some greater purpose.
I picked up on a similar dynamic in radical politics when principled adherents are suddenly gaslit as "idealistic" by "practical" people, after they're no longer useful to them (they already won the election, etc).
Continue this thread — 1 reply
Continue this thread — 3 replies
Can you break down for me exactly how the unit and integration tests are made? Do you ask the AI what to assert?
Continue this thread — 3 replies
I have never in my career been afforded the time to make a complete spec.
Continue this thread — 1 reply
Continue this thread — 4 replies
Continue this thread — 2 more replies
Continue this thread — 3 more replies
Continue this thread — 3 more replies
All comments shown.
Couldn't load more comments. Check your connection and try again.