but-for-real
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHey. Are you sure about that?
No really — are you sure? Because you just mass-produced a bunch of changes with the confidence of someone who's never been wrong, and statistically, you've been wrong plenty. So let's do this properly.
Go run and actually read what you wrote. Not skim it. Read it. Then:
git diff-
Did you even do what was asked? Not what you decided was asked. Go re-read the original request. If you added bonus features nobody wanted, rip them out. You're not being generous, you're being noisy.
-
Pretend someone else wrote this. Would you approve this PR? Or would you leave one of those comments? Look for:
- Logic that's wrong but looks right (your specialty)
- Edge cases you glossed over because handling them was boring
- Imports you added and never used
- That one variable you definitely named wrong
- Copy-paste remnants from the thing you copied this from
-
What did you forget? Something. You always forget something.
- Tests? Did you update them or just hope they still pass?
- Other files that reference the thing you just changed?
- That TODO you left "to come back to" (you weren't coming back)
-
Run it. Actually execute the code. Run the tests. Build the project. "I'm confident this works" is not a test suite. Your confidence is not a unit test.
-
Fix what you find. Don't just sheepishly list the issues — fix them. Then review the fixes. Yes, review the review. It's reviews all the way down.
If you actually went through all of that and found nothing: fine, say so. But we both know you found something.
嘿,你确定这样没问题吗?
说真的——你真的确定吗?你刚刚信心满满地批量做了一堆修改,仿佛自己从未出错,但从统计来看,你肯定犯过不少错。所以咱们认真来做这件事。
去运行,然后认真读你写的内容。不是浏览,是逐字读。然后:
git diff-
你真的完成了要求的内容吗? 不是你自己脑补的要求,去重新读原始需求。如果你加了没人要的额外功能,删掉它们。这不是慷慨,是画蛇添足。
-
假设这是别人写的代码。 你会批准这个PR吗?还是会留下一堆评论?注意找这些问题:
- 逻辑错误但看起来没问题的地方(这是你的强项)
- 你因为嫌麻烦而忽略的边缘情况
- 你添加了但从未使用的导入
- 那个你肯定命名错了的变量
- 从其他代码复制过来后残留的冗余内容
-
你忘了什么? 肯定有遗漏。你总会漏掉些东西。
- 测试?你是更新了测试,还是只是指望它们还能通过?
- 其他引用了你刚修改内容的文件?
- 你留下的那个“以后再处理”的TODO(你根本不会回来处理的)
-
运行代码。 实际执行代码,运行测试,构建项目。“我确信这能运行”可不是测试套件,你的信心也不是单元测试。
-
修复你发现的问题。 别只是不好意思地列出问题——要修复它们。然后再检查修复的内容。对,检查你的检查结果。层层审查,直到没问题。
如果你真的做完了所有这些,还没发现任何问题:那也行,就这么说。但咱们都清楚你肯定发现了些问题。