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 commentsWhat I do: I have a mental model of the system and how it works, at different levels of abstraction, in all the ways I think matter. I test that mental model against reality by making the agent proof it's real, looking at the implementation myself and seeing how it behaves in production.
Every day I'm making hundreds of mini risk assessments on what happens if I get a specific assumption wrong. If I'm not comfortable with the risk, I figure out a way to de-risk it. Maybe a slower rollout, maybe I read the code for longer, etc.
It's certainly a different job. As a startup software engineer it doesn't feel against my instincts though
How many more lines of code are Meta engineers shipping that they don't have the time to check the ones they _didn't_ write?
This makes no sense to me. So I spend vibe coding some app. I barely know code. It's 40 000 lines without comments. Say it's my job, and pays the bill at the end of the month. Say the LLM and I would have done the vibe coding within a week. I'd need one more week to check every line and understand everything. I'm a noob, this dude's a pro, so complexity is irrelevant. What the hell are they doing the rest of their time? Shipping more code?
And if that's true, and again, I'm a noob: shouldn't their "instincts" tell them to write tools to increase comprehension speed? Better interfaces? I hate everyone single one out there and designed a better one. Now I have to port to Rust/Actix/GPUI and some vibe coded redis because that thing is laggy as hell ... but I HAVE TO UNDERSTAND HOW it works because otherwise I cannot improve/customize the stuff/frameworks already out there and that people build with ...
What are they doing with their time? There are all these posts out there of programmers and systems people not doing anything 90% of their time? If it's already shipped, don't you try to understand the details afterwards?
I agree with the advice to design your system before implementing it. It is pretty easy to iterate on a design with your favorite coding assistant, and this is your chance to be ultra-picky and make sure you get exactly what you want. This was always where the "software engineering" was done, but in practice it's easy to have a vague idea and refine your (internal) list of requirements / tradeoffs as you type in the code. I find it harder to do that when the LLM is generating the code, just because one turn can change so much.
Keeping it under control requires discipline, just like before LLMs were a thing. You set a bunch of engineers loose on your codebase with no vision or supervision, you get spaghetti. You just get a little bit more control now. Agents don't feel shitty for the rest of the day when you tell them to do it some other way, so you are free to review as critically as you want without hurting anyone's feelings. I think it's a good thing.
So I suppose we just have to care less and let it get on with it. Not easy tho, for sure.
All comments shown.
Couldn't load more comments. Check your connection and try again.