What is GitHub Copilot?
GitHub Copilot-Your AI pair programmer!
It’s an AI tool, available as a Visual Studio Code extension that provides you code suggestions right inside your editor based on comments and the context of the file you’re working on. Copilot is the outcome of the collaboration between GitHub and OpenAI, which is heavily supported by Microsoft.
What Copilot can do?
GitHub Copilot is so powerful that all you just need to do is write some comments in plain text (or descriptive function name) in your editor and you will get auto-generated code, the demo is available here! It’s fascinating, right? It not only provides a bunch of lines of code but also suggests a number of alternatives from where you can accept your desirable code segment or reject otherwise. You don’t need to write a single line of code!
What is the backbone of Copilot?
Copilot is powered by an AI system named Codex, which is developed by OpenAI. Codex is based on the GPT-3 (3rd GEN Generative Pre-trained Transformer)— an autoregressive language model that uses deep learning to produce human-like text. The GPT-3 model is trained with almost all the available text data on the internet, statistically saying, the model trained on over 45 terabytes of data from the internet and books to support its 175 billion parameters. And Codex is derived from this model, which is capable not only of text processing but also code generation in some of the most popular languages (Python, JavaScript, TypeScript, Ruby, Go).
How does Copilot work?
The OpenAI Codex Model trained on billions of lines of code publicly available on GitHub repositories, Stackoverflow, and so-forth. Perhaps, the source codes you and I pushed on GitHub have improved this AI tool in some way!! GitHub Copilot understands context more significantly than most code assistants (so they proclaimed). Therefore, whether it’s in a docstring, comment, function name, or the code itself, GitHub Copilot uses the context you’ve provided and synthesizes code to match. The figure below illustrates the architecture of GitHub Copilot model.
Fig. The Framework of GitHub Copilot
With GitHub Copilot, you’re always in charge. You can cycle through alternative suggestions, choose which to accept or reject, and manually edit suggested code. GitHub Copilot adapts to the edits you make, matching your coding style. As Copilot is developed somewhat based on GPT-3, it understands natural languages in a plain text file. Thus if you get bored during coding, perhaps you can do a little chat with your Copilot.
GitHub Copilot: Controversy!
As we know Copilot trained on the public GitHub repositories, this has created certain reactions in the community. A sizeable number of people not taking this initiative in a good way since their open-source codes are being used to train an AI model without consent. However, the trio (GitHub, OpenAI, and Microsoft) is planning to launch a commercial version of GitHub Copilot if the technical preview becomes successful (which will surely be!) and this statement added fuel to the flames of controversy!
On the bright side, many people are welcoming Copilot and appreciated it as a helping hand. Researchers demonstrated that Copilot will save a huge amount of time and resources for the software industry. Besides, it will help the developers to get their jobs done with ease and definitely will boost the overall productivity.
The bigQ: Is Copilot Going to Replace Developers?
Right now, Copilot is just an AI assistant for developers, what it claims to be. I am not sure Copilot will replace developers, somewhat not in the short or midterm period. Copilot is your AI pair programmer. It still needs a chief pilot (human developer) to fly to the destination.
Copilot is not able to understand a real-world problem in the first place, neither can plan a solution or build it and show it off to the world — tasks that human developers are good at.
In the future, perhaps, an AI tool like GitHub Copilot can be the game-changer in the programming industry — not by stealing jobs, but by making developers more productive.
Want to try GitHub Copilot?
GitHub is inviting developers via email to explore GitHub Copilot. Access is limited to a small group of testers during the technical preview of GitHub Copilot. However, if you didn’t receive an invitation email, join the GitHub Copilot waitlist here. Give it a try!
Note: According to CC (Creative Commons), "The use of publicly available data to train AI models doesn’t infringe copyright by default". Don't bother!!
“You don't need to fly solo anymore, GitHub Copilot has your back now!”
Reference
- OpenAI, "GitHub Copilot— Your AI pair programmer". [Access: https://copilot.github.com/]
- OpenAI taem, "Language Models are Few-Shot Learners", arXiv:2005.14165 [Access: https://arxiv.org/abs/2005.14165]
- Wikipedia, "GPT-3". [Access: https://en.wikipedia.org/wiki/GPT-3]
- SitePoint, "What is GitHub Copilot? An AI Pair Programmer for Everyone".
[Access: https://www.sitepoint.com/github-copilot-ai-pair-programming/] - Discussion on Youtube:
English: https://www.youtube.com/watch?v=4duqI8WyfqE&ab_channel=Fireship
Bangla: https://www.youtube.com/watch?v=2uQYzZAHy5I&ab_channel=LearnwithSumit
Hindi: https://www.youtube.com/watch?v=s-4rDsf8e5c&ab_channel=CodeWithHarry