Using GitHub's Copilot to automatically generate descriptions of code in English!
Some of the examples are really impressive, others less so. The regex example is particularly compelling.
miniblog.
Related Posts
Copilot doesn't offer a way of disabling completion inside comments. People have discovered a comical workaround: swearing in the comment!
I'm still figuring out where Copilot fits in my workflow, and I find it works really well *when I know exactly what code I want*.
When I have e.g. two lines in mind, I can see if it will write them (saving me the typing), and it's trivial to validate correctness.
Copilot was super helpful for changing some locals to lazy_static!:
let integer_re = Regex::new(...) // old
static ref INTEGER_RE = Regex::new(...) // new
Unfortunately, it added a $ to the end of my first regex! It saved me a ton of keystrokes, but needed careful checking.