Amazon’s AI programming assistant Amazon CodeWhisperer is the most comprehensive review on the Internet

Introduction to CodeWhisperer

Insert image description here

CodeWhisperer access address
CodeWhisperer is a universal code generator based on machine learning developed by Amazon, which provides developers with automated code suggestions. It analyzes existing code and comments to generate personalized suggestions, ranging from single-line code suggestions to complete functions. Additionally, it scans code to highlight and define security issues. CodeWhisperer supports 15 programming languages, including Python, Java, and JavaScript, and can be integrated with multiple integrated development environments (IDEs), such as VS Code, IntelliJ IDEA, AWS Cloud9, AWS Lambda Console, JupyterLab, and Amazon SageMaker Studio. Currently, CodeWhisperer is free to use with no restrictions.

Amazon CodeWhisperer Features

Insert image description here

Live code advice tailored just for you

Amazon CodeWhisperer is trained on billions of lines of Amazon and publicly available code to understand comments written in natural language (English) and can generate multiple code recommendations in real time to increase developer productivity. The service provides suggestions for complete functional and logical code blocks (typically consisting of up to 10–15 lines of code) directly in the integrated development environment (IDE) code editor. The generated code is similar to how you would write it, conforming to your style and naming conventions. You can quickly accept the top suggestion (Tab key), view more suggestions (arrow keys), or continue writing your own code. Before accepting a code suggestion, be sure to review it and may need to edit it to ensure it matches exactly what you intended. CodeWhisperer even provides its own suggestions for completing comments as you type.

Supports popular programming languages ​​and IDEs

Amazon CodeWhisperer provides artificial intelligence (AI)-based code suggestions for multiple programming languages, including Python, Java, JavaScript, TypeScript, C#, Go, Rust, PHP, Ruby, Kotlin, C, C++, shell scripts, SQL, and Scala. You can use services from multiple IDEs, including JetBrains IDE (IntelliJ IDEA, PyCharm, WebStorm, and Rider), Visual Studio (VS) Code, AWS Cloud9, AWS Lambda Console, JupyterLab, and Amazon SageMaker Studio.

Optimized for use with AWS services

CodeWhisperer enables developers to use AWS services more efficiently, including Amazon Elastic Compute Cloud (Amazon EC2), AWS Lambda, and Amazon Simple Storage Service (Amazon S3), by providing code recommendations that are optimized for AWS APIs. As you write code in the IDE, CodeWhisperer automatically analyzes your code and comments. CodeWhisperer suggests using relevant cloud services and public software libraries to implement the desired functionality, and then recommends code snippets that adhere to AWS best practices.

Built-in security scanning

Using CodeWhisperer, you can scan Java, JavaScript, and Python projects to detect hard-to-find vulnerabilities, such as the Open Worldwide Application Security Project (OWASP) top ten vulnerabilities, or non-compliance with cryptographic library best practices and other similar security best practices Practical loopholes. The service analyzes existing code in the IDE (whether generated by CodeWhisperer or written by you), identifies problematic code with a high degree of accuracy, and provides informed recommendations on how to fix the code.

Code Responsibly: A Reference Tracker for Open Source Code

CodeWhisperer provides a built-in citation tracker that detects whether code suggestions are likely to be similar to open source training data and can flag such suggestions. The recommendations are annotated with the open source project's repository URL, file references, and license information so you can review it before deciding whether to adopt the suggested code. All flagged suggestions you use are logged so you can review them later and add license attribution at your discretion. You can also choose to filter out any code suggestions that CodeWhisperer considers to be similar to open source code.

Code Responsibly: Avoid Bias

Responsible use of artificial intelligence and machine learning (ML) technologies is key to fostering continued innovation. CodeWhisperer helps developers avoid bias by filtering out code suggestions that may be considered biased and unfair.

Business management

Provide users or groups access to CodeWhisperer using single sign-on (SSO) integrated with AWS IAM Identity Center. Manage group-wide policies, such as adding recommendations that contain reference codes.

VSCode installation

  1. Install the AWS Toolkit plug-in, search and install it in the VS Code sidebar
    Insert image description here

  2. Click aws in the sidebar => DEVELIOPER TOOL => Codewhisper => Start
    Insert image description here

  3. Click AWS Builder ID in the drop-down menu to configure the corresponding id and other information.
    Insert image description here

  4. When the sidebar appears as shown in the picture below, you can program happily!

Insert image description here

CodeWhisperer shortcut keys

shortcut key Function
ALT+C Ask for suggestions (press Tab to accept suggestions)
TAB accept suggestions
ESC Unsuggest
Select next suggestion
Select previous suggestion

Summarize

About code Whisperer, this intelligent AI programming assistant is quite in line with development needs. It can be said that it came into being at the right time. I look forward to it being more perfect! !

Guess you like

Origin blog.csdn.net/2301_78784268/article/details/133670765