logoalt Hacker News

svachalek • today at 5:56 PM • 6 replies • view on HN

I agree. The latest models are getting quite good at validation, as long as they are clear on what the requirements are. Recently I got frustrated that while we have a huge test suite I noticed the LLM was hardly ever breaking a test with its changes (PRs only added tests, never changed old ones) which seemed suspicious.

I had it do a full audit. There were about 100k lines of tests, of which it determined about 60k were near useless. Many were overly mocked, some mocked to the point that they really weren't testing anything at all. It deleted those and wrote more expansive scenario tests to replace them, caught a lot of bugs on the way and fixed those too. Total time was about 2 hours.

I think humans need to review requirements, specifications, and test scenarios. And for some industries and uses they're still going to have to review every detail. But for a typical CRUD app, I think we're at a point where we can already set the process and quality bar higher than ever, in addition to moving faster.


Replies

devin • today at 6:36 PM

I chuckle a little bit at this specification thing. We used to do this. We used to write big binders of specifications, and then we'd set about implementing them. We stopped doing it because it didn't really work. We'd learn things in the process of building which negated the value of the big specs we wrote. That's why we stopped doing it. This is where continuous improvement, CI/CD, tighter release cycles, etc. were all born.

➕ show 2 replies
KylerAce • today at 6:19 PM

Glad to see someone else notice this. I dread looking at or dealing with AI written unit tests because of the incredible amount of whiteboxing that goes on, though usually for the opposite reason because AI testing is almost entirely whitebox testing which fails if some internal details change

➕ show 1 reply
tored • today at 6:49 PM

Yes, unfortunately a lot of requirements and specifications are now AI slop, thus developers stop reading them, and agent produce even more slop.

We need to take back writing requirements and specifications to humans.

Adopting high level BDD style testing of human written user stories (cucumber) is probably a good idea.

➕ show 1 reply
jopsen • today at 10:00 PM

If before AI you couldn't deploy to production without a code review, what makes you think you will be able to with AI?

To be fair, when I was a kid we'd connect the editor to the server using an unencrypted ftp connection and modify php files in production.

This worked perfectly fine, and phpmyadmin made schema changes super easy.

These days we do tests, schema migrations, terraform, staging sites, traffic migration, monitoring, logging, revision control, etc.

... it's a lot of boring work, and for most CRUD apps, its entirely unnecessary :)

That said: I doubt we'll abandon these practices for things that matter.

Because while modifying php files in production can increase velocity, it can also get very "exciting" if you have a few co-workers on the same project :)

gf000 • today at 8:09 PM

FWIW, it's a great little "trick" to always ask for red-green tests. In my experience it's enough to ask for that and LLMs know what to do.

➕ show 1 reply
ToucanLoucan • today at 8:39 PM

I just don't understand the hype for this. "AI can do $x" quickly needs softening to "AI can try to do $x" which then becomes "humans need to verify $x has been done." If humans still have to oversee every part of the processes then what exactly is being automated!?

This would be like if we had our first factory producing cars but each car was like a die roll in terms of getting a car, a washing machine, a pile of scrap metal, or a baby. And people just asserting over and over that this was the future of making cars, no matter how much scrap metal keeps coming out.