You’re right, unit tests are another area where they can be helpful, as long as you’re very careful to check them over.
Comment on '3d-printing a screw' is a way to describe how AI integration is stupid most of the time
Omgpwnies@lemmy.world 4 days agoI use it to generate unit tests, it’ll get the bulk of the code writing done and does a pretty good job at coverage, usually hitting 100%. All I have to do for the most part is review the tests to make sure they’re doing the right thing, and mock out some stuff that it missed.
kescusay@lemmy.world 3 days ago
lectricleopard@lemmy.world 2 days ago
Legit. Do you need to feed it your code base at all? How does it know what needs to be tested otherwise?
Omgpwnies@lemmy.world 1 day ago
yeah, it’s the copilot plugin for intellij, basically right click and choose generate tests, it’ll read the file and … well…
Downside to that approach is that it doesn’t know what some function calls do if they’re not part of that file, so it tends to miss places that need to be mocked out.
Occasionally it writes a test that’s “wrong”, and I have to fix the test… very rarely, the “wrong” test is actually “right” based on say a method signature or decision tree, and the method itself needs changing.