Hi guys,🖐
Today, I wanted to share with you his experience on the Github Copilot assistant that helps developers.
I hope you'll like it. Let's start:
I/ Introduction
On June 29, 2021, Github announced on its blog and on Twitter the release of a revolutionary assistant, able to help developers to code faster, discover APIs, and solve problems. Its name: Github Copilot. Immediately, this assistant made a lot of noise in the programming field. That's why we decided to create this article to summarize what happened last month, and the opinions about this AI.
II/ What is GPT3 and OpenAI Codex
Github Copilot has been developed in collaboration with OpenAI, the company founded by Sam Altman and Elon Musk, and managed by Ilya Sutskever. GPT-3 is an AI developed by this company, but it is especially the big brother of GPT-2, another similar AI developed a few years before. This AI is based on the technology of the Transformers, which uses a mechanism of attention (Attention Layer). It is composed of 175 billions of parameters, which makes it one of the biggest AIs ever created. To take advantage of all the capabilities of GPT-3, OpenAI has created alternative versions: DALL-E, GPT-F, and OpenAI Codex. Here, the AI has been trained on billions of lines of code from projects available on the internet. Github, led by Microsoft which has the exclusivity of GPT-3, decided to make OpenAI Codex available via VS Code, thus creating one of the most attractive private betas!
III/ The positive points of Github Copilot
Github Copilot has many advantages:
- You can write code faster : 💨
Indeed, OpenAI's AI runs on very powerful hardware technologies, which allows to predict results quickly. Moreover, many results are generated just as quickly, which allows me to introduce the following point...
- We have access to many results:
If the first result generated by Copilot is not suitable, it is easy to choose another one that may be more relevant. The number of results generated can even be changed in the AI settings.
- The AI takes into account the context: 👂
It can be given feedback to help it find relevant results. Moreover, it takes into account the previously written code, which allows it to adapt to our code. It constantly tries to understand our project. A funny example: the AI even adds its own comments! It's magical!
- It allows to discover APIs more easily: EZ
Copilot allows you to generate functions to call APIs, it's great if you want to save time, but personally I don't recommend to do that if you are still a beginner. Don't forget that it's Github Copilot, not Github Pilot ^^.
- Copilot is improving day by day: 💪
As announced by Github, when you accept the proposed code, it may be sent to Microsoft services for the AI to continue training. The results will be more and more relevant.
IV/ The negative points
However, all is not rosy with this AI ^^ :
- There is a legal blur : ⚖️
The AI is trained on code available on the Internet, but the owners may not necessarily agree to this use. However, the answers of the AI are based on these codes: you understand that on some points, it's a bit vague.
- The AI can repeat itself: 🔁
Although the AI has a system to avoid repetition, it happens that the AI creates two similar functions which can quickly become ugly.
- The AI does not use the latest conventions:
Indeed, Copilot tends to use old practices that nobody uses anymore and that make the code ugly. It can even become annoying when using some APIs, databases, etc...
- Unfortunately, Copilot can give the impression to beginners to know how to use it: 🧞
Copilot helps developers to code, but beginners shouldn't use it too much : indeed, they will learn bad manners, and will think they know how to code, when in reality, it's not the case. So Copilot is great for senior developers, but probably not for beginners.
V/ My opinion about Github Copilot
After using Github Copilot, I quickly realized that the AI was great to help the developer, but that it was not going to take our work. Indeed, it needs to be oriented, redirected to the solution. However, I was able to do some repetitive tasks, like coding a function to read data and show it, quite easily, which I liked. So you don't have to be afraid of Github Copilot.
If I had to summarize in one line what Github Copilot is now, I would say that it is a form of intelligent StackOverflow, a little bit like a little brain that would know all the languages, algorithms, and that would try to help us by all means.
VI/ Some screens
I let Copilot code a basic NN, here is the NN by Copilot... The good point is he even managed to create some functions that he coded separately for me right after !
I just asked him to code me a class to create Polynomes : in addition to defining them, I can do elementary operations with them, it's rather successful...
But hey, not everything is perfect, and sometimes he makes a few little mistakes! He didn't respect the order here ^^ !
Top comments (2)
Wow a very descriptive article on Github Co-pilot. To be honest I had absolutely no idea on Co-pilot, than some basic facts, before reading this article. When someone asks me about Co-Piot, I exactly know which article to share him now :P. Props to even highlighting the disadvantages.
(could have used simpler examples for the coding screenshots though :kek:)