can

can

copilot

Copilot Introduction
Copilot, a programming tool created by GitHub and OpenAI, is an AI-powered programming assistant. With the help of GitHub's extensive code library and the expertise in natural language processing and machine learning from OpenAI, Copilot has become a powerful assistant for developers, providing new functionalities such as code suggestions and code generation.
In a previous article, I introduced the usage of Copilot by SenseTime. Today, let's take a look at Alibaba's Copilot - Tongyi Lingma. And the best part is, it's free!
According to the introduction on Alibaba Cloud's official website, we can roughly understand the following key features:

  • Tongyi Lingma provides real-time code continuation at the line/function level, natural language code generation, unit test generation, code comment generation, code explanation, intelligent Q&A for development, and exception troubleshooting capabilities.
  • Compatible with mainstream IDEs such as Visual Studio Code and JetBrains IDEs.
  • Supports mainstream programming languages such as Java, Python, Go, C/C++, JavaScript, TypeScript, PHP, Ruby, Rust, and Scala.

Installation
Without further ado, let's start the installation. I will demonstrate using VSCode, simply search for "TONGYI Lingma" and it will be the first result.

After installation, you will be prompted to log in to your Alibaba Cloud account. Once logged in, you can start using it as shown in the screenshot. The sidebar provides some proactive features such as code explanation, test generation, comment generation, and code optimization.

Without further ado, let's start testing!
Real Experience
Coincidentally, I was working on the frontend code for an AI website and was having a hard time. So I decided to give it a try.
I am primarily a backend coder, and I only recently started writing frontend code for AI websites, so please don't judge me too harshly.
Here is the original design of the website module I wanted to add:

I wanted to add a module called "Drawing Task" below the website. Currently, the interface waits synchronously for the backend to finish drawing, but the user experience is not good as it takes about ten seconds to wait, and there is also a possibility of errors. So I wanted to make it an asynchronous task, displaying the currently running task in the "Drawing Task" section and updating the task list status through periodic polling.
So I created a new file and started describing the task. It quickly provided me with the result, and I could quickly copy the code to the editor by clicking the small button on the right.

With the help of Copilot and my modifications, my implementation looked like this in about 10 minutes:

From the results, it basically met my expectations. As for the color scheme, I'll figure it out later. 😭
During the use, I deeply experienced what is called "natural language programming", for example:

And also:

And so on:

Based on the code examples provided by Copilot, there is a high probability that it can provide the code I want, and this probability increases as the overall code comment coverage increases. And it's really fast! (Faster than the previously mentioned SenseTime)
In addition, I also tested Copilot's code explanation feature. At the time, the website had a simple carousel that would enlarge the next image every 3 seconds in a loop. Here is the original code:

I directly clicked "Explain Code" in the sidebar to see if it could understand:

It roughly understood what I wanted to achieve. Interestingly, there are two buttons below the answer: "In High Level" and "In Detail". As the names suggest, they provide a more abstract and more detailed explanation. Let's try them out.
In High Level:

In Detail:

In addition, the chat box on the left can be used to ask questions, similar to a simplified version of ChatGPT. Well... except for the time not matching, everything else is fine. It can be a good time killer:

Summary
The above is my actual testing process, and here is a brief summary.

It can improve productivity by about 30% if used well.
Alibaba's Copilot is helpful for programmers. At least for me, there isn't much difference compared to GitHub Copilot. If you are a beginner, it's like having a supervisor who can monitor and help you at any time. If you are experienced, it's like having a peer who can help you identify some issues. If you are highly skilled and have a deep understanding of prompts and strong modular thinking, I believe it can greatly improve your work efficiency!
I didn't test the unit test generation feature because it's a personal project and there is no need for unit tests. But according to comments from other forums, it works.
The future of AI applications will definitely become more useful and widespread. Currently, companies like ByteDance, Alibaba, and Meituan are exploring the use of AI in engineering fields, including but not limited to Copilot, unit test generation, and code review. Everyone should understand and learn about it.
Lastly, Alibaba's product is free, so take advantage of it!

If this article has brought you some value, please consider liking and bookmarking it. Next time, I will introduce another star project with over 10,000 stars, GPT-pilot. What can it do? It can directly build project structures based on your requirements and continuously improve them under your guidance. In short, you arrange, it codes.
Thank you, everyone.

Author: Qingyu Bailu
Link: https://juejin.cn/post/7317820788546961427
Source: Juejin
Copyright belongs to the author. For commercial reproduction, please contact the author for authorization. For non-commercial reproduction, please indicate the source.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.