GitHub Copilot is a controversial developer assistant introduced to the public in June 2021. It has attracted a lot of controversies since then and this article shows some of what developers think about the supposed developer "pair programmer".
Announced by Github on June 29, 2021, GitHub Copilot is an artificial intelligence tool developed by GitHub that assists developers by intelligently suggesting and autocompleting code. GitHub Copilot boasts of being powered by OpenAI’s Codex, an emerging code generator trained on billions of open source code from GitHub's coffers and public code on the internet. The AI is offered a VSCode extension to act as a peer programmer for developers while they are writing code.
Since its announcement, GitHub Copilot has attracted various reactions from its target community, developers, software engineers and architects. While some think it is a great development that will assist them in delivering their tasks faster, a faction is afraid AI is gradually taking over their roles.
From the criticisms to praises from developers and software stakeholders, this article shares the view of developers on GitHub Copilot.
An early user of the alpha version of the Copilot, a Hackernews user who goes by the username "fzaninotto", lauds how accurately it suggests code completions.
It's really like pair programming, even though I'm coding alone. I have a better understanding of my own code, and I tend to give better names and descriptions to my methods. I write better code, documentation, and tests.
Fzaninotto, a Hackernews user
This is a view that many other developers and stakeholders share.
Philip Basile, a software consultant, also recounts his experience as one of the early users of the tool.
Instead of autocomplete, it gives me ideas for full-fledged functions, random code items, and can even pull together some written paragraphs for when I blog
Philip Basile, Software consultant
Adding comments to code is one of the most recommended best coding practices that many developers struggle to keep up with. GitHub Copilot's suggestion and auto-completion accuracy has particularly been linked with descriptive comments.
With Copilot if you write a really good descriptive comment before jumping into the implementation, it does a much better job of suggesting the right code, sometimes even writing the entire function for you
Ferros, a Hackernews user
Cassidy Williams, the director of the developer experience at Netlify, shared her feedback on InfoWorld:
[GitHub Copilot] is going to be incredibly useful for things like smaller utilities that I have to often rewrite across various projects. The fact that I could use it to do certain capitalization patterns, or write certain pattern-matching functions for me that I would normally have to either just hunker down and write or look up how to do for the 100th time.
Cassidy Williams, Director of Developer Experience, Netlify
Overall I just love how seamlessly GitHub Copilot can show you suggestions on VSCode. Beautifully done is developer Hrithwik Bharadwaj's view on the good side of the Copilot.
Even though the GitHub Copilot offers so many interesting features for a first-gen product, developers and many stakeholders have recorded bad experiences. They have been able to point out a host of faults.
GitHub has faced a lot of legal heats as regards copyright infringement. The face leading the copyright criticism is the Free Software Foundation, which tagged Microsoft's offering "unacceptable and unjust." This move was triggered by talks from multiple developer activists who suggest that Microsoft is jacking code. This is in spite of the fact that the Copilot landing page declared that GitHub Copilot is "a code synthesizer, not a search engine: the vast majority of the code that it suggests is uniquely generated and has never been seen before. We found that about 0.1% of the time, the suggestion may contain some snippets that are verbatim from the training set."
Even though a fellow developer argued this with him, stating, "And what about code done by humans? It's also full of bugs and takes a lot of time to be done", the prior is still not convinced.
He insists that "Code done by a human has a human paying attention as they go along and thinking things through." While this might be a very good point to reflect on, GitHub Copilot also allows checking the suggested code before adding it to your project.
Another serious issue GitHub Copilot is facing is security. On August 20, 2021, Cornell University published a paper titled "An Empirical Cybersecurity Evaluation of GitHub Copilot's Code Contributions." The authors of the report, Hammond Pearce, Baleegh Ahmad, Benjamin Tan, Brendan Dolan-Gavitt, Ramesh Karri, claimed that they "explore[d] Copilot's performance on three distinct code generation axes - examining how it performs given diversity of weaknesses, diversity of prompts, and diversity of domains."
Of the 89 scenarios and 1,692 programs generated, the team revealed that an alarming 40% of the code is vulnerable. The paper advised that developers using the GitHub Copilot take steps to minimize the introduction of weak code into their projects.
While some of the allegations raised against the Copilot may be valid, others are fueled by fear and uncertainty of AI taking over the developer’s job.
Sam Altman also tweeted: "Prediction: AI will cause the price of work that can happen in front of a computer to decrease much faster than the price of work that happens in the physical world. This is the opposite of what most people (including me) expected, and will have strange effects."
Suggesting code snippets to developers as they write code invalidates the need for an assistant, and evolution might mean many things. However, chances that AI would replace the main developer are considered slim, in the nearest future, at least.
Even if this will be the case, the scope of programming is a dynamic and never-ending one making it almost impossible for any machine to single-handedly write code that can solve real-life issues, at least in the foreseeable future.
The GitHub Copilot is built as an advanced code suggestion tool to help developers write code faster and eliminate boring, repetitive tasks. It's still in its early stages, and there's still room for many improvements to be made to make it an acceptable and secure developer's pair programmer.