Im going back to writing code by hand

15 points by mpweiher


roryokane

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.

algesten

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.

  1. The first was like the author describes, a total mess of functionality cobbled together.

  2. 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 }).

  3. 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.