Over the weekend, I was reminded of how both great and frustrating AI-assisted coding can be.
It started with a simple spark of inspiration. I wanted to recreate some basic functionality for daily standup updates, shoutouts, and polls. At past companies they paid for apps to do these types of things, and I found that I've missed them when they weren't available. I didn't need the heavy, kitchen-sink versions of those enterprise apps; I just wanted a lean, highly focused tool. It felt like the perfect candidate to whip up quickly with an AI assistant.
I was right, it was quick. I got the basics of my Updates app built and deployed over a couple of days. But as these things often go, my scope expanded. As someone who builds and self-hosts a number of distributed apps, I’ve never quite prioritized a fully automated deployment pipeline for my personal infrastructure. Whenever I deploy, I usually end up painstakingly hand-typing private keys and passwords directly into the deployment environments. It’s a pain, especially when I just need my applications to be able to call each other's APIs securely.
I remembered a useful internal web service at a former company that managed environment configurations elegantly and simply (and based on the code namespaces, the founders had found it so useful they had copied it from a previous company :) I figured I'd throw AI at that problem too, and see if I could build my own lightweight Configuration Manager. Once again, the AI delivered. By the end of the weekend, I had a working Updates app and a functioning Configuration Manager (that I plan to open-source for developers who want a simple solution without installing a massive, bloated platform).
A complete success, right? Well, not exactly.
When I spun up these projects, I provided the AI with incredibly clear architectural guidelines. I wanted the codebase structured cleanly from the outset to avoid "AI slop." that we all know and love. I used some skills, gave the agent clear guidance through skills and prompts, and bootstrapped the systems. Things started off perfectly. But as anyone who has spent decades building software knows: entropy always wins.
Despite my prompts, guardrails, and structural rules, as the codebase grew, the AI began taking shortcuts. It started slapping things together in the quickest, most direct way possible. Before long, the clean architecture I envisioned had deteriorated right back into a tangled mess of AI slop. I saw it happening, and I intentionally put it off for a bit to get the full set of features I wanted implemented so I could take a look at what I had ended up with before doing any premature refactoring, but once I got there, that is where the story turns around. AI came to the rescue of its own mess.
Armed with my original architectural principles and my long history in software engineering, I used AI to systematically refactor the codebase. I guided it to untangle the tightly coupled logic, scattershot business logic, and bizarre layer bindings, and start restoring structural discipline. The result? The code is getting much better. It’s still not exactly where I want it to be, but we reached a vastly improved state much faster than if I had refactored it all by hand.
This weekend solidified my perspective on the true "sweet spot" for artificial intelligence in software engineering. AI is phenomenal for two distinct phases:
- Bootstrapping: Getting a project off the ground quickly and easily.
- Refactoring: Saving a tremendous amount of typing time and heavy lifting during large-scale code transformations.
Ultimately, AI is a powerful tool to accelerate engineering efforts, but it doesn't replace the need for strong technical leadership. You still need the architectural vision to know when the slop is creeping in and the experience to know exactly how to guide the AI to clean it up.