@tvykruta: I spent years in C and C++ at Microsoft and Google and architected 100s of systems and reviewed 1000s. I smell bad code …

x.com · 2026-09-30 · by Long Nguyen ·xcom
Tomas Vykruta
@tvykruta
I spent years in C and C++ at Microsoft and Google and architected 100s of systems and reviewed 1000s. I smell bad code the way some people smell smoke. 1/ First week with Claude I thought I’d cheated the system — stuff shipped, checks went green, I went to bed early. Then every bug fix started making two new ones. Work crawled. 2/ Checkout breaks billing. Billing nukes notifications. “Quick field tweak” blows up three modules. I saw the same Spaghetti code lazy programmers have always written — Claude just writes it 200x faster. 3/ Anthropic trained a genius on a landfill of Stack Overflow and enterprise Java and called it helpful. Reach through objects. Over-DRY. Speculative hooks. Inheritance trees. One file, five jobs. God functions. 4/ Fix has been here since 1994. Anyone recognize this? 5/ Steal — paste into `AGENTS.md`: ``` # Timeless constraints (not a checklist) When two principles collide, pick the one that cuts future cost in THIS codebase. HARD RULE: refactor to the principle FIRST, then change behavior. 1. Separation of Concerns — one kind of work per part (UI / domain / persistence / infra). Root principle. 2. Encapsulation / Information Hiding — small stable contract; hide internals. 3. High Cohesion + Loose Coupling — change-together lives together; independents talk narrow. 4. DRY — one authoritative representation of each piece of *knowledge* (not every similar line). Avoid over-DRY. 5. KISS — simplest design that works; complexity is the long-term tax. 6. Single Responsibility — one reason to change. 7. Depend on Abstractions — policy doesn’t depend on details; both depend on contracts. 8. YAGNI — no speculative features, frameworks, or “later” hooks. 9. Composition over Inheritance — assemble pieces; don’t grow fragile hierarchies. 10. Open/Closed (with discipline) — extend at stable boundaries; only where change showed up twice. Honorable: Law of Demeter · fail fast / illegal states unrepresentable · optimize for deletion · Unix do-one-thing + compose. Treat as constraints. Violate slogans when judgment says so. ```
💬 26 · 🔁 37 · ❤️ 510 · 👁 52.4K
9:26 AM · Sep 30, 2026 · View on X

Replies (19)

Skynetman @Skynet_man
Anyone has a before/after comparison with this?
Anurag @AnuragD7613428
Do you have some code from pre Claude era in public that I can take a look at ?
Djenka @Djenka67
Spaghetti is to the point 😁 and here we have main misconception of all of in AI…is “I” part. There is no intelligence but big probability engine which looks like smart. Majority of code written till today is Spaghetti so AI just do what is most probable 🤷🏻
breakfastmaxi @pranavsf
nah you just suck at prompting but are a great engineer. those that can’t make it past that filter will continue to dinosaur their way aeound the industry. cope post. and also you should try codex astra high or extra high not claude (no fable for love of god) especially when you
Rolf Streefkerk @RolfStreefkerk
This is spot on, My other go to is Functional Core, Isolated Shell instea of Object Oriented Programming. That data aligned paradigm fits AI significantly better
shortestsnout @shortestsnout
Is this still a good idea to put in on opus 5.5 and the latest frontier models, or will it do more harm than good?
Venkat Ramakrishnan @flyvenkat
Interested in feeding the right code principles into these LLMs, anyone?
dasv @dasvee
Aka SOLID
Doug O. @DougO31345795
Preach
_Ombra_ @OmbraRD
Em dashes, I see em dashes everywhere. If you know you know
J.C'er @j_caseys
This is what I've been asking for! Thank you 🍿
Gregor @bygregorr
the smell still works but it fires on the wrong layer. AI bugs i've chased weren't inside functions, they lived at the seams where one prompt's context ended and the next one started
Don't Panic, V! @dontpanicv
YMMV, but from my experience - telling LLM in what to do in AGENTS.md is never enough. Nothing beat deterministic linters, tests, etc. Your post sounds like “this one thing solves all your problems”
Anderson @ItsGoharr
ai writes code like a fast intern. confident, green, and load bearing until tuesday
designgears @DesignGears
What the fail did I just read.
Nathaniel Bubis @NateBubis
It's amazing how much better AI has gotten on all of these except for YAGNI.
luckyjoez997 🍉 @luckyjoez9997
I promise, one more rule in agents.md will fix it bro
Lilith Datura @LilithDatura
Proportional to this are the cybersecurity holes that the same companies are claiming they will be able to patch. Yikes.
sss @FractalVeritas
Thank you. "First week with Claude" like months ago or today? The model is dramatically better now than it was

Comments (0)

No comments yet