The announcement of GitHub Copilot on June 29, 2021 has caused a buzz in the tech community. GitHub Copilot is being considered as a glorified IntelliSense (code-completer) by some. But under the hood it is much more powerful. Powerful enough to get us to question if Copilot will change programming.
What is GitHub Copilot?
Github Copilot is an artificial intelligence (AI) tool that will help you in writing code. It is currently being marketed as an AI pair programmer that suggests whole lines of code or complete functions based on the code you’re trying to write. It’s integrated with Visual Studio Code as an extension, making it a click away from installing and using it. Currently though, GitHub has limited its availability to a small group of testers.
Copilot is a joint effort of GitHub and OpenAI. It’s interesting to note that Microsoft acquired GitHub in 2018 for $7.5 billion dollars and has similarly invested $1 billion in OpenAI. It could be considered that Microsoft is reaping the benefits of having a stake in the two.
How GitHub Copilot Works
Copilot is based on Codex, an artificial intelligence model based on GPT-3 by OpenAI. Currently, GitHub is the largest code hosting platform for version control and collaboration. So, GitHub was in a great position to make a product like Copilot due to the availability of billions of lines of code written by actual programmers.
To be more specific, the tool was trained on 28 million public repositories hosted on GitHub. Since the repositories were public, the legality of using the intellectual property of the coders without consent is still under questioning. Also, who is to say that Microsoft hasn’t used any of the private GitHub repos. Codes from other sources such as Stack Overflow could also have been used for the purpose of training.
Training an AI model on such a huge database allows it to learn common coding patterns. That’s the reason why Copilot can seemingly suggest whole lines of code or entire functions. The lucky few who have access to the tool suggest that Copilot makes it seem like it knows what they’re trying to type next.
The Rich Features
Firstly, GitHub Copilot will be a powerful autofill tool as it can be suitable for anemic code (without domain knowledge) generation. Secondly, there will be no need to type out the boilerplate. Boilerplates are the annoying repeating parts of the code that no one actually wants to write every time they start a new project. Also, the ideas of algorithms that you’ve forgotten and need to reference using Google, Copilot will already have done through the training it has had. So, common algorithms that you need to use can be suggested automatically by GitHub Copilot where it even takes into context the parameters.
Is it a double-edged sword?
The idea of an AI system replacing a job is not a new one. At its current level it poses no threat to programmers whose job is not to just sit and code. You could even argue that a developer’s main job is to understand the requirements in the specific condition, map out a solution and then to translate to code. Yes, the idea does eventually end up as code but every problem is domain specific thus requiring solutions based on situations.
If you consider it as a productivity tool, you’d be more in line with reality. GitHub Copilot will help us improve the quality of codes we write. It can be a companion that guides us along the way. It’s by no means a total replacement. The higher skilled jobs won’t be affected as much but it might make lower skilled coders to up their game. Yes, the number of lower skilled coders might decrease but as a whole, it will help create cleaner and concise programming as it improves even more.
Featured image: Andrea De Santis