Hacker News new | ask | show | jobs
by prisonguard 90 days ago
You and the AI agree, but how about you and the team who will eventually read and do code review.

Cognitive burden increases marginally with AI assisted coding.

This is why we haven't seen big projects(think browsers and browser engines) spawning in the past year.

3 comments

Indeed. I'm curious what the security team has to say about that approach, for example.
If you get an AI to review the code especially for security, it does a very good job st finding issues. Better than any human reviewers I have worked with, and getting better. As someone who works in security , I feel much less worried about security bugs on code reviewed by a AI for security issues, be it written by AI or human.
extra reviews never hurt. But trusting only the AI to both code and review security-wise? not even close to usable
It's anthropic, of course the entire team is also using AI to do the code reviews.
> but how about you and the team who will eventually read and do code review.

Why are you reviewing AI code in detail? Do you also review the assembly output of GCC line by line?

Compilers like GCC are deterministic and the source code already fully defines the behavior. LLMs are non-deterministic and will accept ambiguity, filling in details where you haven’t. These sorts of comparisons aren’t really fair.

In the case of writing, it’s like hiring someone to write a book for you vs. hiring someone to translate a book you wrote into another language. In the first case, you didn’t really define the message for readers, whereas in the second case you did, and the translator is converting that same message for another audience to consume.

Sure, but I don't know what GCC's behavior is, and I don't vet behavior differences between compiler upgrades. As long as the output works, why does it matter that the black box is deterministic?
It doesn’t matter how exactly GCC works, as long as the behavior is deterministic and consistent (GCC is likely maintaining backwards compatibility between versions, so the behavior of your code likely hasn’t changed). In that case, you can reason about the behavior you need and write your code appropriately.

In the case of LLMs, the behavior is non-deterministic and inconsistent. If I don’t explain how handle an edge case or give a performance constraint, the LLM will still produce code and may do so in different ways, handling edge cases differently and with different performance characteristics. I can’t reason about how the LLM will fill in those gaps, it’s “random.”

Maybe you don’t care about how the LLM handles those edge cases or handles performance, but that’s different than a deterministic abstraction whose implementation details you don’t care about, but whose logic and performance is deterministic and consistent

Because _someone_ has vetted the output of GCC. It’s used in flight-critical stuff.

The closest thing we have to vetting LLMs is “whoa look, it escaped this sandbox, that’s prolly not great but it’s so cool!”

Sure, I manually test the output of the LLM. Manual testing is actually the main role for humans doing software engineering these days.

I wouldn't use it for flight control software yet, at least not without careful review, but most software isn't exactly critical. At the same time, I wouldn't trust flight control software that was only reviewed by humans, since AI is so much better at debugging.

We'll probably need humans in the loop for safety critical software for at least a year or two, before AI fully outpaces humans at generating correct code.

> I wouldn't trust flight control software that was only reviewed by humans

So I assume you don’t fly? Or is it only software created after 2025 which must be reviewed by the All Knowing Entity?

Can’t imagine a client allowing me to pass the buck like this.
No, because GCC doesn't randomly fuck up the assembly generation (much less on a fairly frequent basis the way LLMs do). If it did, you bet I'd be reviewing the assembly line by line, or decline to use such a poorly performing tool (as I have with LLMs).
For instructions you really care about, yes of course you review the assembly output! Usually when you're doing SIMD or want to check atomics are doing what you expect.
You can do that with LLMs for the parts you really care about too. The LLMs aren't regenerating the codebase from scratch every time, so the results stick around.
Only if it's not too byzantize to understand what part you should look at
The AI can tell you where to look. It's really good at this. It's actually a lot better at analyzing code than it is at writing it.
I can’t remember the last time GCC emitted code that just flat out called the wrong function. If it did that occasionally, I would review it.
Come on, this is a take we expect from a 1st grader!

Gcc makes maybe 1 mistake ever 2 billion emissions. LLMs make 1 mistake ever 3rd emission.