Show HN: Huzzah – a novel approach to coding with AI
Show HN: Huzzah – a novel approach to coding with AI
Show HN: Huzzah —— 一种利用 AI 编程的新颖方法
If you’re a software engineer like me, the first few months of 2026 were incredible. Coding agents suddenly became good enough that we no longer needed to manually write code. But if you’re like me, then sometime later you hit a wall. The honeymoon period ended, and the novelty wore off. No more dopamine hits. It’s August, and I feel utterly fatigued. 如果你和我一样是一名软件工程师,2026 年的头几个月简直不可思议。编程智能体(Coding agents)突然变得足够强大,我们不再需要手动编写代码。但如果你也像我一样,过了一段时间后就会遇到瓶颈。蜜月期结束了,新鲜感也消失了。多巴胺不再分泌。现在是八月,我感到极度疲惫。
To be honest, I’m sick to death of writing longform English to describe every change I want to my codebase. However, I also don’t want to go back to writing all my code manually. There was real tedium in that practice that I’d prefer to avoid for…well, the rest of my life. And yet, I sense that I need to have better insight and control over what my code is doing. I want to know that my output is high quality, reliable software. I want to feel good about myself as a professional. So I’m trying to find a way to have my cake and eat it too. 老实说,我厌倦了为了描述代码库中的每一个改动而撰写长篇大论的英语。然而,我也不想回到手动编写所有代码的日子。那种做法确实枯燥乏味,我希望在余生中都能避免它。但同时,我感觉到我需要对代码的运行有更好的洞察和控制。我希望确保我的产出是高质量、可靠的软件。我希望作为一名专业人士能感到自我满足。所以我正在寻找一种两全其美的方法。
My problem with coding agents is that There’s no reliable record of human intent. Prompts are discarded, and the code may or may not have been generated by AI. We’ve lost the central authority that expresses what the human wants out of the machine, and I think it’s important to contend with that fact. AI chats are imperative, step-by-step instructions that describe changes to the application, not the application itself. This means instructions are often repeated, and thus consume tokens, many times over the course of development. This is inefficient. Much of natural language exists for social reasons, not informational. The average sentence is scarce in real information. Writing in this manner, to a machine, is cumbersome. 我对编程智能体的问题在于:它缺乏人类意图的可靠记录。提示词(Prompts)被丢弃了,而代码是否由 AI 生成也变得模糊。我们失去了表达人类对机器需求的核心权威,我认为正视这一事实很重要。AI 对话是命令式的、逐步的指令,它们描述的是对应用程序的修改,而不是应用程序本身。这意味着指令在开发过程中经常被重复,从而多次消耗 Token。这是低效的。自然语言的大部分存在是为了社交目的,而非信息传递。普通句子中包含的实际信息量很少。以这种方式向机器编写指令是非常繁琐的。
To address these problems, I’m building an experimental editor. I’m calling it Huzzah, and it poses an alternative paradigm for working with LLMs. With coding agents, prompts are (a) longform, (b) imperative, and (c) transient. With Huzzah, prompts are (a) pseudocode, (b) declarative, and (c) persistent. It’s easier if I just show you. 为了解决这些问题,我正在构建一个实验性编辑器。我称之为 Huzzah,它提出了一种与大语言模型(LLM)协作的替代范式。使用编程智能体时,提示词是 (a) 长篇的,(b) 命令式的,(c) 瞬时的。而使用 Huzzah,提示词是 (a) 伪代码,(b) 声明式的,(c) 持久化的。直接演示会更容易理解。
(Video demonstration omitted) (视频演示略)
Comparing fizz buzz
Fizz Buzz 对比
Let’s take a very simple example - say you want to use AI to create fizz buzz. We’ll do this twice - once with coding agents and another with Huzzah. 让我们举一个非常简单的例子——假设你想用 AI 来实现 Fizz Buzz。我们将演示两次——一次使用编程智能体,另一次使用 Huzzah。
With coding agents 使用编程智能体
You start a chat in your tool of choice, and type something like the following: 你在你选择的工具中开启对话,并输入类似以下内容:
Create a function that loops 100 times. If the number is divisible by 3, print “fizz”. If the number is divisible by 5, print “buzz”. If the number is divisible by both (like 15 for example), print “fizz buzz”. 创建一个循环 100 次的函数。如果数字能被 3 整除,打印“fizz”。如果能被 5 整除,打印“buzz”。如果能同时被两者整除(例如 15),打印“fizz buzz”。
If you need to make an edit, you’d send a follow up message to the chat: 如果你需要修改,你会发送一条后续消息:
Instead of looping 100 times, the function should take a number input and the function should loop that amount of times. 不要循环 100 次,函数应该接收一个数字输入,并循环该次数。
You repeat this process until you’re satisfied. 你重复这个过程直到满意为止。
With Huzzah 使用 Huzzah
You create a new file called fizz_buzz.hz. In it, you write a pseudocode representation, however you like. This is how I’d do it, personally:
你创建一个名为 fizz_buzz.hz 的新文件。在其中,你可以按照你喜欢的任何方式编写伪代码。我个人会这样写:
fizz_buzz()
loop 100
modulo 3 ? "fizz"
5 ? "buzz"
both ? "fizz buzz"
You save the file, and Huzzah automatically generates real code from it. If you need to make an edit, simply update your file: 保存文件后,Huzzah 会自动从中生成真实代码。如果你需要修改,只需更新文件:
fizz_buzz(n)
loop n
modulo 3 ? "fizz"
5 ? "buzz"
both ? "fizz buzz"
When you save the file, Huzzah captures the diff and uses it as the prompt to the LLM. The affected source code is thus regenerated. 当你保存文件时,Huzzah 会捕获差异(diff)并将其作为提示词发送给 LLM。受影响的源代码随之重新生成。
Some other examples
其他示例
To give you a better sense for what this could look like in other scenarios, here are some alternative examples. 为了让你更好地了解它在其他场景下的样子,这里有一些替代示例。
1. Shopping cart 1. 购物车
list cart
inventory mock_data = // include some mock data
init()
inventory.fill(mock_data)
add_item(id)
cart.add(item by id)
remove_item(id)
cart.filter(item by id)
checkout()
return cart.sum(item by price) and format as price
2. Todo List 2. 待办事项列表
Todo {
id: int
text: str
completed: bool
}
add_todo(text)
todos.add(text, completed = false)
toggle_todo(id)
todo = todos.get by id
todo.completed = NOT .completed
remove_todo(id)
todos.filter by id
Benefits
优势
You should be able to see some benefits already. Notice how much more terse and readable the pseudocode is than the longform prompts? Here are some more: 你应该已经能看出一些优势了。注意到伪代码比长篇大论的提示词简洁且易读得多吗?以下还有更多优势:
- Writing prompts this way engages your mind, because it feels much more like you’re designing the shape of the code. 以这种方式编写提示词能调动你的思维,因为它更像是你在设计代码的结构。
- You can be as terse or as verbose as you like. 你可以根据需要选择简洁或详尽。
- The pseudocode acts as developer documentation because a human wrote it to express their intent. 伪代码充当了开发文档,因为它是人类为了表达意图而编写的。
- You could write a language agnostic pseudocode and use it as the basis for multiple language or environmental targets. Think complex algorithms, like a CRDT. 你可以编写与语言无关的伪代码,并将其作为多种语言或环境目标的基准。想想复杂的算法,比如 CRDT。
Caveats
注意事项
There are no silver bullets, of course. Some exceptions: 当然,没有银弹。一些例外情况:
- It’s entirely possible that there are issues with this approach at scale. 这种方法在大规模项目中完全可能存在问题。
- This is obviously more ideal for new codebases than existing ones. 显然,这对于新代码库比现有代码库更理想。
- If you lack domain expertise, natural language is probably the easier interaction method. 如果你缺乏领域专业知识,自然语言可能是一种更简单的交互方式。
- Some things may be more difficult to reliably express, like cross-file dependencies. 有些事情可能更难可靠地表达,例如跨文件依赖。
- LSP-type features would not be available (though this could plausibly be generated). LSP 类型的特性将不可用(尽管这在理论上是可以生成的)。
Current state
当前状态
Huzzah is actively being developed, and exists only in an experimental state for now. You can find the source code and setup instructions here. Please give it a spin and let me know what you think! Cheers. Huzzah 正在积极开发中,目前仅处于实验阶段。你可以在这里找到源代码和安装说明。请试用一下并告诉我你的想法!干杯。