GitHub Copilot seems straight out of a science fiction movie, and why shouldn’t it? Not long ago, artificial intelligence was the main enemy of science fiction movies. And today, it’s creeping all around us.
Nearly every product from software development companies seems to contain elements of artificial intelligence. But what can AI do when coding a program or a mobile app? What does it look like when an AI learns to code itself? GitHub Copilot is an excellent example of a futuristic vision coming to life.
The following blog covers the two facets of GitHub Copilot:
- The Basics – The bare minimum you need to know about GitHub Copilot,
- Technical – Covers technical details.
Let’s find out more about GitHub Copilot.
About GitHub Copilot
GitHub Copilot is a built-in code editor tool that allows you to write your code based on the code you have already registered in your project. Enter the function name or a few comments, and Copilot will automatically fill in the implementation. This tool processes user input in the cloud and accepts rejects or returns snippets asking for different solutions. GitHub Copilot was released by GitHub (also known as Microsoft since its acquisition in 2018) on June 29, 2021. This tool is powered by OpenAIGPT-3, a language prediction that makes a model look like a human. As GPT-3 is an advanced model of AI.
The AI itself was trained using publicly available code from GitHub. There is a lot of money behind this solution. Microsoft and OpenAI, which participated in Copilot’s development, have invested $2 billion in the project. What we are seeing now is the product of that investment.
Is GitHub Copilot that good?
GitHub Copilot works surprisingly well, unlike most pesky code snippet packages. It’s not annoying at all! I tend to forget I’m even doing it. It doesn’t disrupt your workflow significantly. If you don’t like Copilot’s input, you can ignore it and move on.
It makes the biggest impression only after you spend some time with it, which might be a turn-off for some developers. When you realize that the generated suggestions aren’t just random answers from StackOverflow, use the project as the context. It follows your style and naming convention. Check the variables you want and the existing items, and use them in your suggestions.
For example, you create a variable and call it a success message. The Copilot will suggest the appropriate content. It also notices the pattern and tries to generate an error message without input. Unfortunately, we don’t design the app architecture or refactor the code. One of the things that Copilot doesn’t seem to care much about is abstraction and composition.
In most cases, Copilot’s suggestions are at least decent, but they can also feel like choosing a random structure. On the other hand, there is an algorithm. This area is where GitHub extensions shine.
Is GitHub Copilot a Threat to Developers?
After hitting the market for programmers, there was a lot of debate about whether this was a big step towards the end of computer programming or just another autocomplete tool on steroids. Well, writing software still requires deep knowledge. Even with Copilot’s help, developers need to know what they are doing and see and understand the generated code.
Unfortunately, it’s not (yet) possible for non-programmers to jump on the Copilot and build anything they want. No tool is perfect: the correct code is not always generated, and many bad habits and outdated codes exist.
To make matters worse, Copilot can write security flaws, especially in languages where memory is not secure. It’s not 100% reliable yet. Be sure to check the Copilot code before you decide to implement it into your working atmosphere. After all, this is an AI that still has to learn quite a bit to be self-sufficient. It will improve programmers and developers face many other challenges faced by programmers and developers in an earlier blog. Please give it a read after this one.
Conclusion
From our point of view, developers seem to be writing less and less code in the next few years, maybe in the next ten years. GitHub Copilot is just one of many tools that have improved and will continue to improve their work. Too much reliance on such tools can lead to unnecessary work and severe problems at the moment, but these tools will be the center of future tech trends and app development processes. If we manage to make computers better than humans when it comes to writing boilerplate code, algorithms, and computations, we can focus more on creative issues.