Back
Jul 25, 2022

I Used GitHub Copilot for a Month

I've been using GitHub Copilot since it launched a month ago. As you probably already know, Copilot is an AI pair programmer. It is powered by Open AI and is typically installed as an extension to your code editor or IDE (I use it with WebStorm).

At first, using Copilot was a bit of a culture shock. In many cases, it overrides my default autocomplete, which was annoying. The other thing I observed was the noticeable delay between my input and the suggestions by Copilot. After a while, I got used to it and now I think what Copilot does is pretty magical.

After a month of use, I can now say that: Copilot writes most of my utility functions, generates a ton of my frontend code (along with tailwind classes), helps with writing types, API routes, etc. Sometimes what it generates is gloriously wrong and I have to scrap that whole block. Sometimes it's only partially wrong which I'm okay with. I usually let it autofill and edit the code where I see fit.

But most times, Copilot is spot on for what I want it to do. For example, here's a utility function that Copilot wrote:

const formatTimeAMPM = (date: Date) => {
	const hours = date.getHours()
	const minutes = date.getMinutes()
	const ampm = hours >= 12 ? 'PM' : 'AM'
	const hours12 = hours % 12
	return `${hours12}:${minutes} ${ampm}`
}

I only wrote the function name and Copilot filled in the rest. This is a basic function but it has written more complicated code too.

When you think about it, this is quite powerful. Developers write a ton of these utility functions and having an AI assistant fill in the code while you do the thinking and problem solving is quite powerful.

Copilot takes care of a lot of things that are part of development but is not involved with solving business problems. Utility functions, boilerplate code, frontend code, and more. These are the things that you would normally write yourself, and if you're unsure, consult StackOverflow. Copilot does that automatically.

So in conclusion, I'm so far happy with what I've seen in Copilot and its abilities. It's a good wingman, that does some heavy lifting and lets me solve problems. It's not all bells and whistles though.

Copilot, sometimes, isn't aware of the context of what I want to do. For example, it is not aware of the code that I (and even Copilot itself) already wrote and makes entirely new suggestions that are not relevant. But in cases like these, it learns quickly. I just have to start typing the correct code and it adjusts its suggestion accordingly, which is damn impressive.

I'm going to keep using Copilot. It's free till August 24, after which it costs $10 / month or $100 / year. It's available for the most popular code editors and IDEs like VS Code, Jetbrains IDEs, Neovim, and more. It also supports popular languages like Python, JavaScript, TypeScript, Ruby, Go, C#, and C++.

Share this on:Twitter