Shipping AI-Written Code You Don't Understand: What Developers on Hacker News Actually Do
A Hacker News thread on shipping AI-generated code: the workflows people use, how they spend review time, and how to check small artifacts by hand.

On October 19, 2026, an Ask HN thread went up about shipping code written by AI. The prompt was a LinkedIn post from an engineer at Meta who said that writing code with an assistant feels like a black box. It drew hundreds of comments.
The thread is worth reading because it collects working practices from people shipping code every day, rather than predictions about where AI coding is heading. Here is what the top of the thread keeps coming back to, plus a checklist you can apply to your own team this week.
What the commenters actually do
Design the shape, let the model fill it in
A recurring theme was to keep the design yourself and let the model implement it. The interface is the part you have to defend later, so you own it. The body of the implementation is where speed matters most.
Sketch it first
One commenter keeps a scratch Python file, sometimes a scratch repo, that they and the model both edit, even though the project itself is in Rust. Python reads like pseudocode, so it is a quick way to pin down method signatures and data shapes before the model writes the real code.
Keep the task bite-sized, and talk before you say do it
One commenter described a workflow of bite-sized jobs, 10 to 15 minutes discussing the implementation with the model, and only then saying "do it". They were explicit about who commits: "It doesn't commit code. I do."
Use a second model to review
A couple of commenters have one model write the code and a different one review it. One suggested using Claude to write and Codex to do an adversarial review, going back and forth until the result holds up.
Spend review time where the risk is
One commenter's rule: the more dangerous a decision and the harder it is to roll back, the more time they spend reviewing it. Another tied the same risk-driven idea to George Fairbanks' book Just Enough Software Architecture.
Another concern was about whoever inherits the code. One commenter pointed out that many teams still have SREs as their first line of support, and those people need to understand how a service's hot paths work without the context the original author's AI session had.
Where they disagreed
Not everyone agreed. Some said they merge based on the description and expect a future model to clean it up. Others warned that tech debt compounds faster when nobody reads the code. Both positions come from the same thread.
A checklist you can apply this week
- Write the interface first. If you cannot describe the function signature and the error behaviour, the model is designing it for you.
- Sketch the algorithm before you ask for code. Pseudocode in a scratch file is enough.
- Split the work into pieces small enough to review in one sitting.
- Read the diff line by line, the way you would read a diff from a new hire on day one.
- Run the tests, then change the tests. A test that fails when you alter the input catches a lot of confident wrong code.
- Ask a second model to review the diff, then read its notes and decide for yourself.
- Commit the code yourself. You own whatever ships.
Writing the hand-off
The thread's advice about small tasks translates into a prompt with a few fixed parts: the shape you want, the file it belongs in, the constraints it has to respect, and the check that proves it works. A model can fill in the middle. It cannot invent the first and last parts for you.
- Name the function or type you want, with its arguments and its return value.
- Name the file and the module it belongs in, so the change lands in the right place.
- List the constraints: the language version, the libraries already in the project, the style the file uses.
- Name the check: the test that has to pass, or the command that has to succeed.
Reading a diff you did not write
Reviewing generated code looks different from reviewing a colleague's code, mostly because you have no memory of the conversation that produced it. The commenters' habits translate into a fixed order of reading.
- Read the names first. Function names, argument names, and file names tell you what the change claims to do before you look at a line of logic.
- Read the diff for what it does not mention. A deleted guard, dropped error handling, and a changed default are all easy to skim past.
- Look for the dependency you did not ask for. A new library, a new network call, or a new file outside your project structure are worth stopping on.
- Check the boundaries. Empty input, very large input, a missing key, and a failed call are where small changes tend to break.
Testing the result
- Run the existing tests before you change anything, so a later failure has an obvious cause.
- Add a test for the case you actually care about, not only for the happy path the model wrote.
- Change an input and watch the test fail. A test that still passes when the logic changes is not testing the logic.
- Try the code the way a user would, including the bad input and the empty one.
Check the small artifacts by hand
Small changes often fail on arithmetic or syntax, in places you can check by hand without running anything. A few Tolz.me tools cover exactly those cases.
Cron schedules
A wrong cron expression is a bug that runs on its own schedule, which is the worst moment to discover it. Check the expression before it lands in a deploy. The cron expression translator turns a schedule into readable next-run times so you can see when it actually fires.
File permissions in deploy scripts
A chmod line in a deploy script is easy to misread. 755 and 750 are one character apart and mean different things. The chmod calculator turns an octal mode into the owner, group, and other permissions it actually grants.
Timestamps in logs and APIs
Seconds or milliseconds, local time or UTC, a date parsed in the wrong zone. The Unix timestamp converter converts both ways, so you can compare a number in a log line against a date you can read.
What to do when the code works but you cannot follow it
Some generated code passes every check and still leaves you unable to say what it does. The practical response is to change the code rather than write documentation about it. If you cannot explain a function to a colleague, rewrite it in a shape you can explain, even if the rewrite comes out smaller than the original.
This is where the two ends of the thread separate. One group treats code that works but cannot be read as debt a later model will clear. The other treats it as debt that keeps compounding, because every later change lands on code nobody can reason about.
What the thread does not settle
Nobody in the thread offered a rule that fits every team. The workflows described above share a shape: they keep the decisions, delegate the typing, and review in proportion to the risk. The engineer who called it a black box was describing the part that is not yours to delegate, and the practices in the thread keep coming back to that same point.
Nothing in the thread settles how much code should be written this way. What it does make clear is that the risk sits in a specific place: not that the model writes code, but that code arrives without a person who can explain it. Every practice in the discussion is a way of keeping that person in the loop at the point where it matters.
Sources
- Ask HN: shipping AI-written code you do not understand, October 19, 2026