I was on a 1:1 with Emily, one of our strongest engineers, and we were mostly venting about some of the negatives about AI these days: the crazy amount of code reviews, how the job is changing, and the last one (which is the most relevant for this post), how engineers are sometimes completely removing their brains from the equation and just delegating their entire work to AI.我当时正在和我们最优秀的工程师之一艾米丽(Emily)进行一对一交流,我们主要是在吐槽如今人工智能带来的一些负面影响:代码审查量大得惊人、工作性质的改变,以及最后一点(也是与本文最相关的一点),即工程师有时会完全放弃思考,将所有工作都外包给人工智能。
(Btw, I heard that the cool kids are calling this a Meat Proxy.)(顺便说一句,我听说现在时髦的年轻人管这叫“肉身代理”。)
But anyway, the reason I decided to post about this is that Emily has a very simple framework that she uses for working with AI, which she calls the “Brain Sandwich”, that solves this. It’s both about taking full advantage of AI without letting your engineering skills atrophy.不管怎样,我决定写这篇文章的原因是,艾米丽在与人工智能协作时使用了一个非常简单的框架,她称之为“大脑三明治”,这解决了上述问题。它既能充分利用人工智能,又不会让你的工程技能退化。
The idea is very simple, and can be summarized by: whenever you work on something, you should use:这个理念非常简单,可以概括为:无论你处理什么工作,都应该遵循以下步骤:
- Your brain, and then先用你的大脑,然后
- AI, and then再用人工智能,最后
- Your brain用回你的大脑
Explaining a bit more…详细解释一下……
Before you tell the agent to start building anything, you go there and read and understand it first. 在告诉智能体开始构建任何东西之前,你需要先去阅读并理解它。
You don’t need a complete implementation plan, but you need a rough idea of where you’re going. Otherwise, AI can bias you in the wrong direction. Or even worse, it can nudge you into building something that wasn’t even a problem you needed to solve in the first place!你不需要一个完整的实施计划,但你需要对目标有一个大致的构想。否则,人工智能可能会引导你走向错误的方向。更糟糕的是,它甚至可能诱导你构建一些根本不是你需要解决的问题!
Now that you have all this context, that’s the time to bring AI. By all means, do it. Fully delegate this part with no shame! And when the agent brings you the solution, you will know if it’s right, or if it’s too much, or if it’s completely solving the wrong problem, etc.现在你已经掌握了所有背景信息,是时候引入人工智能了。尽管去用吧,完全不必为此感到羞愧!当智能体给出解决方案时,你就能判断它是否正确、是否过度设计,或者是否完全解决错了问题等等。
Then, at the end, your brain comes back. Because before sending your stuff to other people for review, you need to make the work reviewable. Read the diff, check if the complexity is worth it in this case, improve the freaking PR description, etc. The rule of thumb is: if you can’t explain what’s changing and why, it’s not ready for someone else to take a look.最后,你的大脑再次登场。因为在将成果发送给他人审查之前,你需要让工作成果具备可审查性。阅读差异(diff),检查在这种情况下复杂性是否值得,改进那该死的 PR 描述等等。经验法则是:如果你无法解释正在修改什么以及为什么要修改,那么它还没准备好让别人查看。
