Fun trick you can do with Copilot: If you add add a comment `# The above function has a bug:` The completion will give you suggestions for potential bugs in your code

Sep 8, 2022 · 7:21 PM UTC

Of course, this won't catch all (or most) bugs, but it's fun thought exercise and I imagine this capability will improve in the future. Here are a few other examples (cherry picked):
It's also important to consider how better code models might lead to worse bugs, e.g. through automation bias (people's tendency to trust automated systems more than they should) en.wikipedia.org/wiki/Automa…
Replying to @AlexTamkin
Any examples of what is outputted when the code actually doesn’t have a bug?
Yup, it outputs various wrong / unhelpful things (Even the completions when there is a bug are sometimes unhelpful / nonsensical, so at the moment it's mostly useful for idea generation for possible bugs—you still have to think through things yourself)
Replying to @AlexTamkin
Ran on a complex project. Wow, calm down copilot! Amazing, it was actually a bug stemming from a hacky patch
nice! did copilot actually identify a correct bug, or was the actual bug different?
Replying to @AlexTamkin
That's not a function.
Replying to @AlexTamkin
The first step in debugging any function is to see for yourself what it’s actually doing. How would you know it had a “bug” if you didn’t already know the output? And it’s not an execution error, it’s just an error in what you expect vs what it does. Unimpressive.
Replying to @AlexTamkin
awesome tips