Ask HN: what do you do when you ship AI-written code you don't understand?

One engineer says he can no longer explain a system he built from scratch and has worked on for four to five years. His fix is not more code review.

In brief

An Ask HN thread asked how engineers cope with shipping LLM-written code they haven't fully read. A Hasura engineer says his own system became fuzzy once he moved from IDE autocomplete to Claude and Codex CLIs, and argues the answer is formally verifiable code.

The loudest counter: you already ship code you haven't read. Principal engineers always have.

The question, and one confession

The thread asks how to deal with shipping AI-written code you do not understand. The most candid answer came from an engineer at PromptQL (Hasura):

"The 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." — engineer at PromptQL (Hasura), working on data connectors

His fix is deliberately not a return to reading diffs. He says that review does not pay back economically, and wants languages and programs to become formally verifiable so code provably "does what it says on the tin."

"You were already doing this as a principal engineer"

A commenter compared the situation to being a principal engineer before AI: you oversee many engineers' systems, cannot review everything, and hold the high-level design rather than the low-level details. Human review reduces bugs without eliminating them. The same voice conceded that whether trusting "fancy calculators" over humans was right will only be known later, though "so far, it's working."

Another commenter put it as a role change to project manager, while a skeptic replied that LLM prompters ship output closer to a product manager's than a software engineer's.

Where the verification actually goes

Several people described concrete gates rather than philosophy. The builder of an autovectorising compiler wrote:

"I have it write a bazillion tests, and I have real, non-trivial programs that it compiled. I have it run a 'gate' before releases that takes literally hours on 5 different architectures." — spacedcowboy, who builds an autovectorising compiler

He still reviews code but concedes he cannot say he has reviewed everything. A veteran Apple-platform developer described the inverse effect: with an LLM doing the typing, he now tests more than he did when writing by hand and finds implementation errors rather than coding errors. And one commenter drew a boundary by layer: HTML/JS/CSS is entirely vibe-coded, the SQL schema is still by hand, because mistakes there cost far more.

The unresolved hole

A founder building an ERD tool for AI assistants named the gap the others skirt: when the AI writes both the code and the tests, they may agree with each other and miss the same thing. Nobody answered with more than "more tests."

The pattern across the thread: the people comfortable with it have an independent check (hours-long gates, formal contracts, hand-owned schemas). The uneasy ones have only the model's own tests.

Get breakdowns like this every day

The top Hacker News stories, unpacked — by email, Telegram, or RSS.

Next story · 4 of 12 Read more
🚀Tech

Wine now runs on OpenBSD, thanks to a workaround for a missing CPU register

OpenBSD can't set the gsbase register Windows programs expect, so the port fakes it by emulating the %gs prefix on commands.

★ 507 · 💬 168 · marc.info · 2 min