Live data from Hacker News

Toward automated verification of unreviewed AI-generated code

peterlavigne.com

51–60 of 100 posts

Re: Toward automated verification of unreviewed AI-generated code

#51
post #26

Earlier quoted context omitted.

I work on a product that meets your criteria. We can't fix a class of defects because once we ship, customers will depend upon that behavior and changing is very expensive and takes years to deprecate and age out. So we are stuck with what we ship and need to be very careful about what we release.

That's why I find any effort to create specifications... cute. In brownfield software, more often than not, the code _is_ the specification.

But if you start from the beginning with a code base that is always only generated from a spec, presumably as the tools improve you'd be able to grow to a big industrial-grade app that is 100% based on a spec.

The question is how many giant apps out there have yet to be even started vs. how many brownfield apps out there that will outlive all of us.

Re: Toward automated verification of unreviewed AI-generated code

#52
post #45
post #39

Earlier quoted context omitted.

> Let me guess, you've never worked in a real production environment? The comment to which you're responding includes a note at the end that the commenter is being sarcastic. Perhaps that wasn't in the comment when you responded to it.

It wasn’t thanks for highlighting. Can be hard to tell online because there’s a lot of people genuinely suggesting everyone should build their own software on the fly

If the amount of code corporations produce goes even 2x there's gonna be a lot of jobs for us to fix every company's JIRA implementation because the c-suite is full of morons.

Re: Toward automated verification of unreviewed AI-generated code

#54
post #49
post #17

Earlier quoted context omitted.

it isn't gospel, it's perspective. if you care about the code, it's obviously bonkers. if you care about the product... code doesn't matter - it's just a means to an end. there's an intersection of both views in places where code actually is the product - the foundational building blocks of today's computing software infrastructure like kernels, low level libraries, cryptography, etc. - but your typical 'uber for cat…

So you're an auto maker, you say you can care about your product but not care how is built? If you're building for the cheapest segment of the market, just maybe. Anything else is a hard no imho

Yes? If you’re an auto factory, you might care, but an auto maker cares about minimizing cost and maximizing revenue within the regulatory constraints. Nowhere is there a requirement to care about how the car is built, there are requirements on what the car can and cannot do.

Re: Toward automated verification of unreviewed AI-generated code

#55

This one is pretty easy! Just write your business requirements in a clear, unambiguous and exhaustive manner using a formal specification language. Bam, no coding required.

damn if only this language could be made to work with numbers we would really have something. Let's ask an LLM about it

Re: Toward automated verification of unreviewed AI-generated code

#57
post #32

Earlier quoted context omitted.

> When your software supports 8, 9, 10 or more zeroes of revenue, "trash the old and create new" are just about the scariest words you can say. There's people relying on this code that you've never even heard of. Well, now it'll take them 5 minutes to rewrite their code to work around your change.

> Well, now it'll take them 5 minutes to rewrite their code to work around your change You misunderstand. It will take them 2 years to retrain 5000 people on the new process across hundreds of locations. In some fields, whole new college-level certifications courses will have to be created. In my specific experience it’s just a few dozen (maybe 100) people doing the manual process on top of our software and it takes…

Ask AI about a strategy and tools to build to figure out.

Re: Toward automated verification of unreviewed AI-generated code

#59
post #57
post #32

Earlier quoted context omitted.

> Well, now it'll take them 5 minutes to rewrite their code to work around your change You misunderstand. It will take them 2 years to retrain 5000 people on the new process across hundreds of locations. In some fields, whole new college-level certifications courses will have to be created. In my specific experience it’s just a few dozen (maybe 100) people doing the manual process on top of our software and it takes…

Ask AI about a strategy and tools to build to figure out.

Great now you have a strategy (one less MBA to hire). You still need to do the strategy.

The doing is where most of the time goes. Strategy docs are cheap, my intern can give you 5 of those by tomorrow.

Re: Toward automated verification of unreviewed AI-generated code

#60
I find people over-rotate on whether we should be reviewing AI-produced code. "What if bad code gets into production!" some programmers gasp, as if they themselves have never pushed bad code, or had coworkers do the same.

I've worked at places where I've trusted everyone on my team to the extent that most PRs got only a quick glance before getting a "LGTM". On the flipside, I've also worked on teams where every person was a different kind of liability with the code that they pushed, and for those teams I implemented every linting / pre-commit / testing tool possible that all needed to pass inspection (including human review) before any code arrived on production.

A year ago, AI was like that latter team I mentioned -- something I had to check, double check, and correct until I was happy with what it produced. Over the past 6 months, it's gotten closer (but still fairly far away) from the former team I mentioned -- I have to correct it about 10% of the time, whereas for most things it gets it right.

The fact that AI produces a much _larger_ volume of code than the average engineer is perhaps slightly concerning, but I don't see it much differently than code at large companies. Does every Facebook engineer review every junior engineer's pull request to make sure bad code doesn't slip in?

That isn't to say I'm for letting AI go wild with code -- but I think if at worse we consider AI to be a junior engineer we need to reign in with static analysis tools / linters / testers etc, we will probably be able to mitigate a lot of the downside.

Post reply on HN