4 ms·
If the programmer dosent have the requisite knowledge to verify the code it's hard to know if the generated results are correct. Compare this to copy pasting so
by rdedev 5y ago
If the programmer dosent have the requisite knowledge to verify the code it's hard to know if the generated results are correct. Compare this to copy pasting solutions from stackoverflow. Atleast there you get a pretty good idea of the pros and cons of a solution. With copilot it's all upto the programmers understanding of the generated code. Of that programmer propmts copilot on a domain they don't know much about it could lead to a lot of subtle bugs being introduced
- emodendroket 5y ago> Compare this to copy pasting solutions from stackoverflow. Atleast there you get a pretty good idea of the pros and cons of a solution. I don't think I understand why this should be true.
- nemetroid 5y agoStack Overflow answers only containing a code block are voted down.
- emodendroket 5y agoIn theory, I guess, but the type of person who just blindly commits code they didn't understand isn't going to read the explanation and isn't going to catch security issues with SO answers either.
- MauranKilom 5y agoThe fact that some (bad) programmers already blindly copy SO code does not detract from the original argument that Copilot is dangerous because it effectively copy-pastes SO code blindly.
- emodendroket 5y agoIt presents a suggestion, which you are free to reject. What's "blind" about it?
- nemetroid 5y agoThe fact that it doesn't come with context. I just fail to see the usefulness of the suggestion, if the quality can't be trusted. Either: a) I'm familiar enough with the code/topic that I'm able to judge whether the suggestion is good, or b) I'm not able to judge, and need to consult other sources. In case a, I could have just written the code myself. In case b, I still need to read up, so the potential gain is that Copilot gave me a hint as to what I should search for. But even that hint can't be trusted - there was another comment where Copilot suggested to use MySQLi in PHP, which has been the wrong choice for a long time. So if the suggestions need scrutinization, the target group I see is people who need to write a lot of code in a familiar area, and are limited by the speed at which they type. This is arguably a very small set of people, and is unlikely to be the main user group of this tool.
- emodendroket 5y agoWhen I visit SO, I generally read all the answers and can pretty immediately judge "I think this approach is good" or "I don't think this approach is good" just by reading the code. I can't see why these suggestions would be any different. And in the perhaps more common case where I already know exactly what I want to do it can still save time to have the plug-in autocomplete it (I make heavy use of tab completion today after all).
- Master_Odin 5y agoThe mysqli extension in PHP is fine to use and has advantages over PDO if you only ever plan to interface with MySQL. Now, if it was recommending the mysql extension, that would be bad as that's been deprecated and replaced by mysqli for a very long time.
- dathinab 5y agoBecause on SO you: - get multiple answers - comments on the answers - up/down votes - explanations along side of the answer and I still would argue you should never copy from stack overflow!! Instead understand why the answer is correct and then write your code based on that understanding, even if it produces the exact same code in the end.
- pyrale 5y agoAlso, to get answers on SO you have taken the time to elaborate a question. Building up the right question is a significant part in the process of understanding.
- emodendroket 5y agoThe vast majority of visits to SO are by people who don't even have an account. They're not asking questions themselves.
- pyrale 5y agoThey may not be authors of the question on SO, but to find that question you need to search for it, and it is not uncommon that doing so takes more than one research/thread parsing. In the end, finding the relevant SO answer is not unlike asking a good question in the first place.
- emodendroket 5y agoIf the question is more complex than "how do you do a parameterized query with ActiveRecord?" it's unlikely autocomplete is doing it for you either.