也许我们可以继续编写代码?伪代码项目
六个月前,有几个人[https://news.ycombinator.com/item?id=44940089]一致认为,大型语言模型(LLMs)在将伪代码转换为真实代码方面非常出色。我同意这个观点。此外,编写伪代码让我感到一种类似的流畅状态。甚至可能更强,因为没有编译器或解释器让我为语法问题烦恼。
现在,我构建了这个:<p>https://github.com/HalfEmptyDrum/Pseudo-Code-Flow<p>这基本上是一个Claude Code技能。你可以在.pseudo文本文件上调用它,使用/translate命令。显然,它会将伪代码翻译成你指定的语言。这听起来不错,但我还加入了另一个微妙但实用的功能:<p>*这可能是最有用的功能,根本改变了我的编码方式*:<p>LLM会建议对你的代码进行更改(设计、架构、功能等),但大致会使用你的伪代码风格。<p>我认为伪代码是最接近我脑中代码/算法表示的语义主体。当Claude用我的语言而不是Python/C++/...(这些语言有很多样板代码需要处理)回答时,这让我更容易理解。<p>告诉我你的想法!
查看原文
6 months ago a few people [https://news.ycombinator.com/item?id=44940089] agreed that LLMs are very good at translating Pseudo-code to real code. I agree. Also, writing pseudo code somewhat makes me feel a similar state of flow. Maybe even more, because no compiler/interpreter annoys me about syntax issues.
Now, I built this:<p>https://github.com/HalfEmptyDrum/Pseudo-Code-Flow<p>It is basically a Claude Code skill. You can call it on a .pseudo text file with /translate. It will obviously translate the pseudo code into your specified language. This would be nice and all, but I included another subtle but useful feature:<p>*This is probably the most useful feature and fundamentally changed my coding*:<p>The LLM will suggest changes (design, architecture, functionality, ...) to your code, but will roughly use your pseudo code style.<p>I think of pseudo code as the semantic body that is closest to how the code/algorithm is represented in my head. When Claude then answers in my language instead of Python/C++/... (which has lots of boilerplate to make it work), it resonates much easier with me.<p>Let me know what you think!