The tech world is always buzzing with new developments, and one of the most exciting recent releases is Amazon Web Services' Code Whisperer. For developers searching for an accessible alternative to GitHub's Co-Pilot, this code-generating tool has the potential to be a game-changer.
What is Code Whisperer?
Code Whisperer is a new Amazon Web Services (AWS) code generation tool that generates code using enormous underlying models. It is intended to do code writing for developers more efficiently, giving them more time to devote to crucial activities. Contrary to its main rival, GitHub's Co-Pilot, which Microsoft and OpenAI power, Code Whisperer is free to use for everyone.
Difference between Code Whisperer and the Co-Pilot
Code Whisperer distinguishes itself from rival products thanks to several characteristics. The main benefit is that it is free. For developers who might not have the money to buy pricey tools, this is a big issue on its own. Second, compared to Co-Pilot, Code Whisperer has a few unique characteristics. By providing references to the code in its training data when writing its code, for instance, it becomes more transparent and is less likely to copy code unintentionally. Additionally, it offers security scans that can examine smart contracts and look for OWASP concerns, like cross-site scripting vulnerabilities, in web apps.
What are the implications for developers?
Code Whisperer has the potential to be a game-changer for developers. Its massive foundational models allow developers to access large amounts of data they may not have had access to otherwise, making it possible to build highly customized AI applications. For example, with as few as 20 labelled images uploaded to S3, developers can create image models that compete with industry standards. Additionally, based on inferential chips, AWS's new ML training EC2 instances can train machine learning models at about 50% of the average cost of EC2. This means developers can prepare their LLM from scratch for only $5 million instead of $10 million.
How to use Code Whisperer
To use Code Whisperer, the first thing you need to have is an AWS account. Once you have it, install the AWS Toolkit plugin from VS Code marketplace or JetBrains Marketplace. For this example, I will guide you on how to set it up in your VS Code setup.
Once you install the plugin, you need to connect it with your AWS Builder ID, which comes with AWS Account. When you click Start on AWS Toolkit Code Whisperer, it will prompt you to sign in with the builder ID.
After successful authentication, you should see the Connected with AWS Builder ID indicator in your VS Code like below.
Once you start the Code Suggestion option, you can try writing some des and see if Code Whisperer is giving suggestions to complete the code.
Here are some examples I managed to capture.
In the above exam, you can see it suggests I complete my styling code in Line number 29.
Also, it gives me the auto-completion to write the onMouseEnter event handler, which I find pretty impressive.
But once you start writing some complex code, you might be able to see some flaws with auto-suggestions, as I have demonstrated below.
Here it wrote this entire login form, which is pretty good, but at the same time, it could not generate the code using Tailwind CSS, which Co-Pilot did for me.
When I use Co-Pilot, sometimes I write some instructions as comments and let the Co-Pilot write some code for me (which it does most of the time), but Code Whisperer failed here trying to execute some simple instructions. It attempted to auto-complete my comments and turned them into an actual mess.
I gave a simple task to check if the user is already logged in when navigating to our application's Login page. As I mentioned above, Code Whisperer tried to complete my comment.
But when I gave the exact instructions set to Co-Pilot, this was the result it generated, which was far more acceptable.
Also, as you can see below, Code Whisperer failed to generate some simple Regular Expressions to validate an email.
Here is the Co-Pilot's suggestion it provided me for reference.
Conclusion
You might therefore be unsure of whether you ought to utilise it or whether it generates subpar code. The most crucial thing to remember is that Code Whisperer is still a newborn and needs development time. However, I believe it is already accomplishing more than enough compared to the competitors. Therefore, things will only get better with time.
For developers looking for a free alternative to GitHub's Co-Pilot, the launch of Code Whisperer is welcome news. Code Whisperer can revolutionise the game by enabling developers to access vast volumes of data and create highly specialised AI applications thanks to big fundamental models. Developers can take advantage of Code Whisperer's advantages for the time being while waiting to see where this new development tooling space race leads us in the future, as the legal ramifications of AI-generated code are still uncertain.