|
|
|
|
|
by thesuperbigfrog
1305 days ago
|
|
>> As programmers we take pride in being DRY. Copilot is helping us not reinvent the same concept 1000 times. That's what libraries are for. Copilot is just copy / paste of the code it was trained on. When the code it was trained on is later discovered to have CVEs, will it automatically patch the pasted code? With a library, you can update to the patched version. Copilot has no such feature. |
|
Every time I hear someone say this, I hear "I've never really tried Copilot, but I have an opinion because I saw something on Twitter."
Given the function name for a test and 1-2 examples of tests you've written, Copilot will write the complete test for you, including building complex data structures for the expected value. It correctly uses complex internal APIs that aren't even hosted on GitHub, much less publicly.
Given nothing but an `@Test` annotation, it will actually generate complete tests that cover cases you haven't yet covered.
There are all kinds of possible attacks on Copilot. If you had said it can copy/paste its training data I wouldn't have argued, but "it just copy/pastes the code it was trained on" is demonstrably false, and anyone who's really tried it will tell you the same thing.
EDIT: There's also this fun Copilot use I stumbled across, which I dare you to find in the training data: