问HN:你有什么秘密武器来防止代码/文档/测试的腐烂?

2作者: bochoh8 个月前原帖
最近我一直在使用 cursor 来处理一些(大部分)繁琐的工作,发现它在两个方面特别有用:保持文档的新鲜度和发现测试覆盖的空白。例如,我会问它“这个函数最可能出现什么样的错误?”它会建议一些我之前没有想到的边缘情况。 不过,值得一提的是,它并不是(可能)魔法,有时会产生一些毫无意义的测试案例,因此仍然需要一些批判性思维。 我很好奇大家都在用什么方法来保持文档和测试的可维护性?你们是依赖人工智能,还是采用传统的方法?
查看原文
I&#x27;ve been using cursor lately to handle some (most) of the grunt work and it&#x27;s been surprisingly useful for two things: keeping documentation from going stale and spotting gaps in test coverage. For example, I&#x27;ll ask it things like &quot;what&#x27;s the most likely way this function could break?&quot; and it will suggest edge cases I hadn&#x27;t thought of.<p>That said, it&#x27;s not (maybe?) magic and sometimes hallucinates test cases that are rubbish so some critical thinking is still required.<p>I&#x27;m curious what y&#x27;all are using to keep docs&#x2F;tests maintainable? Are you leaning on AI or doing it the old fashioned way?