Spaghetti of choice

Never send bot to think about mans job.

Architecture does not just happen. There are incantations like 'add tests'. There are AI assisted code reviews - where two bots fight it out, while you watch in amazement. There are good tools like detect-dupe (use it, abuse it). If you do a lot of that u'll end up with something somewhat useable, and a prayer. Pray it never breaks. Pray u never have to debug it. It will and u will.

Good design is god-like. I just need think about it a little. I have a lot of experience on the subject. I've seen it before. Done it 1000000 times. Shipped 100500 games with that exact system. Everything performed flawlessly every time. Just don't wake up.

In reality it just may be new. Or it may have taken team of 30 people last 19 years to get it somewhat right. I think about it and all I get is spaghetti. With meatballs. But I need that system. I wants it. My precious.

So I let the architecture just happen. I use incantations. I let the bots fight it out. I do it a lot. But now, now I got a spec in form of tests and benchmarks. Tests are your spec.

Now I have those noodles - and they tend to form hairballs, shapes, stick to certain meatballs. Now I have a decision to make. There are three good ones.

First one is just to throw it all away and start over with better idea. Its 2026. If its not looking good - please, do exactly that. Rolling that ball of shit in front of u is negative time. Its never been your precious anyway.

Second is to throw the code away, and write new one to spec. It may happen. Sometimes the shapes become obvious. Everything is illuminated. By all means, go for it. Design upfront. Rewrite. Its not going to take a year. It may be done before your weekly tokens run out on that one account. If it dawned on u - ride that luck to sunset.

Third is to start pulling on those threads. By that time there are some obvious shapes and they can be organized into structure. Whats left becomes more obvious, easier to read. It usually starts making sense and opens more refactors. It gets to the point where u can actually understand it, debug it, and maybe, just maybe, actually consider shipping it.

The last one is not new. Its just never been good idea to spend that much time writing and supporting spaghetti. Only now its no longer that much time and god forbid u actually ship it in that form. Treat it as a means to design. By god get experience out of it, without wasting years. Learn something. I sure did.

From macro hell →