I'm going back to writing code by hand

· ai coding · Source ↗

TLDR

  • Dev archived k10s after 234 commits of vibe-coded Go, finding AI-generated architecture collapsed under a 1690-line god-object Model struct.

Key Takeaways

  • AI delivers features per-prompt but never invents architecture; without upfront design, each feature adds branches to a single bloating struct.
  • k10s Model accumulated 9 scattered nil cleanup assignments and 20+ currentGVR.Resource == string-comparison type discriminators across one 500-line Update() function.
  • The fleet view GPU tab broke pods rendering because FleetView state was embedded directly in Model with no view isolation boundary.
  • Velocity illusion is the core trap: cheap-feeling feature additions expand scope until the codebase collapses simultaneously, not incrementally.
  • Mitigation: write architecture invariants in CLAUDE.md before any code – explicit View trait contracts, per-view keymaps, and rules banning App struct pollution.

Hacker News Comment Review

  • Commenters questioned whether a rewrite was necessary at all, suggesting iterative AI-assisted refactoring (breaking up files, requesting explanations) could have salvaged the codebase.
  • The author’s rewrite target is Rust, not Go – commenters pushed back since Go is arguably easier to audit, and the real asset is language-level instinct to detect bad AI output early.
  • Core thread consensus: CLAUDE.md constraints help, but only if architecture is designed before coding starts; skills files cannot substitute for upfront structural thinking.

Notable Comments

  • @erelong: asks why not prompt AI to decompose large files and explain the code rather than discard 234 commits.
  • @gjvc: “have another drink and drive yourself home” – sharpest skeptical note on the post’s framing.

Original | Discuss on HN