Now Amazon debuts an AI programming assistant – CodeWhisperer
Did they get GitHub Copilot to write it?
Amazon at its re:Mars conference in Las Vegas on Thursday announced a preview of an automated programming assistance tool called CodeWhisperer.
Available to those who have obtained an invitation through the AWS IDE Toolkit, a plugin for code editors to assist with writing AWS applications, CodeWhisperer is Amazon's answer to GitHub Copilot, an AI (machine learning-based) code generation extension that entered general availability earlier this week.
In a blog post, Jeff Barr, chief evangelist for AWS, said the goal of CodeWhisperer is to make software developers more productive.
"CodeWhisperer will continually examine your code and your comments, and present you with syntactically correct recommendations," said Barr. "The recommendations are synthesized based on your coding style and variable names, and are not simply snippets."
The service is free during the preview period, as was Microsoft's GitHub Copilot, now priced at $10 per month.
Barr said CodeWhisperer analyzes various signals to suggest appropriate bits of code, including cursor location, preceding code, comments, and code in other project files. The software, he said, is trained on billions of lines of code in open-source repositories, internal Amazon repos, API docs, and online forums.
As such, it may run into the same issues as Copilot about code quality and potential licensing concerns. The academic community has already started looking at how AI coding tools like Copilot perform in terms of code quality.
So far, the answer is not all that well. For example, a 2021 research paper [PDF] from NYU computer scientists found that 40 percent of 1,689 programs made with Copilot suggestions produced code with known weaknesses. But continued attention and iteration to these systems should help them improve eventually.
Another recent paper, "Is GitHub Copilot a Substitute for Human Pair-programming? An Empirical Study," concludes that Copilot accelerates the production of inferior code.
- Microsoft promises to tighten access to AI it now deems too risky for some devs
- GitHub's AI code assistant Copilot takes flight. And that'll be $10 a month, please
- Watch out for AI models regurgitating misplaced keys that unlock crypto wallets
- AI chatbot trained on posts from web sewer 4chan behaved badly – just like human members
The answer may be more AI, at least to those that have bet the farm on machine smarts. Amazon already has a service called CodeGuru that has been trained via machine learning to find vulnerabilities and automate the code review process. Once you're in the business of fixing bad code, why not ensure an ample supply?
Amazon has tried to address worries that suggested code will violate someone's copyright or licensing terms by surfacing that information.
"CodeWhisperer’s reference tracker detects whether a code recommendation may be similar to particular CodeWhisperer training data, and can provide those references to you," the service's FAQs explain. "This allows you to easily find and review that reference code and how it is used in the context of another project."
Amazon promises – during the preview period – not to use code written by developers to train its machine learning models, though it does measure developer metrics such as the acceptance and rejection of code suggestions to refine the service's performance. After the preview concludes, who knows, but the specificity of Amazon's exclusion suggests the company will start scanning customer code for the betterment of its ML model.
Barr provides some examples of CodeWhisperer's capabilities. He describes how he typed the Python comment line
# See if a number is prime and CodeWhisperer responded with a function to make that computation.
CodeWhisperer also understands how AWS services work and so is capable of generating potentially useful suggestions for those building on the AWS platform. Presented with the comment
# create S3 bucket, CodeWhisperer generated the appropriate steps.