What is GitHub Copilot?
Copilot is an AI pair programmer.
Announced on June 29th 2021 (but not yet available yet), GitHub Copilot is a Visual Studio Code extension that can understand human written text comments and then based on that write code to build whatever it is the comments suggested to do – and do that in several different programming languages.
Here’s what GitHub says:
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work. GitHub Copilot draws context from comments and code, and suggests individual lines and whole functions instantly. GitHub Copilot is powered by OpenAI Codex, a new AI system created by OpenAI. The GitHub Copilot technical preview is available as a Visual Studio Code extension.
GitHub claims:
- GitHub says it’s trained on billions of lines of code. And human language.
- Saves you time.
- Helps you stay focused.
- It’s more than auto-complete.
How does GitHub Copilot work?
Apparently, you would open up Visual Studio Code with the OpenAI plugin installed, write a comment describing the logic you want, and then let GitHub Copilot assemble the code for you.
GitHub says Copilot is trained on both code and human language, meaning it has learned via machine learning to understand the intend of English text and how to respond via code.
What programming languages does Copilot understand?
GitHub says Copilot supports:
- Python
- JavaScript
- TypeScript
- Ruby
- Go
And Copilot apparently understands dozens of programming languages but it’s not clear which others at this time.
Some examples of Copilot in action
A quick intro:
Writing functions (by only writing a description of how the function should behave):
Writing some SQL:
What is OpenAI?
OpenAI is a research and development company with the tech that powers Copilot.
OpenAI’s website says:
We’ve developed codex, an AI that translates natural language into code. Together with GitHub we’re releasing the first Codex-powered app, GitHub Copilot.
OpenAI also has a few interesting projects like this one (Microscope) which aims to look inside a machine leaning AI’s model and see why it works the way it does.
And then they have an API. Throw it some English text and get some code in response.
Will GitHub Copilot take your programming job?
I think for now the answer is no. Looks like the tool may help augment some developers write their code a little faster. Especially for folks working with a new language to be proficient much faster than if they didn’t have Copilot.
GitHub admits the tool isn’t perfect:
GitHub Copilot tries to understand your intent and to generate the best code it can, but the code it suggests may not always work, or even make sense.
It seems to happen more than not where Copilot generates bad code.
So in the end, the developer is still in control and responsible for writing good code and software. But let’s see where Copilot and similar pair programming technology takes us over time.
Mike is the creator of Go With Code and a coder at heart 🙂