News for hackers. Stuff that matters.
Re:Agentic Engineering Patterns by malexw on Wednesday March 04, 2026 @10:43AM (#47249154)
I think Martin Fowler's "Refactoring" might give a bit of insight here. One of my take-aways after reading that book is that the specific implementation of a function is not very important if you have tests. He argues that it can sometimes be easier to completely re-write a function than to take the time to understand it - as long as you can validate that your re-write performs the same way. This mindset lines up pretty closely with how I've been using LLMs.

If that's true, then I would think the emphasis in code review should be more on test quality and verifying that the spec is captured accurately, and as you suggest, the actual implementation is less important.

Re:Agentic Engineering Patterns by ep103 on Wednesday March 04, 2026 @11:04AM (#47249491)
Counter-point, developers that get used to not caring about function implementation, are going to culturally also not care as much about test implementation, making this proposed ideal impossible.
Re:Agentic Engineering Patterns by lmf4lol on Wednesday March 04, 2026 @01:04PM (#47251363)
with LLMs, tests cost nearly nothing of effort but provide tremendous value.
Re:Agentic Engineering Patterns by contagiousflow on Wednesday March 04, 2026 @01:32PM (#47251759)
And you know those tests are correct how?
Re:Agentic Engineering Patterns by simonw on Wednesday March 04, 2026 @02:41PM (#47252742)
Look at what they are testing.
Re:Agentic Engineering Patterns by camgunz on Wednesday March 04, 2026 @09:44PM (#47256856)
> wow that's a lot of code, how will we ever review it?

>> have a model generate a bunch of tests instead

> wow that's a lot of test code, how will we know it's working correctly?

>> review it

> :face-with-rolling-eyes:

Re:Agentic Engineering Patterns by DanHulton on Wednesday March 04, 2026 @01:02PM (#47251339)
This is why I've been pushing back on the "just have the AI generate the tests!" mentality. Sure, let it help you, but those tests are the guarantee of quality and fit for purpose. If you vibe code them, how the hell do you know if it even does what you think it does?

You should be planning out the tests to properly exercise the spec, and ensuring those tests actually do what the spec requires. AI can suggest more tests (but be careful here, too, because a ballooned test suite slows down CICD), but it should never be in charge of them completely.

Re:Agentic Engineering Patterns by theshrike79 on Thursday March 05, 2026 @08:00AM (#47261099)
AI generated tests can "lock down" features pretty well, do the basic bounds checking etc. and make sure no unrelated change breaks the feature.

But the more complex bits require human instruction and/or intervention.

Re:Agentic Engineering Patterns by fhd2 on Wednesday March 04, 2026 @02:20PM (#47252468)
That's my experience with agentic development so far, a lot of extra time goes into testing.

Problem is, the way I've been trained to test isn't exactly antagonistic. QA does that kind of thing. Programmers writing tests are generally rather doing spot checks that only make sense if the code is generally understood and trustworthy. Code LLMs produce is usually broken in subtle, hard to spot ways.

Re:Agentic Engineering Patterns by MattGrommes on Wednesday March 04, 2026 @05:15PM (#47254715)
A related book I've been thinking about in terms of LLMs is "Working Effectively With Legacy Code". I'd love to be able to work a lot of that advice into some kind of Skill or customized agent to help with big refactors.
Re:Agentic Engineering Patterns by malexw on Wednesday March 04, 2026 @05:21PM (#47254798)
Oh gosh - now that you mention it, it was "Working Effectively with Legacy Code" that I was thinking of, not "Refactoring".
Re:Agentic Engineering Patterns by theshrike79 on Thursday March 05, 2026 @08:01AM (#47261114)
IIRC that was the book that coined the term "Refactoring" though =)