Auto-completion tools are the ABC of increased productivity for developers. But what if those tools were even better? What if your code completion guessed what you wanted to write next and offered complete lines of code? That is what AI/ML-assisted coding is bringing to the table. In a few years, you’ll open an IDE without a coding assistant and get the feeling of a missing tool.
Along with Tabnine, the pioneer of AI code assistants, Copilot and CodeWhisperer are both part of the AI code assistant category for developers. AI/ML-assisted tools have been around for a while, but GitHub Copilot was the first to take the programming world by storm with a very popular beta. Just a day after beta ended and Microsoft announced a subscription fee; Amazon brought out a direct competitor to Copilot, CodeWhisperer. Both tools do similar things, but which is better for you? We’ll cover the key features and differences between the two and help you find the right fit.
What is GitHub Copilot?
Built on top of OpenAI’s Codex model and further developed by GitHub, Copilot is a code completion tool that offers complete code snippets based on context. Trained on billions of lines of code from public repositories, Copilot can make an educated guess and suggest complete lines of code, increasing efficiency.
An important caveat when using Copilot is, “You are responsible for ensuring the security and quality of your code.” When you write code with Copilot, you are the code reviewer, and you must read and understand the code and not blindly trust the AI.
GitHub Copilot features
AI-suggested code – Copilot will suggest code based on project context, style conventions you use, and your cursor’s location.
IDE Support – Visual Studio, Neovim, VS Code, and JetBrains.
Control Privacy – You get to choose how Copilot uses the data it collects from you.
As of June 2022, Copilot is generally available for $10/Month or $100 a year with a 60-day free trial. Students and contributors to popular open source projects may gain free access.
- Wide range of language and IDE Support.
- Immediate access.
- Excellent in easing tedious code writing.
- It sometimes uses variables that don’t exist.
- Trained on older code,it may not understand the context of newer libraries and frameworks.
What is Amazon CodeWhisperer?
Announced in June 2022 by Amazon, a day after Copilot finished beta and became open to the public. In an interview with TechCrunch, Amazon’s VP of AI services, Vasi Philomin, reiterated that CodeWhisperer is not a response to Copilot but the result of many years of efforts to bring a coding companion to the market. CodeWhisperer aims to help developer productivity using a machine learning (ML) service that generates code recommendations based on contextual information in the IDE, including the code, and comments in natural language.
Like many other tools, CodeWhisperer offers suggestions based on existing code and context, but CodeWhisperer also reads comments, which is a novel approach. A side effect of using CodeWhisperer is having more comments in your code, which can’t be bad!
Amazon CodeWhisperer features
ML-suggested code – CodeWhisperer will read your comments and suggestions on which code to write to accomplish the task.
Popular IDE support – JetBrains (IntelliJ, PyCharm, and WebStorm), Visual Studio Code, AWS Cloud9, and the AWS Lambda console.
Works best with AWS APIs – CodeWhsiperer is built to work best with AWS APIs, including Amazon Elastic Compute Cloud (EC2), AWS Lambda, and Amazon Simple Storage Service (S3).
Comment Suggestions – CodeWhisperer will make comment suggestions, not only code suggestions.
Unknown at the time of writing.
- Best with AWS
- Strong security by design
- Encourages commented code
- Requires waiting list
- Limited languages at this time
Differences between GitHub Copilot and Amazon CodeWhisperer
Copilot already has a significant hold on the pair programming marketplace, being ahead of CodeWhisperer in the market by a year. It is unclear at this stage if CodeWhiserer has what it takes to establish itself as a significant competitor.
One of the most critical differences between Copilot and CodeWhisperer is the training code used for the AI. While Copilot relies heavily on GitHub public repositories, CodeWhisperer is learning from in-house code, which could mean it will produce more reliable code.
The future of AI for code is here
There are some small but significant differences between Copilot and CodeWhisperer, such as the fact that Copilot bases its suggestions on context and style while CodeWhsiperer reads your comments.
If you’re using AWS Cloud9, Lambda, or writing in Java, CodeWhisperer would be your first choice. But if you’re looking to code in a different language or IDE, Copilot will answer your call. If you’re operating in the small overlap between the two, I suggest you give Copilot a go first due to its higher popularity and stability over the past year.
You should be aware there are alternatives to Copilot and CodeWhisperer that have been around for a while. Tabnine supports many IDEs, Rich Text Editors, and languages. You can use the AI-trained auto-completion tool on public repositories for free or pay a subscription fee to train the AI on your private repositories to match your style. Learn more about getting started with Tabnine.