Ask HN: How to deal with shipping AI-written code you don't understand?

532 points · 649 comments on HN

Points and comments are a snapshot, not live.

Engineers grapple with shipping AI-written code they don't fully understand.

A Meta engineer posted on LinkedIn expressing discomfort that AI-generated code feels like a black box, and that thoroughly checking every line would take too long given shipping speed. They ask if other engineers feel this way and how they handle it.

What commenters are saying

Top commenter says they've accepted shipping code that works if thoroughly tested, comparing it to trusting a colleague's work. They note their compiler project uses extensive automated testing across architectures. Others point out testing alone may miss structural problems or vulnerabilities. Some suggest using multiple LLMs: one to write code, another to adversarially review it.