When AI Makes Your Code Better
Does AI automatically mean slop? A lot of ink has been spilled about vibe coding and AI slop making everything worse. The view that AI = slop is so common, it seems like the default position.
But what if AI actually made your code… better? What if AI made you better and more effective?
AI Can Answer Questions About Your Code
Point a capable AI model at your most complex workflow, and ask it questions. Things like:
“Do you see any possible bugs or issues with the code in @<file>? This is the main workflow for <some core business practice>.”
You might be surprised (and/or terrified) at what it finds.
Somewhat embarrassingly, I recently did this with the main transaction sync workflow in BudgetSheet, and it immediately found 2 issues around edge cases that had gone unnoticed by yours truly for over 2 years since the sync logic was originally written (by hand).
You can also ask things just to understand the code better, like:
“What does the
useEmptyCursoroption do in the @<file> API, and what happens when I combine that with adateStartvalue?”
Your AI agent can trace through that file and all the other relevant context in your program and can explain all the logic and possible branches in behavior better and faster than any human.
The code is the documentation for how your company actually runs. Now you can get instant answers from the primary source of truth, on demand. We live in incredible times.
AI Can Help Ensure Quality
If you care about your craft as a software developer, you can take steps to help ensure AI-written code maintains a certain quality bar. Things like:
- Add an AI hook to run typecheck after every AI change (great for TypeScript projects)
- Use context to clearly document exactly how you want certain parts of the code written and exactly where you want them put.
- Use context to instruct AI to add tests when making changes to ensure functionality works as expected and nothing else breaks unexpectedly.
- Use skills and plugins like ponytail to keep code small, concise, and focused.
- Use lefthook or husky to ensure full checks run on
pre-commit. Things like typecheck, lint, and running the full code test suite before pushing new code. - Having an adversarial AI agent scan your codebase for bugs, OWASP Top 10 issues, and other known security vulnerabilities. Some of these are even skills you can install.
There Are No Limits Now
After working extensively with AI for the past 6 months, I have been able to make many of my older hand-written codebases better than they were before. The limits and pressures of my own time being used to do it all by hand are gone. There are no more difficult trade-offs on what to extensively test and enforce vs. what not to.
Now most of my projects have:
- More tests with better coverage.
- More guardrails and automated checks.
- Fewer bugs and missed edge cases
- Better security by default
- More confidence than before, when I was hand writing and hand checking everything.
The literal opposite of “AI slop”. All because of one thing: I care. I still want to build good products.
That’s all it takes. Just care. There are no limits now. There are way fewer trade-offs you have to make.
Good software engineering practices are the antidote to “AI slop”. This is why the world still needs good software engineers and AI won’t replace them. AI augments engineers and makes them better. If your use of AI isn’t helping you make things better while also moving faster, it’s time to start asking questions.
Categories: Software