Copilot for Github - My take on it

Copilot for Github - My take on it
February 21, 2024

Copilot for Github - My take on it

GitHub Copilot, the AI-powered code completion tool developed by GitHub in collaboration with OpenAI, has been out for quite some time now. A quick search indicates the official release date is October 2021 and I tried it first around August 2022. At that time, it was basically garbage.

But things have changed and I am quite impressed by all the changes, now I can’t work without the tool and I am happily paying for the monthly subscription.

What Is GitHub Copilot?

GitHub Copilot is an extension for Visual Studio Code (VS Code) that leverages language model magic to assist developers in writing code. It provides real-time suggestions, autocompletions, and even entire code snippets based on context. Whether you’re a seasoned developer or just starting out, Copilot aims to enhance your productivity and streamline your coding workflow.

The Good

1. Autocomplete on Steroid

Copilot’s code completions are impressive. It understands the context of your code and suggests relevant functions, variables, and even entire classes. Whether you’re working in Python, JavaScript, or any other language, Copilot’s suggestions are often spot-on.

2. Great for new projects

Gone are the days of manually typing boilerplate code. Copilot generates repetitive code segments, allowing you to focus on solving the unique challenges of your project. And with the new Chat feature, It’s like having an experienced pair programmer by your side.

3. Documentation, Comments, and much more

Copilot doesn’t stop at code snippets. It also provides inline documentation and comments. Need to understand a function? Copilot explains it right there. This feature is a game-changer for learning new libraries and APIs. It was very useful for me since I always forget Tailwind syntax.

I also had a great time using Copilot to convert entire file from Python to Javascript and generate unit testing cases.

The Not-So-Good

1. Occasional Quirks

While Copilot is impressive, it’s not flawless. Sometimes it generates code that doesn’t quite fit the context or introduces subtle bugs. As with any AI tool, it’s essential to review its suggestions critically.

2. Not great with the new technologies

To develop this blog I used NextJS 14 with mostly SSR components, and a Sanity.io integration. While Copilot did not have any issue to generate great client side components, it struggled a lot to give me accurate code for the latest NextJS improvements.

3. Dependency on VS Code

As of now, Copilot is tightly integrated with VS Code. If you prefer other editors or IDEs, you won’t benefit from its features. I quite like VS code so it’s not a big issue for me, but some people might not like the growing influence of Microsoft on the whole developer experience.

4. Too much magic

For a new developer it might be too much "magic". There is a reason calculators are banned when you are learning about maths, it's important to learn about the theory before getting too much assistance.

My Verdict

GitHub Copilot is a game-changer for developers. Its ability to generate code snippets, provide context-aware completions, and assist with documentation is remarkable, and saves a lot of brain power to focus on the really complicated topics. However, it’s essential to use it judiciously, review its suggestions, and maintain a critical eye.

Random Number: 0.9975741478016207