If you were around during the early days of StackOverflow, or even Google, then you might remember how crazy it was that the answer to all of your coding questions was a single query away. And for the past 10 years or so, we've been riding that wave. And while it's been pretty good so far, but, there is always room for improvement.
And now the next progression of that is finally here in the form of AI pair programming. And there's a few companies already looking to claim the market in this field.
At the re:Mars conference this year, Amazon announced one of its latest developer tools, dubbed CodeWhisperer.
CodeWhisperer is essentially an AI pair programming service that has been trained on billions of lines of code, runs on multiple IDE's, works with multiple programming languages and more interestingly, can learn from your style of code so that it isn't simply just copy and pasting public repos.
It supports the following languages currently:
- JavaScript
- Java
- Python
Though I would imagine that new languages will be added on as the software advances and its popularity grows.
If you're already familiar with GitHub's CoPilot, it is very similar in nature, though with its own set of features that fit nicely with the AWS ecosystem. And as someone who uses various AWS services for work, and actively codes against various API's in AWS, this is very enticing for me.
Here's what I like so far, based on the official announcement.
Licensing
Because CodeWhisperer relies on various open-sourced libraries in order to train its model, it is able to detect when a suggested code-snippet is similar enough to that of a licensed function or method, and it leaves it to the developer to determine whether they would like to continue to include the code.
And while most developers these days simply copy and paste code from the internet without giving it too much thought, this is definitely a step in the right direction in order to give attribution when needed.
This is huge, as recently we saw some controversy between GitHub Copilot and the open-source community, when the Software Freedom Conservancy (an not for profit organization that provides legal support for open sourced software) left the platform due to the lack of attribution that Copilot provided when suggesting code to its users.
By the looks of it, CodeWhisperer is aware of that potential issue and has taken steps to correct it early on.
Language and IDE support
Currently, CodeWhisperer is coming out of the box with support for 3 programming languages, JavaScript, Java and Python. And that's not alot. Not by a long shot. But it is a start. And the 3 languages are relatively popular ones.
I say relatively, because JavaScript and Python are consistently on the most popular programming languages list, while Java has lost some market share during the past decade or so.
But the hope is, of course, that new languages will get added as the AI models are better trained and as adoption grows.
And as far as the IDE's are concerned, CodeWhisperer is supported on Visual Studio Code, JetBrains, AWS Cloud9 and AWS Lambda Console. And seeing as how VS Code and JetBrains are typically at the top of popularity list, odds are that most developers will able to make use of this.
AWS support
Depending on how well this works, this is the game charger for me personally. As mentioned, I tend to rely on various AWS services for my day to day work, such as using SES for sending email as an example or setting up S3 buckets for storage.
And while writing that code in my specific tech stack, in this case JavaScript, isn't the most arduous task in the world, it is time consuming in terms of research and development time.
If it is true that I could simply type the following:
// create function to send emails using SES
// create funtion to generate an S3 bucket
And the underlying pipes and architecture are generated automatically, we're talking hours of work saved here. But, only if the code actually works for my specific needs.
And that has always been the biggest challenge with AI programming. But really it has been a huge issue with copy and pasting code in general long before AI. Because usually code that someone wrote and uploaded to the internet, was intended for a specific use case. And the odds of that code plugging in directly with yours isn't very high.
But if Amazon can manage to figure this out and truly offer a plug and play service, then for sure other companies will have to step their game up.
Personalized code
Where CodeWhisperer stands out from the crowd of AI coding bots, is that it aims to give you contextual code based on your personal style. Meaning it doesn't simply just query its database for related keywords and then simply just inject whatever code is on the other end.
"The recommendations are synthesized based on your coding style and variable names, and are not simply snippets." - Jeff Bar
And that alone is a huge improvement over other technologies in this space. Because, as you may know, whenever you copy code from any source you have to do some work in order to integrate into your code base.
That may mean, that if you are using camel casing, that you will need to convert variable names from a snippet copied online. But if the model can determine that ahead of time, and provide you with code that looks (almost) like yours, then again, you can safe yourself a huge amount of time.
Available
CodeWhisperer is now available in preview as part of the AWS IDE toolkit. I'm definitely going to be signing up for the preview and taking it for a spin and I will write a follow up post to give my first impressions.
If you've used it already, then feel free to share your comments on it down below. And if you think that AI bots will inevitably take over and leave programmers without a job, then also comment on that down below as well.