Check out the memoize example. That fails as soon as you pass anything non-primitive but there’s no one documenting that.
Check out the memoize example. That fails as soon as you pass anything non-primitive but there’s no one documenting that.
What? It's not anonymous, it's still committed by a dev. It can be non-checked and untested, that's true. But it's not any less untested than any other code. If you choose not to write tests for your code, this won't change anything.
The only issue I see with this is it being potentially unchecked. And the solution to that is reading all the code you commit, even though it's generated by AI.
Testing doesn't even enter the picture here, we're at the level of automating the stereotypical StackOverflow-driven development - except with SO, you at least get some context, there's a discussion, competing solutions, code gets some corrections. Here? You get a black-box oracle divining code snippets from function names and comments.
> the solution to that is reading all the code you commit, even though it's generated by AI
Relying on programmer discipline doesn't scale. Also, in my experience, copy-pasting a snippet and then checking it for subtle bugs is harder than just reading it, getting the gist of it, and writing it yourself.
Thank you for putting this so eloquently. This has basically been the sole tenet of my programming philosophy for several years, but I’ve never been able to put it into words before.
It synthesizes new code based on a corpus of existing code.
It looks to me like they're suggesting you use Copilot to write the tests.