4 ms·
You are doing it wrong. Have Claude generate the test code and log test data that it can feed back into itself. Claude can generate tests and verify the code be
by waynecochran 3mo ago
You are doing it wrong. Have Claude generate the test code and log test data that it can feed back into itself. Claude can generate tests and verify the code better than humans now. I don't trust humans to get things right anymore -- I have a PhD and Claude knows all the math and libraries better than me.
- TimorousBestie 3mo ago> You are doing it wrong. I didn’t write any of it. I occasionally get assigned PRs written (or not, in this case) by other devs. > Claude can generate tests and verify the code better than humans now. It certainly didn’t do that in this case. > I don't trust humans to get things right anymore -- I have a PhD and Claude knows all the math and libraries better than me. If it knows all the libraries so well, why did it add a bespoke implementation?
- jmalicki 3mo agoIf you're getting code without tests to review in a PR, that should be an instant reject without even looking at the code.
- waynecochran 3mo agoGo ahead and have claude add and run units tests for you as part of the PR review process.
- jmalicki 3mo agoThat's on the submitter of the PR to do. Don't put that burden on the reviewer.
- waynecochran 3mo agoNo problem for claude. In fact I would have claude do the PR and go have lunch.
- danhorner 3mo agoClaude can’t have lunch yet.
- TimorousBestie 3mo agoI don’t get paid to do my job and then also the submitter’s job.
- shusaku 3mo agoClaude is absolutely terrible at writing unit tests, this advice continues to perplex me. Coding agents usually slam you with hundreds of lines that do little more than “test” what is obvious. Maybe it’s good for an API revision or such. But for linear algebra where errors might not manifest unless suitably chosen inputs are generated based on expert knowledge, that’ll be useless.
- waynecochran 3mo agoHave you used Claude lately? It definitely will outperform a human at this task now.
- shusaku 3mo agoI use it literally every day. But please do not use it to generate tests on its own, it’s all sleight of hand. It does not (without substantial guidance and tweaking from an expert) have the capability to generate meaningful tests.
- TimorousBestie 3mo ago> If you're getting code without tests to review in a PR, that should be an instant reject without even looking at the code. Management didn’t like that the last time I was assigned a AI-gen PR and I like my job otherwise.