Thoughts on architecture and quality code with AI?
Let me start off by saying that I believe that good design/architecture and code quality are even more important with the advent of AI.
I am however hearing more and more people (engineers and not) telling me it doesn't matter. Their general belief is that as AI gets better and a bigger context these things will no longer be a factor. Also that AI could just rewrite it when we need to.
Is anyone hearing similar points in discussions or am I speaking to the wrong people?
Also, does anyone know of any wider research (apart from codescene) around this topic?
One thoughtful comment that is not AI-assisted unlocks the ability to create threads.
4 comments
Thanks for the response and the context around it as well. This make perfect sense for a reasonably well understood/explored domain.
Most of my work is backend focused where we are processing work through pipelines of microservices or fanning out to external suppliers. Which probably skews my perception of what good is and ensuring it is maintainable.
A few things:
Some model's default "stack" is just mediocre and tends to use expensive, managed stuff like Supabase and Vercel (these are great products just not the best value or best solution for everything)
Coding is at a point that leveraging a good stack or architecture advice is easy to follow e.g., define the high level principles and review the suggested architecture
I still think you need judgement and a perspective on the requirements to scale at product. E.g., if you're building sovereign only pipelines you can only use tools and things hosted in that country (that said you're doing something relatively technical if that is the requirement).
Finally, for code quality there are heaps of paid and free options but we've been using Roborev (free) and it does a great job at stopping antipatterns and slop: https://www.roborev.io/
I believe code quality and tech debt does matter. I have seen AI getting confused in legacy code with a lot of tech debt, without sufficient tests. I do give proper instructions to my agent to follow the best practices, and there are times I push back hard on its design. Though, newer generations of models are getting better and better at this. I believe all the static code analysis and other signals can also be passed as RL rewards to make the model better at producing good quality code.
I'm in the latter camp, I think models are improving much faster than tech debt can accrue, so I give a set of minimal guardrails and just let AI write / rewrite things as it prefers.
For this forum I'm using this: https://developer.chrome.com/docs/modern-web-guidance + a very small set of instructions for code quality.
I think a lot depends on the complexity of the domain, a web forum is super well understood tech and it's hard to truly get yourself into enough trouble that you can't clean things up.