Since its release, copilot has become the talk of the town among developers. There are many pros and cons to using it.
I have been asked this question a lot since I got access to Github Copilot’s technical preview. I will do my best to answer this question. In the end, I will give my honest evaluation of whether we should use it or not.
Short Answer: It will take time. Of course, everyone has to become a part of the useless class and developers will, too—but in the end. To get a clearer idea keep reading.
Let us first understand what Github Copilot is and how it works—it will help us to assess the future of code autocompletion.
What is Github’s Copilot?
According to Github, Copilot is powered by Codex, the new AI system created by OpenAI. GitHub Copilot understands significantly more context than most code assistants. Trained on billions of lines of public code, GitHub Copilot puts the knowledge you need at your fingertips, saving you time and helping you stay focused.
In simple words, Copilot really understands what you want to code in the next line. In my case, it even understands bad comments perfectly. Sometimes, it makes a few silly mistakes like declaring the same variable repeatedly; these kinds of bugs were already expected, which is why Github initially gave developers access to give their feedback. I was quite surprised by its ability to understand. You just have to feed it with a few examples and the rest will generate itself perfectly.
So far, there are 3 main features I would like to mention:
- Convert comments to code.
Github Copilot can understands bad comments and function names.
- Tests without the toil.
This is the only feature I would recommend you all to use in Github Copilot.
- Autofill for repetitive code.
Github Copilot is the more advanced form of already available autosuggestion plugins. Which is obviously good for experienced developers, but not for newbies.
But Github Copilot does NOT write perfect code every time. As Github says, its Copilot always tries its best to understand your intentions but the code it suggests may not always work, or even make sense. It will improve with the passage of time.
How does it work?
According to Github Copilot, it has been trained on a selection of English language and source code available on the internet including all Github repositories (except private repositories).
The above diagram speaks for itself. Coding-related text and available public code on the Internet (Github) is retrieved by Codex, which uses its algorithm and passes it on to the service Github Copilot. This service then provides suggestions for our private code, which is actually not private, as it sends suggestions for improvement back to the service Github Copilot. 🙂
Codex Theory but interesting.
According to the Codex paper, a 35-page long paper released a week ago, "Codex is a GPT language model fine-tuned on publicly available code from Github, and study its Python code-writing capabilities." Codex is much more efficient and improved than GPT-3 because it’s been trained on many public repositories available on Github.
The paper also claims that it has solved 10,000+ competitive Programming problems.
About data collection, the paper says:
Our training dataset was collected in May 2020 from 54 million public software repositories hosted on GitHub, containing 179 GB of unique Python files under 1 MB. We filtered out files which were likely auto-generated, had average line length greater than 100, had maximum line length greater than 1000, or contained a small percentage of alphanumeric characters. After filtering, our final dataset totaled 159 GB"
Finally, this paper concludes that:
By fine-tuning GPT on code from GitHub, we found that our models displayed strong performance on a dataset of human-written problems with difficulty level comparable to easy interview problems
This was all about the stats and facts of Codex, which is the backbone of Github Copilot. The paper clearly says that it will produce more accurate and effective results in the future, which means Github Copilot will become stronger and stronger.
How AI tools will impact developers
Here is the moment of truth. Github Copilot will greatly increase developer productivity. It will also help reduce the cost of software production. I think Github Copilot could replace writing code (programmers), but it will take more than enough time to replace developers in the first place. I use two different titles—programmer and developer—because the Bureau of Labor Statistics (BLS) classifies computer programmers and software developers separately, with developers being paid higher than programmers because they have more tasks indirectly related to writing and interacting with code.
As I mentioned in the introductory part, everyone has to become part of the Useless Class, but people who interact with computers will join it last. In the Useless Class era, If you are living in a developed country or your government is good enough then you will get paid for doing NOTHING.
This paper also claimed that Codex will create new markets for work that complement changed workflows. After the release of GPT-3, a few companies began to include working with GPT-3 and writing prompts in job listings. It is also possible that models like Codex will lead to the emergence of new kinds of work for engineers who are skilled at working with such tools.
Should we use Github Copilot?
My experience with Github Copilot is not that good. As the paper claims that Codex has solved more than 10,000 Competitive programming problems, I was solving a Spiral Number problem. Github Copilot suggested some very awkward statements that had nothing to do with the if-logic, which means Copilot has to learn a lot. I used Copilot just to test, but using AI tools in Competitive Programming is CHEATING ON YOURSELF.
Never use such tools for problem-solving, it will have a highly negative impact on your problem-solving skills. If you are an experienced developer then you should take advantage of Github Copilot for repetitive code. If you are a newbie you must avoid such AI tools even IDE’s autosuggestions, they will spoil your concepts.
But whatever you are, don’t even think of using AI Tools in Competitive Programming, they can help you in winning but you will not get inner peace.
This article is based on my experience with Copilot, research, and Codex paper. It’s your choice whether to use tools like Github Copilot or not. But you will use them if not today then tomorrow for sure.
Please let me know your thoughts on AI autocompletion tools i.e Gitub Copilot and what you think about the future of developers.