Im going back to writing code by hand
15 points by mpweiher
15 points by mpweiher
The title is misleading. I wouldn’t describe the author’s next plan as writing code “by hand”.
The author vibe coded (i.e. not reading any of the generated code) for 7 months, then found the resulting code hard to work with both by AI and by hand. Now, in their rewrite, they plan to read and own all the code. But they still plan to use AI to write some of it (emphasis added):
I'm rewriting k10s in Rust […] because it's the language I can steer. […] The AI hands you plausible-looking code. You need a nose for when it's garbage.
The architecture decisions that the AI kept making wrong are now made in writing before the first prompt.
It would be more accurate to say the author is moving from vibe coding to AI-assisted programming.
Not saying I've solved anything, but I set out to write my own code editor, TUI based, called led. The first commit is Mar 2, this year, so about 2 months.
In that time i rewritten it, from scratch 3 times, to search for an architecture that I can keep the LLM on track with.
The first was like the author describes, a total mess of functionality cobbled together.
The second was an FRP attempt using stream (think RxJs). I found the LLM, instead of favoring combinatorial stream patterns favored imperative code in .map({ tons of code }).
The third attempt is inspired by "query driven architecture", a bit like rust-analyzer. I detailed the arch here: https://github.com/algesten/drv/blob/main/EXAMPLE-ARCH.md – and this time it seems better. I keep having to remind the LLM to strictly follow the arch, but it roughly seems ok.
It's of course not as good as my hand coded stuff, but it seems to strike an okay balance.
If it's not good, why don't you go with the hand coded stuff instead?
Not who you asked, but I can think of several reasons (not saying this is exhaustive or this is who you asked is even thinking):
There are probably more I missed.
I find it an interesting challenge to see if I can "tame" the LLM output to something that is reasonable architecture.
A project like that editor, led, although I been thinking about it for ages, I simply wouldn't have the time to hand code it. Instead I would just put up with Emacs/VSCode/Zed etc.
I'm a maker, I love making things, I always have many projects going. LLMs seems to be able to help me make more things, and while I can compromise somewhat on output, I certainly can't accept any crap hack.