29 ms·
> That's why you should just write tests, before you write the code, so that you know what you are expecting with the code that is under test is doing. i.e Test
by phillipcarter 1y ago
> That's why you should just write tests, before you write the code, so that you know what you are expecting with the code that is under test is doing. i.e Test driven development.
I've tried this too. They find ways to cheat the tests, sometimes throwing in special cases that match the specific test cases. It's easy to catch in the small scale but not when in a larger coding session.
> No. Please do not do this. These LLMs have zero understanding / reasoning about the code they are outputting.
This is incorrect. LLMs do have the ability to reason, but it's not the same reasoning that you or I do. They are actually quite good at checking for a variety of problems, like if the code you're writing is sensitive to memory pressure and you want to account for it. Asking them to examine the code with several constraints in mind often does give reasonable advice and suggestions to change. But this requires you to understand those changes to be effective.
- theshrike79 1y agoI had a case where Claude 3.7 mocked a test so far it wasn't actually testing anything but the mocks :D