InertiaRSS Track and read blogs, news, and tech you care about
Read Original Open in InertiaRSS

Recommended Feeds

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

阮一峰的网络日志

科技爱好者周刊(第 396 期):互联网通信的替代方案 科技爱好者周刊(第 396 期):互联网通信的替代方案 - 阮一峰的网络日志 科技爱好者周刊(第 395 期):软件开发的第三种方式 科技爱好者周刊(第 395 期):软件开发的第三种方式 - 阮一峰的网络日志 科技爱好者周刊(第 393 期):脑腐状态 科技爱好者周刊(第 392 期):axios 投毒与好莱坞式骗术 科技爱好者周刊(第 391 期):AI 的贫富分化 科技爱好者周刊(第 390 期):没有语料,大模型就是智障 套壳中国大模型撑起500亿美元估值?扒一扒 Cursor 的"套壳"疑云 科技爱好者周刊(第 389 期):未来如何招聘程序员 科技爱好者周刊(第 388 期):测试是新的护城河 零安装的"云养虾":ArkClaw 使用指南 科技爱好者周刊(第 387 期):你是领先的 科技爱好者周刊(第 386 期):当外卖员接入 AI 字节全家桶 Seed 2.0 + TRAE 玩转 Skill 科技爱好者周刊(第 385 期):马斯克害怕中国车企吗? 智谱旗舰 GLM-5 实测:对比 Opus 4.6 和 GPT-5.3-Codex 科技爱好者周刊(第 384 期):为什么软件股下跌 科技爱好者周刊(第 383 期):你是第几级 AI 编程 Kimi 的一体化,Manus 的分层 科技爱好者周刊(第 382 期):独立软件的黄昏 AI native Workspace 也许是智能体的下一阶段 科技爱好者周刊(第 381 期):中国 AI 大模型领导者在想什么 科技爱好者周刊(第 380 期):为什么人们拥抱"不对称收益" 科技爱好者周刊(第 379 期):《硅谷钢铁侠》摘录 我如何用 AI 处理历史遗留代码:MiniMax M2.1 升级体验 科技爱好者周刊(第 378 期):预测是新的互联网热点 科技爱好者周刊(第 377 期):14万美元的贫困线 科技爱好者周刊(第 376 期):太空数据中心的争议 科技爱好者周刊(第 375 期):一扇门的 Bug 终于有人做了 Subagent,TRAE 国内版 SOLO 模式来了 科技爱好者周刊(第 374 期):6GHz 的问题 VS Code 使用国产大模型 MiniMax M2 教程 科技爱好者周刊(第 373 期):数据模型是新产品的核心 国产大模型接入 Claude Code 教程:以 Doubao-Seed-Code 为例 科技爱好者周刊(第 372 期):软件界面如何设计 大模型比拼:MiniMax M2 vs GLM 4.6 vs Claude Sonnet 4.5 科技爱好者周刊(第 371 期):一个乐观主义者的专访 科技爱好者周刊(第 370 期):正确的代码高亮 错误处理:异常好于状态码 科技爱好者周刊(第 369 期):Tim 与罗永浩的对谈 科技爱好者周刊(第 368 期):不要这样管理软件团队 一天之内,智谱和 Anthropic 都发了最强编程模型 科技爱好者周刊(第 367 期):Nano Banana 的几个妙用 科技爱好者周刊(第 366 期):旧金山疯狂的 AI 广告 科技爱好者周刊(第 365 期):流量变现正在崩塌 科技爱好者周刊(第 364 期):最难还原的魔方 科技爱好者周刊(第 363 期):最好懂的神经网络解释 科技爱好者周刊(第 362 期):GitHub 工程师谈系统设计 科技爱好者周刊(第 361 期):暗网 Tor 安全吗?
AI Programming Assistant Review: GitHub Copilot vs Doubao MarsCode
阮一峰 · 2024-07-03 · via 阮一峰的网络日志

I. Introduction

How is AI used in programming?

There are various attempts currently, the most aggressive one is probably v0.dev.

You tell it what website you want, and it gives you a few design drafts. You choose one, and it generates a ready-made webpage.

This has a futuristic feel, wanting what program, the machine helps you write. However, in reality, it can only generate web UI (user interface), cannot generate interactive scripts, and also cannot generate other UIs (such as mobile app pages).

This reflects the limitations of AI, at least for now, AI cannot replace programmers, it can only serve as a programming assistant.

Based on my experience, as a programming assistant, AI plays a significant role, greatly saving programmers' time and significantly improving programming efficiency and code quality.

Today, I will evaluate two AI programming assistants to see which one is better, and also serve as an introductory tutorial to demonstrate their usage to those who haven't used them yet.

After reading this, you'll understand why programming can no longer be separated from AI—it truly empowers programmers like adding wings to a tiger.

II. Introduction to GitHub Copilot and BeanPod MarsCode

The two AI programming assistants I will evaluate (or introduce) are GitHub Copilot and BeanPod MarsCode.

GitHub Copilot is the earliest AI programming assistant and also the one with the highest market share and recognition.

It is produced by Microsoft, with an underlying foundation of OpenAI, and relies on the world's largest programmer community, naturally possessing exceptional capabilities.

Dou bao MarsCode is an intelligent development tool based on the Dou bao large model.

It is backed by ByteDance, originally an internal tool,据说 over 70% of ByteDance's engineers use it, contributing millions of lines of code monthly.

On June 26th, it was officially released to the public in Beijing, and the outside world can use it for free, making it fresh off the press.

They both come from major companies, are sufficiently representative, and have similar functionalities, so let's see if domestic AI can replace mainstream foreign products.

III. Usage Environment

AI programming assistants are generally not used alone but as plugins for IDEs (Integrated Development Environments), providing various AI functionalities within the editor interface.

The IDE I chose is currently the most popular VS Code. Additionally, BeanPod MarsCode also supports JetBrains IDE, and Copilot supports more.

Everyone can find Copilot and MarsCode by searching in the VS Code extension market. Below is the page after installation. (The upper image is Copilot, and the lower image is BeanPod MarsCode, and the same order follows.)

If you don't have VS Code, or even other IDEs, that's not a problem. BeanPod MarsCode provides a free cloud IDE (lower image), no need to download and install, use it directly in the browser, and it comes with dozens of development templates, and you can pull GitHub repositories, very convenient to use.

GitHub also has a cloud IDE, which is its CodeSpace, and Copilot can be used there as well. However, after using it for 60 hours per month, it starts to charge, so it's not recommended here.

4. Chat Functionality

The main user interface of the AI Programming Assistant is a chat window where users can ask various questions.

First, I asked a question "What is the CAP Theorem?" to test their chat functionality.

It can be seen that their responses are all accurate and useful, with Copilot having slightly better formatting.

The second question "Please recommend books for learning JavaScript" received similar responses from both.

Chat questions are not limited to programming; any kind of question can be asked, such as "When is the Spring Festival in 2025," and their responses are also fine.

However, the daily use scenario for this feature should be searching for software documentation, and it is indeed very useful.

5. Code Generation

Next, let's test the main function of the AI Programming Assistant: automatic code generation, letting it write code.

is very easy to use; as long as you press a key, it will automatically suggest what the following code should be .

You can take it as a reference or press the Tab key to accept it as the official code. If you want to confirm each word individually, press Ctrl + Right Arrow (Mac: Cmd + Right Arrow).

I had the AI generate a function to validate phone numbers.

The code above, except for the first line "// Validate phone number" which I entered, everything else was generated by the AI.

This code is completely correct, and there are two particularly satisfying points: (1) Because the file extension is JS, they automatically generated JavaScript code; (2) They are validating Chinese mobile phone numbers, and I didn't explicitly specify this—they inferred it themselves.

It's a bit strange that the code provided by Copilot and MarsCode is the same. Could it be that they are trained on the same material?

I added another condition, requiring both mobile and landline cases. The code they provided is still (basically) the same.

In this round, they are tied. Additionally, if you are not satisfied with the provided implementation, Copilot can press Ctrl + Enter to offer multiple implementation options (see the image below).

MarsCode, on the other hand, has a floating toolbar when suggesting code, which allows switching between multiple implementations (as indicated by the arrow in the lower image).

It is worth mentioning that,MarsCode also has a special feature called "Code Completion Pro"Without manual prompts, automatically predict the next point of change based on existing code and provide recommended code.

This feature needs to be turned on in the settings (see the image below).

After opening, it enhances code prediction. First, at the expected point to trigger code suggestions, press Ctrl + Shift + Enter to actively trigger the suggestion, then press Tab to accept it.

At this point, it predicts the next change point, and clicking Tab will jump to that location. This is very useful in code modification scenarios. After modifying one place, it helps you jump to the next (predicted) change point and provides suggested code. Ordinary code completion cannot achieve this.

VI. Generating Comments, Code Explanation

In addition to generating code, another important role of AI is to generate programming documentation, which is the textual explanation of the code.

There are mainly two types of documentation features: comments and code explanations. First, Copilot's comments need to be manually generated.

Doubao MarsCode has a quick button above the code to generate comments.

Clicking it will invoke/docCommand is relatively convenient to use.

As for the code explanation feature, I think compared to others,豆包 MarsCode (MarsCode) is better. Copilot is too verbose and a bit hard to read.

7. Other functions

(1) Code translation

They can all translate code from one language to another.

I tried translating JavaScript code into Python, and there were no issues. The豆包 MarsCode app also automatically saves the translated code as a separate file in the current directory.

(2) Generate unit tests

Writing unit tests is troublesome, AI can generate them automatically, which is quite convenient.

The same piece of code, Copilot generated 4 test cases, while Doubao MarsCode generated 5.

And, the豆包 MarsCode(IT之家) provides text summaries for test cases (see below), which is very useful, but unfortunately, Copilot doesn't.

I think, in this aspect, the豆包 MarsCode(IT之家) does a good job.

(3) Correcting Errors

AI can also automatically modify erroneous code. If the test cases or automatic builds fail, it will explain the reason for the error and provide suggestions for correction. No examples will be given here.

Eight, Summary

After a series of tests above, their performance is generally not very different. I believe, domestic AI programming assistants can completely replace GitHub Copilot , and in some details, they do better.

The advantage of GitHub Copilot lies in its numerous features (for example, calling terminal commands), and its training material might be more extensive, possibly performing better on some niche languages.

However, it is paid, at $10 per month, while DouBao MarsCode is free , making it worth recommending the latter just for this reason.

Currently, DouBao MarsCode is only an early version, with more features to be added later. However, for most programmers, the existing features are already sufficient.

Additionally, I noticeably found that DouBao MarsCode has faster response times, as the server is located domestically. Compared to Copilot's overseas server, this is also an advantage.

In summary, DouBao MarsCode is worth trying out to experience the progress of domestic AI. If you've never used an AI programming assistant before, you should definitely not miss this programming magic tool that improves efficiency.

(End)