Show HN: Huzzah – a novel approach to coding with AI
I've been working almost exclusively with coding agents since January of this year, and over the past few months I began to feel utterly exhausted by them. They're great, but I'm finding it more and more tedious to write full sentences for every change I want. Not only that, but it seems there's a complexity limit for codebases - beyond a certain point the agent begins confusing itself.
I'd like to go back to writing code, but I don't want to go all the way back to fully manual coding. So I've come up with this interaction paradigm where you:
1. write pseudocode in whatever way makes the most sense to you
2. on save, the editor synchronizes your work to real source code
3. the pseudocode is persisted alongside the generated code, making your prompt effectively a stored record of intent.
It may not work for every use case, but in my initial playthroughs I've found it very enjoyable.Right now it's just a proof of concept - installation instructions are here in the readme: https://github.com/danielvaughn/hz
You can also watch a video of it in action here: https://x.com/danielvaughn/status/2090456808431165715
Cheers!
- reticulates - 1405 sekunder sedanI think you’re probably missing why it’s exhausting. The problem is not writing English, it’s the rate of change. Programming is meditative, it is a thinking process, the code you output is an artifact of your thinking. Agent-based development… there is no thinking, no meditation, you’re delegating the thinking to a machine, you’re just barking what you want at it, incessantly, endlessly.
For businesses it makes sense to abandon programming in favor of delegating to agents that can do more in less time, but for programmers, it is a loss. Either be a programmer and code, or be a delegator and delegate, you aren’t going to make the life of a delegator suck any less by trying to trick yourself into thinking you’re programming.
- avaer - 2600 sekunder sedanI think the reverse direction is more important: taking a massive complex problem/codebase and decomposing it to short pseudocode. Then you could edit the pseudocode and compile it back into the system.
That's the way software engineers working on large projects work anyway: you first gather context on the state of the system and read it at a level you can understand. Then you propose a change on the simplified representation, and then holistically update the machine-runnable format ("implementation").
I'd be interested in tools that formalize/automate this process more.
- sp1982 - 130 sekunder sedanI've settled into a habit of asking codex to write down summary of key decisions in a ledger as I end a unit of work. It keeps iterating natural but maintains a system of record on decisions in the same repo. The "ledger" is the new code.
- piterrro - 173 sekunder sedanYou could write that pseudocode as a prompt for the agent and get the same result. Use plan mode to understand what agent wants to do.
Am i missing anything?
- cpeterso - 233 sekunder sedan[delayed]
- quasarj - 3668 sekunder sedanI'm confused, it looks like you've just written a new terse language that now costs money to compile?
- bze12 - 255 sekunder sedanI like the distinction between imperative and declarative styles, but I still use imperative chat sessions to work through what the declarative plan should look like. I feel like this approach loses that.
- benmusch - 1211 sekunder sedanAre there examples of how this would work when you need the pseudocode to reference abstract application concepts?
I'm not totally convinced this is a useful way to express something like "Change the data flow so that we bulk query from the DB upfront and pass it down to all callsites"
- smicallef - 7322 sekunder sedanI’ve been thinking about something along these lines for some time. I really like the direction of this.
The challenge I see more broadly is we (as engineers now empowered by LLMs) are trying to find the right level of abstraction to operate in. Writing long form sentences and (sometime) reviewing the output feels too far away. But having an LLM work directly with you in an IDE feels too close to “the old way”.
Personally for me the approach here still feels a little too close to the lower level old way, but it’s better than the two approaches above.
Excited to see where you take it!
- NathanielBaking - 661 sekunder sedanI understand your approach and applaud it. I have been doing two things that keep me doing the parts I love. Instead of pseudo code I write in a simple managed language like JavaScript or Python. My instructions to the agent is simple. Code gets no comments. It is intentionally brief and for me at least understandable. Second. I have a document for each code file that holds the an enumerated list of rules used to develop the file - The comments if you will but in a format I can deal with line by line, just like the code. This is substantially more rewarding for me as I change both the code and the document and limit terminal interactions to must-see/do stuff.
- maxwg - 1114 sekunder sedanI'm surprised it wasn't mentioned yet, but it seems pretty similar in concept to codespeak https://news.ycombinator.com/item?id=47350931
Though catching back up on that project- it seems it's evolved pretty substantially, becoming much higher level than the initial pseudocode driven version I remember
- sadrasabouri - 494 sekunder sedanWhen the project scales, the transformation of intent into such pseudocode becomes a big deal. Having the pseudocode as an intermediate level to check agents' artifacts is interesting media, but I couldn't see how this would actually work with Huzzah tbh.
- leobg - 6633 sekunder sedanDumb question:
Why not just put an instruction into your favorite harness’ system prompt: “If I give you pseudo code, spell out my intent, and then write and test it in real code.”
- pianopatrick - 1202 sekunder sedanI think the way I would want to work with AI for web apps would be like this:
You install a fancy chrome extension or custom browser.
You go through the app on this browser. You notice something you want to change. You can then submit a prompt via this extension saying the change you want.
The trick is, the chrome extension has been following your movements through the app. This way the chrome extension can generate a lot of data the AI can use for a good prompt. I.e. The extension can get a screenshot of where you are in the app and all the pages you went through to get there. The extension can get the console logs and traces and stuff.
So with all this, the AI system gets all the material needed for a good prompt to make a good change.
In an ideal world, the AI system could then save all these details and when the change is made, guide you through the UX again. And you can check if the change was made as you wanted.
So kinda like AI flavored manual UX testing where you click around and record your findings.
- skybrian - 1341 sekunder sedanA do-what-I-mean interface using pseudocode seems like an interesting idea to explore, but perhaps it should be automatically reformatted by the AI to conform to some grammar? The idea would be a documentation standard (like Markdown), not an actual programming language.
Sometimes you might also want examples and then BDD testing software (like Yadda) might make sense?
- ryanisnan - 1447 sekunder sedanI like the direction of capturing the human intent as a durable artifact, but I dislike how you've gotten there.
Let's look at your fizzbuzz example. Unfortunately, if you wanted to have the agent implement fizzbuzz for you, it looks like, in your example, you would have to already know how to effectively write fizzbuzz. Specifically, you call out the use of the modulo.
In your prompt, for the traditional agentic development path, you already declared the intent. There is some imperative language in there, sure, "Create a function that ...", but also there is the declarative state, that doesn't require knowledge of specific programming syntax or semantics.
What I've relied on is a more formal location/syntax for acceptance criteria are in code. These are then used to generate tests, and implementations. It isn't perfect, and more investment is needed, but it starts getting at the root of the problem.
- cpeterso - 1311 sekunder sedanThis approach reminds me of PDL (Program Design Language), described in Steve McConnell's excellent book Code Complete (1993). He recommended writing code using PDL pseudocode first. People can review your PDL before you write the code implementing the PDL, leaving the PDL as code comments.
https://en.wikipedia.org/wiki/Program_Design_Language
https://codecourse.sourceforge.net/materials/Code-Complete-A...
- saejox - 827 sekunder sedanthis is a question whole software industry is trying to solve. "how can we make sense of the ai generated codebase"
what you did is spec-driven development, instead of use-cases and requirements you have pseudo-code.
spec-driven did not work in my case, likely yours suffer the same "issue of walls of text no one wants to read".
- chilipepperhott - 1555 sekunder sedanI think that this would be easy to criticize without interfacing with their underlying idea here.
It's cool that with a tool like this you don't NEED to get all aspects of your code finalized and ready. It's possible to be vague when you want to and specific when you need to.
I'm not sure if that itself would work well in practice, but the project is still quite cool nonetheless.
- madrox - 2683 sekunder sedanI think "the pseudocode is persisted alongside the generated code" just reinvented jira/linear tickets and PR descriptions. We have ways of using git and tracing the code write to the thought process behind it.
- jxf - 3536 sekunder sedanIsn't this just spec-driven development in a different language?
- Myzura - 1103 sekunder sedanIt was a very nice post, at least I learned that I was not the only one in a vacuum in this regard. I will try Huzzah and share my views under this topic.
- luciana1u - 1196 sekunder sedanthe endgame is a team whose git history is all generated commits, while the one file that actually captures intent is a terse text nobody thought to commit.
- Kinrany - 1859 sekunder sedanIf the pseudocode is precise, what you want is a compiler. Otherwise the LLM is still making decisions for you.
- TomGarden - 1026 sekunder sedanInteresting idea! I wonder if, after some iteration, a variation on this could help curb some of the LLM spaghetti mess
- mattdeboard - 1034 sekunder sedanVery insightful. The idea of using pseudocode is clever, and the persistence+correlation layer idea is great.
- nullfern - 5508 sekunder sedanHmm. Interesting idea.
What about multi-file / larger changes? How would you express files being connected, imports, and exports? Or are you thinking the hz files are disposable per change?
- rpastuszak - 2929 sekunder sedanWhat I find interesting about this + a random bucket of associations because I’ve fallen under the spell of Satan’s Lettuce:
Just a few days ago someone was talking about a machine - human patois.
This (your project) sits somewhere between Lean and BDD cucumber syntax.
At the same time Claude spits out phrases like “a container paying the price of -42px”.
Recently I was listening to a lecture about metaphor in poetry, the misconception that poems are riddles whereas we use metaphors all the time in our language because they convey the meaning more precisely.
- j_maffe - 4816 sekunder sedanI think the idea of having a human-written persistent document describing the operation of the code is a great idea. This document acts as the prompting interface instead of the chat window and changes can still be tracked. Surely something as simple as a skill.md can be made for such a setup, right? I think the pseudocode style is a seperate axis to this setup.
- r0ze-at-hn - 3364 sekunder sedan> There’s no reliable record of human intent.
Every engineer I have ever mentored got a lesson on how to write a good commit message that included this. This is exactly that.
Further Huzzah from skimming it over seems to be re-inventing documenting your code.
Together I can only surmise that the author is new out of school or has simply not yet worked on a team with good coding practices.
- gagan2020 - 1511 sekunder sedanInvented New coding language that transpile to other coding languages and saying it novel approach.
- dlandis - 4232 sekunder sedancurious if you’ve tried Kiro or spec-driven development? that seems like it would solve at least some of the issues you raised with agent based development, albeit in a different way without the emphasis on pseudo code
- paretolaw - 7017 sekunder sedanWriting fizzbuzz requires that you understand algo + you credit card, while agent requires only your credit card. I believe most of people will pick the 2nd one.
- tom_ - 7416 sekunder sedanAre we supposed to be able to read the examples with our eyes? It looks like black text on a very dark grey background on my iPhone.
EDIT: same on Firefox on my Mac (macOS Ventura).
- iloveoof - 4711 sekunder sedanThis is basically a compiler, but we’re moving up a layer of abstraction.
- florians - 2171 sekunder sedanTerse pseudo code > verbose prose
Coding Encoding Think about the terms
- visiondude - 3552 sekunder sedannot sure if the hz file artifact is needed, you can enter pseudocode directly into chat or even on an existing code file and with minor comment agents will be able to work with it. i write this type of pseudocode to existing code files often to great results.
- tamimio - 875 sekunder sedanYou are like that bad manager who will hire 10x super engineer and then stifle their work with useless policies and meetings and team building activities “to make sure the productivity are better and work is consistent and team harmony is there!!”. The whole idea of using multi billion weight model is you don’t restrict it with your limited knowledge, you only guide it and review after to make sure it aligns with your goals, definitely the model will bring new tools or tricks you never knew it existed let alone they are useful, just like that super engineer doing things on their own approach, you only guide and align to the goal, here in building your software and in the company to your business goals.
- apex_sloth - 7137 sekunder sedanDefinitely an approach worth exploring! I actually started to look into semi formal spec language like Quint because I wanted something more structured then prose, so I feel like this goes into the right direction.
- qarl2 - 1186 sekunder sedanIt takes a great deal of bravery to publish work like this. I see the comments are filled with people who have never used an agent to develop code and are quite sure this is the dumbest thing they've ever seen.
Nice work.
- user43928 - 3393 sekunder sedanI'd call this one Micropilot.
As in micromanagement.
- soulofmischief - 1438 sekunder sedanNice work!
I wrote this but as a compiler. It was ~2 years ago and local models have gotten WAY better; I was having too many issues with adherence (syntax errors, etc) and dropped it.
The compiler comes with a model embedded or can use an external model. It uses Cosmopolitan Libc and can zip things together into one binary. I will take some time to dust it off and share it.
But the idea was basically, you have your natural language source files or a one-shot prompt and it "compiles" them into a single, shareable fat binary that works across all popular platforms and architectures.
It was pretty fun to use with remote frontier models but the local model story simply wasn't good enough at the time for me to feel proud releasing it. I think that's probably changed now and passable results can be had even with small modern 7B/14B models.
- MomsAVoxell - 502 sekunder sedan> utterly exhausted
Keep your toolchain as simple as possible.
A really nice rig, which you can use in an existing repo, is to have ollama and aider simply log everything that happens in the session, through tee, into a log directory which you do - indeed - check into the repo.
> almost exclusively with coding agents
Do your own commits too (don't just let the ML do them), and in those commits, keep your prompts.
Learn to use your AI skills with succinct and calculated, forthright projection.
Which is to say, it is your own personal set of words now which define your control over your computer.
The words are tools. But what are your methods?
> .. tedious to write full sentences for every change I want .. interaction paradigm ..
Your own command of your speaking/thinking language can be extended as far and as wide, now, as you can possibly imagine. In fact, you must control AI/ML with imagination now, in multiple ways.
One of those ways is to iterate on expansion of your own ontology. There has to be an input from the AI before an adequate human output can send the AI directly at the heart of it. This improvement loop is on you. Get smarter with the loop.
> pseudo-code -> sync -> record of intent
[1] "Idea -> Description -> Result -> Build -> [human] (repeat)"
Well, I get this by checking all my aider logs into a submodule of my main source tree. All my prompts, all the happy little mistakes and bright, shiny things, commit by commit. Sure, the logs grow and grow, but you know what .. I learn a hell of a lot by reading them.
Time-stamped. So, nice graphs if I wanted them, one of these days we'll do it, me and the AI.
The commit point for where I cut the exhaustion between me and the immense power of the AI/ML tooling, is when there is a new build, and I have tested it, personally.
I get exhausted if there is no delivery factor, to me personally*, from whatever method I'm wrangling the tools with. Like if I really push too hard on the prompt, things get gnarly.
But, I've been here before over the decades, there are methods.
So .. even in the AI/ML age .. tooling and methodology requires a discipline - what is true now more than ever is that if a method fails, the usual approach of building another tool is not necessarily the best approach.
Methods can be sharpened just like tools. But every tool carries a cognitive load.
The methods are there to make that load useful.
Goto [1].
- esafak - 6986 sekunder sedanYou seem to be conflating two things: how to prompt, and how to share sessions. You can already use pseudo-code today if you want to. As for sharing, you can commit (a link to) it, use `git notes` (as I do), or a service like entire.io.
I think you should work on your differentiation. The session management stuff is the greater concern, in my opinion; pseudo code is not a novelty.
- dukeofdoom - 2572 sekunder sedanI just use a lot of folders, like folder for ever class and manager class with it and anything else. So its kind of organized by folders like plugins. Much easier to reason about. The biggest problem is the central class that glues everything is now 30 thousand lines, but its mostly repetitive delegation, init update, draw, delete. Still should be some nicer solution than having a huge class in center.
- promptspheree - 5613 sekunder sedan[flagged]
Nördnytt! 🤓