推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
AlanZ1997
V2EX  ›  Python

这 AI,让他帮我改个算法,好家伙把我关键代码给我误删了!

  •  
  •   AlanZ1997 · Aug 6, 2025 · 3680 views
    This topic created in 454 days ago, the information mentioned may be changed or developed.

    让他改个算法代码,把我代码给删错了,导致整个工程出现不可控问题

    10 replies  •  2025-08-07 18:52:37 +08:00
    even77
    even77
    Aug 6, 2025
    1
    也遇到过,只能善用 git ,以及每次都告诉它不要随意修改其他代码
    itechify
    itechify
    Aug 6, 2025
    2
    改一下提交一次
    ferock
    ferock
    Aug 6, 2025 via Android
    3
    1. 最小修改原则
    2. 每次修改都要进行单元测试
    3. 每次确认修改完成都要有 git commit
    xuelang
    xuelang
    Aug 6, 2025
    4
    这个正常啊。。 测试 + git 版本控制
    niboy
    niboy
    Aug 7, 2025
    5
    1. git
    2. 如果是 cursor 或者 codebuddy 的话,有回退到某版本的功能。其他的 AI 我还没发现。

    我也遇到过被删代码,莫名其妙删掉不相干代码的那种,文件内容被删除一部分概率大一点,几个文件被删遇到过一次。那种长时间调试没有在 git 里的,可能只能用 vscode 的 timeline 功能一个个按时间回复了
    AlanZ1997
    AlanZ1997
    OP
    Aug 7, 2025
    6
    @ferock 👍🏻👍🏻好的,主要自己项目,没有控制这么死,有时候就写点小 demo 玩玩
    AdminZ
    AdminZ
    Aug 7, 2025
    7
    这算什么,用 cursor 的 gemini 模型时把我本地代码的测试数据库清空了,毛都没了,由于没有 git ,还原都还原不了
    hikarumx
    hikarumx
    Aug 7, 2025
    8
    每一轮对话完了(代码改完了)都要提交 git 。血的教训。
    AlanZ1997
    AlanZ1997
    OP
    Aug 7, 2025
    9
    @AdminZ 那你比较惨,默哀一下,我用的是 trae
    iorilu
    iorilu
    Aug 7, 2025
    10
    正常的, 所有配合经常 git 提交很重要

    一旦确认做了有效修改, 马上提交
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4227 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 01:07 · PVG 09:07 · LAX 17:07 · JFK 20:07
    ♥ Do have faith in what you're doing.