AI时代老码农日常-20251210

AI辅助编程的几点小经验,分享一下:

一、让AI先出方案,确认后再改代码

用OpenAI Codex辅助编程,对于较大的逻辑改动,想不要着急动代码。先让AI出修改方案,再Review方案,并持续与AI交互,让AI修改和优化方案,直至方案Ok。

方案可行后,再让AI修改代码。

让AI先出方案,确认后再改代码
二、让AI找问题原因

把问题描述清楚,让AI分析原因。OpenAI Codex往往能够一次性精准定位到问题,并完成修改。

让AI找问题原因
三、让AI在数据方面提供帮助

不仅是代码,也可以让AI在数据方面提供帮助。例如:1)在数据库中插入、生成测试所需数据;2)模拟生成测试数据;3)其他任何与数据有关的需求……

让AI在数据方面提供帮助

Some Tips for AI-Assisted Programming, just share:

1. Let the AI propose a plan before changing your code

When using OpenAI Codex to assist with programming, don’t rush into making code changes for larger logic modifications.
First, ask the AI to propose a modification plan. Then review that plan, continue interacting with the AI, and have it revise and refine the solution until you’re satisfied with it.

Once the plan looks solid, then let the AI modify the code.

2. Let the AI find the root cause of problems

Describe the problem clearly and ask the AI to analyze the cause. OpenAI Codex can often pinpoint the issue in one shot and provide a corresponding fix.

3. Let the AI help with data-related tasks

AI can help not only with code, but also with data. For example: 1)inserting or generating the test data you need in a database; 2)generating synthetic test data; 3)handling any other data-related needs, and so on.

发表评论

您的邮箱地址不会被公开。 必填项已用 * 标注