What is GitHub Copilot? #
GitHub Copilot is an AI pair programmer that was released on October 2021. It has been designed to assist a developer in his daily day work. It will observe what you are typing and suggest code that can fit your needs, but you can also write a comment explaining what you want to write, generating the code for you. Imagine you want to write a function that will return which number is the biggest between two numbers; write a comment like “create a function that will return the biggest number between two numbers,” and it will generate the code for you in the language you are using.
It is powered by OpenAI Codex, the company OpenAI famous for creating ChatGPT. It has been trained on billions of lines of code, and it can produce code in any programming language, but it does not stop here; it can imitate the style of the code of your project and produce code in the same way 🤯
It is seriously mind-blowing!
How much does it cost, and how to install it? #
GitHub Copilot is not free; it is a paid service. It is available to try for free for 30 days before you decide to become a paid user. The price is 10$/month or 100$/year.
It is easy to install; it is a plugin for IDEs like VSCode or the JetBrains suite. Install the plugin, log into your GitHub account, and you are ready to go! Simple, right?
Do I need it? #
It depends on you and your needs. GitHub Copilot will help you write code faster and also help you prototype code quickly. But remember that it can make mistakes and can’t read your mind, even if sometimes it feels like it can…
My honest recommendation would be to use the free month intensively to get an idea of what it can do for you.
My thoughts about it #
I have been using it for a few months now, and I’m impressed by it. It can help me a lot in my daily work. For example, when I’m writing CSS, it will suggest you a class and some properties, and it is possible I don’t need all the properties, but I accept the suggestion and remove what I don’t need; it is still faster than writing everything from scratch. I find my way to work with it and appreciate it.
I will continue to use it because it speeds up my work and never stops amazed me.
If I may emit a warning, don’t trust everything it suggests; continue to review the code
it generates, you are a developer, and you will be responsible for the code you propose,
not GitHub Copilot.
Find a balance, and you will be fine.
Tips #
Using VSCode, you can use the shortcut ctrl|cmd + right
to accept the next
word suggested. It prevents accepting all the suggestions and then refactoring them.
Conclusion #
It’s a great tool that will help you a lot in your daily work, but you are the human; you are in charge of the code it will produce; see it as a companion that never complains 😁