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

Recommended Feeds

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
CERT Recently Published Vulnerability Notes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Latest news
Latest news
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The Hacker News
The Hacker News
Malwarebytes
Malwarebytes
G
GRAHAM CLULEY
P
Privacy International News Feed
Spread Privacy
Spread Privacy
S
Schneier on Security
V
V2EX
V
Vulnerabilities – Threatpost
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
Threat Research - Cisco Blogs
罗磊的独立博客
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
S
Securelist
阮一峰的网络日志
阮一峰的网络日志
SecWiki News
SecWiki News
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享
C
Cybersecurity and Infrastructure Security Agency CISA
IT之家
IT之家
Schneier on Security
Schneier on Security
MyScale Blog
MyScale Blog
李成银的技术随笔
Know Your Adversary
Know Your Adversary
人人都是产品经理
人人都是产品经理
I
Intezer
Vercel News
Vercel News
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fox-IT International blog
V
Visual Studio Blog
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
博客园 - Franky
S
Secure Thoughts
L
LINUX DO - 热门话题
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
T
Threatpost
博客园 - 司徒正美

阮一峰的网络日志

科技爱好者周刊(第 397 期):财富正在向 AI 集中 科技爱好者周刊(第 397 期):财富正在向 AI 集中 科技爱好者周刊(第 396 期):互联网通信的替代方案 科技爱好者周刊(第 396 期):互联网通信的替代方案 - 阮一峰的网络日志 科技爱好者周刊(第 395 期):软件开发的第三种方式 科技爱好者周刊(第 395 期):软件开发的第三种方式 - 阮一峰的网络日志 科技爱好者周刊(第 394 期):第二次 API 开放浪潮 科技爱好者周刊(第 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 期):《硅谷钢铁侠》摘录 科技爱好者周刊(第 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 期):最好懂的神经网络解释
How to Use AI to Handle Legacy Code: MiniMax M2.1 Upgrade Experience
阮一峰 · 2025-12-23 · via 阮一峰的网络日志

I.

Recently, I've written several AI tutorials, and I received messages asking me to talk about my own AI programming.

Today, I'll share my AI programming, which is what people call "vibe coding."

Let me clarify that I'm just a beginner in AI, not an expert. Besides not wanting to keep things to myself, it's more about sparking interest and engaging with everyone.

II.

Usually, I don't use AI to generate new projects . Because every time I see code generated by AI, I feel like it's someone else's code, not mine.

If the entire project is generated by AI, subconsciously, I don't feel like it's my project. My habit is to prefer writing the main code of new projects myself.

I mainly use AI for others' projects and legacy code., this can avoid the significant time cost of understanding others' code.

, taking legacy code as an example, (1) often there is insufficient documentation or no author explanations, (2) the technology stack and tool libraries are outdated, requiring one to search for old standards to understand the code, (3) in the most extreme cases, only the build artifacts are available without the source code, making it impossible to get started.

, AI is practically a savior for such code, capable of understanding and modifying even the oldest code, and even performing reverse engineering on build artifacts.

, Below is how I use AI to handle legacy code, which is essentially how I approach AI programming.

Three,

My AI programming tool is Claude Code. Because the command line is more convenient for me and easier to integrate with other tools.

The AI model I use is mostly domestic.MiniMax M2。Ihave testedits functionality, and it's quite good, meeting the needs, with a high ranking.

Additionally, it has a monthly price (29 RMB), making it one of the most affordable programming models, allowing for extensive use and trial-and-error. If you switch to the Claude series models that everyone is clamoring for, the 20-dollar Pro plan won't be enough, and the 200-dollar Max plan is too expensive.

The method to integrate MiniMax with Claude Code can be found in mytutorial.

Four,

As I was writing this article, MiniMax underwent a major upgrade this week, with the M2 model upgraded to M2.1.

because it's related to me, I pay special attention to this upgrade.

According to the officialrelease statement, this upgrade particularly strengthens the "multilingual programming capabilities", with specific enhancements for commonly used programming languages (Rust, Java, Golang, C++, Kotlin, Objective-C, TypeScript, JavaScript, etc.).

As a result, its WebDev and AppDev capabilities have been significantly improved, making it suitable for developing complex web applications and native Android/iOS apps.

"On the core list in software engineering-related scenarios, MiniMax M2.1 has shown a significant improvement compared to M2, especially in multilingual scenarios, surpassing Claude Sonnet 4.5 and Gemini 3 Pro, and approaching Claude Opus 4.5."

According to this introduction, its programming capabilities exceed or approach those of flagship models abroad.

This model is already launched and available for use. So, this article will just test whether the official introduction is accurate and whether its web development capabilities have indeed improved.

As for the price, it remains the same. However, the official statement that "response speed has significantly improved and token consumption has noticeably decreased" can be considered a form of price reduction.

M2.1 is integrated with Claude Code, with the following parameters.

Five.

The historical legacy project I chose this time iswechat-format, a web application, converts Markdown text into WeChat Official Account style.

On the left side of the image, enter Markdown text in the text box, and the automatically rendered result appears on the right, which can be directly copied into the WeChat Official Account editor.

It is very useful, everyone can go to try it . My Official Account now uses it for formatting, and the results are good (bottom image).

The issue is, the original author abandoned it six years ago, and the project is no longer being updated. I've reviewed the source code; it uses an old version of Vue.js and the CodeMirror editor, with no documentation or instructions, and it has been processed by a compilation tool, with all comments removed.

If you're not familiar with its tech stack, modifying this code is very difficult and may require a significant investment of time.

So let's cut to the chase and let the AI take the stage, handing over these codes to the MiniMax M2.1 model.

VI.

The first step in taking over an old project is to get a comprehensive understanding of the project.

I will first let the AI generate an overview of the project. Everyone can follow along and compare their results with mine.


# 克隆代码库
$ git clone [email protected]:ruanyf/wechat-format.git

# 进入项目目录
$ cd wechat-format

# 启动 Claude Code
$ claude-minimax

The above claude-minimax is my custom command to invoke the MiniMax model within Claude Code (see tutorial ).

Input "Generate an overview of this repository."

The AI quickly provided a detailed explanation, including the overall introduction of the project, core features, technology stack, and file structure (below).

After getting a general understanding, I will let the AI explain the code in the main script file.

Explain the code in the index.html file

It will provide the code structure and page layout (as shown in the upper figure), followed by the JS script loading order and Vue application logic, even including flowcharts (as shown in the lower figure), which I didn't expect.

Once this step is completed, you should have a good understanding of the codebase, and AI spent less than a minute.

7.

Since this model claims to have "multi-language programming capabilities," I'll let it change the project language from JavaScript to TypeScript.

For many old projects, this is also a common requirement, and the difficulty is not low.

It first created a migration plan, then generated tsconfig.json and types.d.ts, and converted each JS file to the corresponding TS file (see the image below).

After the modifications were completed, it tried running the application and found some errors (see the image below), so it addressed each error individually.

Finally, the migration was completed, and it provided a task summary (see the image below).

When I ran the application in the browser, I encountered two errors: CodeMirror and FuriganaMD were undefined.

I submitted the error messages to the model, and it quickly modified the code. This time, it ran smoothly in the browser.

At this point, the JavaScript application from years ago was successfully converted to a TypeScript application, and all internal objects now have complete type definitions.

You can also continue to add unit tests, but this is omitted here.

Eight.

The simple test is over for now. My current AI programming is about at this level, using AI to explain and modify code. I also suggest that in the future, when encountering legacy code, we should first hand it over to AI.

Although this test is quite simple and not enough to test the upper limits of MiniMax M2.1's capabilities, if humans were to do these things, it might take an entire workday to complete, but it only takes about ten to twenty minutes for it.

Overall, I am quite satisfied with its performance. As everyone can see, my prompt was very simple—it was just one sentence—but it correctly understood the intent. If it didn't succeed on the first try, it might need at most one or two modifications to get it right.

Moreover, just as the release notes said, it runs very fast, with its thinking and generation processes taking no more than two or three minutes, unlike some models that take a long time to respond.

Additionally, no matter what operation is performed, it provides detailed explanations and code comments.

In summary, based on my testing, this model's web development capabilities are indeed very strong and can be used for practical work.

Finally, let's talk about something off-topic. Famous developer Simon Willison recently said that evaluating large models is becoming increasingly difficult, "I can't identify any substantial differences between two models," because mainstream new models are already powerful enough to handle common tasks, and only by continuously raising the difficulty of evaluations can we determine their strengths.

This means that for common programming tasks of ordinary programmers, different models will not make significant differences, and there is no need to迷信 foreign flagship models; domestic models are very useful.

(End)