Humans have value judgement. AI doesn't. AI doesn't "know" what good code even is. For something to be good, there has to be a purpose. Good is the measure of how well that purpose is fulfilled.
Humans can write better or worse code, but AI is not even in the category of things that can write better or worse code. A human needs to be there to tell bad code from good code.
* * *
Also, in my personal experience with AI code: I'm yet to see good code (but I haven't worked with people who are good at directing AI towards their goals). All code I've seen generated by AI so far ranged from "absolute garbage" to "passable". Which, most likely, reflects the ability of those who managed the tool: before they did that, their code was also atrocious. It was easier to deal with, because the velocity at which these people produced garbage didn't cause a deluge in the same way they do it with AI help.
* * *
A note on what I believe to be good code and its distribution. First of all, I agree with you on that the vast majority of code produced to date is very bad. There are many reasons for it: until few years ago the demand for programmers was smaller than supply and the industry was on course to create conditions for very bad programmers to succeed anyhow (help the losers lose less, tee-hee!). It still didn't recover from all the "paradigms" it created to support bad programmers.
Unlike in well-established fields, where you'd expect normal distribution in terms of how skillful the workers are (i.e. you'd expect very few to be very bad and very few to be very good, but most would be good enough), the distribution in programming is exponential: overwhelming majority are at the proverbial bottom of the barrel, only a few are OK, and you probably will never meet a truly good one. This defies intuition and leads us to assume that the barely palatable is the best it can possibly be. And that's, roughly, where AI is at at the moment.
Comments
This is a very misguided idea.
Humans have value judgement. AI doesn't. AI doesn't "know" what good code even is. For something to be good, there has to be a purpose. Good is the measure of how well that purpose is fulfilled.
Humans can write better or worse code, but AI is not even in the category of things that can write better or worse code. A human needs to be there to tell bad code from good code.
* * *
Also, in my personal experience with AI code: I'm yet to see good code (but I haven't worked with people who are good at directing AI towards their goals). All code I've seen generated by AI so far ranged from "absolute garbage" to "passable". Which, most likely, reflects the ability of those who managed the tool: before they did that, their code was also atrocious. It was easier to deal with, because the velocity at which these people produced garbage didn't cause a deluge in the same way they do it with AI help.
* * *
A note on what I believe to be good code and its distribution. First of all, I agree with you on that the vast majority of code produced to date is very bad. There are many reasons for it: until few years ago the demand for programmers was smaller than supply and the industry was on course to create conditions for very bad programmers to succeed anyhow (help the losers lose less, tee-hee!). It still didn't recover from all the "paradigms" it created to support bad programmers.
Unlike in well-established fields, where you'd expect normal distribution in terms of how skillful the workers are (i.e. you'd expect very few to be very bad and very few to be very good, but most would be good enough), the distribution in programming is exponential: overwhelming majority are at the proverbial bottom of the barrel, only a few are OK, and you probably will never meet a truly good one. This defies intuition and leads us to assume that the barely palatable is the best it can possibly be. And that's, roughly, where AI is at at the moment.