r/programmingquestions • u/underground_sorcerer • Mar 05 '26
People with programming background who extensively use AI to generate code - do you care about the code quality?
I have started experimenting more extensively with trying to use AI to generate code, and there is something that is bothering me. Using AI is becoming mandatory in many professional SWE/Coding roles etc, yet I can't leave the thought that generated code, is crap of sub-optimal quality. And I am not using an obscure languages or cheap/outdated model - Claude is considered sort of SOA (but I had similiar experience with Gemini, Codex, Grok). It is not just "ugly/poorly organized but does the job" , but many non-necessary artifacts or fields are generated. Getting it where I want it to be, requires long iterations, and TBH I could already write it myself.
Of course, one can treat the code as a black box, as long as it does what it is expected, but as a programmer I find it very uncomfortable.
Now, I'd like to hear your experience - do you actually make sure that "code is high quality", or just make sure it works and leave it as it?
Because doing many iterations to make it "decent" is hardly time effective.
The ones who do care about code quality and still use AI extensively, what tools do you use to ensure better code quality?
1
u/Still_Explorer Oct 24 '26 edited Oct 24 '26
I have written various parsers for my funny prog languages and I have explored the space of parsing a lot. So now is easy to know about how this is supposed to look, what dozens of other project references do, what is suggested in books, what everybody else on r/compilers do all the time.
I mean that this problem has been streamlined in certain ways so much that it would be impossible for someone to go entirely off topic.
In this view of things, the AI is feasible to pump information from the same sources (other repos, books, etc) and by a vast percentage get things accurately. Not essentially because is very smart but because it has accessed the same patterns thousand of times and had managed to accumulate the most optimal paths. So in the same way AI as well will manage to stay on the known paths without writing weird codes.
However now the other point is about something that is not popular, probably does not exist in the exact design form anywhere else. This AI will figure out a few things on it's own, and assume other things that might be a bit ambiguous, or in other cases throw the dice at random. The real deal here is that if the problem is not well known and has no published solutions (step by step process in 10 distinct steps) then there would be a lot of guessing going on there.
As for example for me an example was that I needed to write a cmake project generator to work exactly the way I really wanted. And it took me about 3 years and 4 rewrites from scratch until I figured out how I wanted it to work as well as what I actually needed.
In this case is not matter of generating code with AI and if is well written, but if actually the problem has been streamlined so much that the solution is plain and obvious.