I wrote 1,690 lines with AI in 7 months but rewrote: Why does AI write functions but not architecture?
A developer used Claude's full-time "atmosphere programming" for 7 months to build k10s, and finally discovered that the code produced by AI had serious architectural debt - 1,690 lines of code all in one structure. He decided to write it by hand from scratch. 1020 points HN hot post triggered in-depth reflection on AI programming model.
Core conclusion
On May 17, a blog titled “I decided to go back to handwriting code” topped the Hot List on Hacker News (1020 points). The author spent 7 months with Claude full-time "vibe-coding" to build a GPU-aware Kubernetes dashboard k10s, and finally found that all 1690 lines of code were crammed into a "god object" structure - a 500-line Update method, countless nil cleanups and branch nesting.
The core problem is not that AI cannot write code well, but that AI is good at writing functions, but never designs architecture. This discovery sparked widespread discussion among the developer community.
Key Points
- Time of incident: 2026-05-16 / HN hot discussion 2026-05-17 -Affected objects: All developers using AI programming tools (Claude Code, Codex, Cursor)
- Core change: The community begins to realize the hidden costs of "atmosphere programming" - the faster functionality is delivered, the deeper the architectural debt accumulates
Background and trigger events
The starting point of this story is a developer named shvbsle. In September 2025, he decided to make a GPU-aware Kubernetes dashboard k10s (similar to k9s, but designed for NVIDIA clusters).
The first few weeks are the "magic moment": Use Claude's prompt "Add a Pod view with real-time updates" and it will take effect immediately. Resource list, namespace filtering, log streaming, Vim shortcut keys - the basic functions were completed in 3 weekends.
But problems started to emerge after adding the GPU fleet view. When he switches back to the Pod view, the table becomes blank and the live updates stop. Other views begin to show "ghost data" - the cache of the previous view pollutes the display of the current view.
After investigation, we found: All 1690 lines of code are in a structure. UI components, K8s clients, per-view state, navigation history, caching, mouse handling - all crammed into one God Object. The single Update method was 500 lines long, relying on switch-case and manual nil cleanup (he counted 9 handwritten m.logLines = nil) to maintain a semblance of normalcy.
Key Impact (by Dimension)
| Dimensions | Change | What it means to us | Recommended actions |
|---|---|---|---|
| Code quality | AI-generated code lacks architectural design | Short-term high productivity, long-term refactoring costs increase exponentially | Add architectural constraints to CLAUDE.md |
| Development speed | Extremely fast in the first 3 weeks, but the growth rate returns to zero after the fourth month | Speed comes from function accumulation, not design accumulation | The handwritten architecture skeleton is then filled in by AI |
| Maintenance cost | 9 manual nil cleanups, 500 lines of switch-case | Multiple modifications involved for each new view | Implement View trait isolation for each view |
| Human role | Developer degradation prompt word auditor | Losing the sense of architectural control of the code | Full code review once a week |
Adaptation suggestions
- Write the architecture first, then write the functions: Put the specific interface definition and ownership rules into CLAUDE.md so that AI can see it every time.
- Insist on view isolation: Each view implements an independent trait and prohibits direct access to state between views.
- Weekly Code Review: A complete architecture review every 7 days.
- Limit the scope of a single session: Close the session after each function is completed, and start the next one in a new context.
Go deeper: Why AI doesn’t write architecture
The large language model is a "cloze" machine, not a "system design" machine. When you say "add a GPU fleet view", what LLM sees is similar patterns in existing code → Copy → Adapt → Insert. It doesn't stop and think about "what kind of view abstraction layer does this code base need?"
The deep insight of this blog is this: AI can write large amounts of code that perfectly performs a single function, but it cannot foresee how the interactions between these functions will evolve into complex systems. This is not a problem that the prompt project can solve.
Tool entry
Claude Code, OpenAI, ChatGPT, DeepSeek, Cursor
Reference link
- Original text: I'm going back to writing code by hand
- HN Discussion: 1020 points
Internal link guidance
- Want to learn how to correctly use AI programming tools to build automated systems? See: Claude Code automated writing practice: build an AI content production pipeline in 30 minutes
- Real case: Someone used Claude Code to start a business in 48 hours, and achieved a monthly income of $9,000——Claude Code 48 hours to start a business: one person + US$29 monthly fee, monthly income in 3 months $9,000 in 3 months
- Another perspective: Use DeepSeek V4 to replace Claude to run code agents, saving 90% of API fees - DeepSeek V4 vs Claude Code: 90% Cheaper, Same Quality
Topic hub
AI Coding Tools Hub (2026)
From Copilot pricing changes to Claude Code + DeepSeek cost-saving setups—one place to compare tools, read explainers, and follow tutorials.
Explore AI Coding Tools Hub (2026) →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
AI code review & spec-driven agency
Offer migration consulting as Copilot pricing shifts
Claude Code 48h Micro SaaS
Validate products fast with a low-cost agent stack