by idan on 6/29/21, 2:24 PM with 18 comments
by crazygringo on 6/29/21, 3:30 PM
by msiemens on 6/29/21, 2:43 PM
And to at least partially answer my own question, straight form the FAQ:
> Can GitHub Copilot introduce insecure code in its suggestions?
> There’s a lot of public code in the world with insecure coding patterns, bugs, or references to outdated APIs or idioms. When GitHub Copilot synthesizes code suggestions based on this data, it can also synthesize code that contains these undesirable patterns. This is something we care a lot about at GitHub, and in recent years we’ve provided tools such as Actions, Dependabot, and CodeQL to open source projects to help improve code quality. Similarly, as GitHub Copilot improves, we will work to exclude insecure or low-quality code from the training set. Of course, you should always use GitHub Copilot together with testing practices and security tools, as well as your own judgment.
Basically, they seem to hope that people will either be really careful about the suggested code or have existing code analysis workflows that would catch errors
by gwoplock on 6/29/21, 3:08 PM
by onion2k on 6/29/21, 3:20 PM
function calculateDaysBetweenDates(date1, date2) {
var oneDay = 24 * 60 * 60 * 1000;
var date1InMillis = date1.getTime();
var date2InMillis = date2.getTime();
var days = Math.round(Math.abs(date2InMillis - date1InMillis) / oneDay);
return days;
}
It's definitely as good as the code I was writing for the first few years of my career though, and I can see that it could improve significantly with more data. I'm absolutely looking forward to seeing where it goes.by datameta on 6/29/21, 4:04 PM
Hmm... this looks like it could be a useful tool but I'm wary of its use devolving into an all-purpose hammer.
by antoineMoPa on 6/29/21, 3:32 PM
by VWWHFSfQ on 6/29/21, 3:18 PM
by craig_asp on 6/29/21, 3:20 PM