1 Week Using Github Copilot: First Impressions

About a month ago GitHub released their AI pair programmer “Copilot” in private beta. It stirred up lots of hype, some controversy, and a few worries.

Octocat, Github’s mascott
This is Octocat. Github’s mascot.

A quick introduction to Copilot for those who haven’t heard much about it. Github Copilot is an artificial intelligence pair programmer. Think of it like a code completer but instead of just completing your code, it will write entire blocks of code for you. At the time of writing this article, it’s only available as a Visual Studio Code extension.

First Impression
My first impression right after trying Copilot was WHAT THE #$%@. I’ve seen it in action on YouTube. Although, seeing it write my code for me was quite shocking.

Is All the Hype Justified?
Yes. Copilot’s purpose is to speed up your coding and make you more efficient. Instead of having to write out repetitive code, copilot will predict what you’re trying to write and suggest it for you.

Code block.

In this example, Copilot was able to write lines 12, 13, 14, and 15 for me. It saw that I had some variables defined on line 7. Then it saw that I was setting up a hook on line 11. Then it was able to provide suggestions for the next 4 lines.

Another thing that Copilot can do very well is writing out logic or entire functions for you simply by telling it what to do in a comment.

Code block.

This entire code snippet was written out my copilot based on the comment on line 7.

Code block.

This function here was written almost entirely by Copilot. The only lines I had to make changes on were 55 and 60 where I declared serverip.

Another thing that I absolutely loved about Copilot is when using new libraries. Instead of having to Google questions or read through docs, I can tell Copilot to do what I need. Most of the time it just does it.

Where Copilot Struggled
I found that Copilot cannot write CSS whatsoever. This could slightly have been impacted by the fact that my CSS is very messy and doesn’t really have much of a pattern.

However, the bigger reason I believe this is the case is that AI is not creative. Writing CSS is like drawing but in a computer-readable format. AI is quite far from being creative. If you look at artwork or listen to music generated by AI, you’ll understand what I mean.

Final Thoughts
Copilot is a big deal. It will significantly increase developer productivity by getting rid of many tedious tasks. It’s not perfect but that’s a given. I’m sure it will improve drastically over the next few years.

If you haven’t already, signup for the beta at https://copilot.github.com/

I’m a full stack software engineer and computer science student.