Thinking About Copilot

Created 2023-11-28 / Edited 2024-01-31

Reflections on Github Copilot and AI coding assistants.

A robot intern delivering coffee. Image by DALL·E.


I've been using Github Copilot a lot, especially since I got the vim plugin all set with autocomplete. It is fast and slick enough that it doesn't get in my way, which is a good start, and it often suggests good and correct chunks of code. I find that I like it best when I know exactly what I want already and it magically types it out for me -- even whole functions or blocks of code at a time.

I haven't been using the more full-fleshed vscode version as much, mostly because I'm addicted to my (neo) vim setup. I wouldn't mind being able to highlight code and have it apply some corrections, and I would like to be able to have it correct or suggest the whole line, not just what comes next after my cursor. Generally I think that I can create code with it faster than without it with a similar or maybe even decreased error rate.

This is great! In particular how it feels like it's reading my mind and filling in what I think I want. I've also done a bit of Rust, which I don't know very well, and that works too. I come up with the strategy and it writes out the specifics.

The Beginner Problem

I don't mind not knowing Rust in extreme detail at the moment. I'm not writing in it every day, and I understand some of the principles enough to squint and say "ok yeah, that's fine". I've been programming in Rails for years, and I still am like "wait, how does this router/controller setup go exactly?". Hasn't really slowed me down.

But when I started with both I went deep. For example, I was frustrated with RSpec's DSL until I actually read the source code for it and implemented some of the do-block tricks. After that I went with it. I also remember trying to learn a few guitar chords and being unhappy until I mapped all of the notes onto the piano to be convinced of what they actually created. This is part of my own learning process and it later helps because I generally understand the fundamental concepts even if I don't know the details offhand. Copilot is perfect for helping me with a first guess of the details.

What I'm not sure about is how it would have gone if I always had Copilot. I'm pretty sure I'd have gone deep anyway -- Even if I had a live tutor who could tell me at any time what comes next I still would have torn the thing to pieces and see how it fit together. How about other people? Do they do the same? Should they?

I've come around to the idea that self-learning is not the best way to be taught things. The best way to be taught things is having a great teacher teaching. This can cut years off of self-study. So what happens when you have this code generator helping? I'm not sure what it would be like to learn something from scratch with such a helper sitting there the whole time.