The quality of the code it produces is not very good.
I have been trying this out, I can share a bit of my experiences/thoughts below:
-------
I've been writing JavaScript/TypeScript fulltime for ~6-7 years now. Day in, and day out, and I happen to love + ardently follow the progress of the language.
In the middle of my functions using "const" and "for (let thing of things)", it will try to autosuggest code snippets using "var" and "for (var i=0, i < things.length; i++) { var thing = things[i]".
There's two problems I see here:
1. Languages evolve. Newer language features that devs should be taking advantage of don't get suggested because training data doesn't exist on it yet.
2. The code quality isn't great, as you have to assume the majority of programmers are not producing the world's best code, and so that is the data it was trained on.
I saw the same thing in Java. Using JDK16, it would never suggest autocompletions for Records, or multi-line strings, or pattern matching.
If I had accepted its suggestions, what I would have wound up with, was code that TECHNICALLY worked, but was very low quality and used dated techniques.
Many things it suggests can now be solved in a few lines using recent features of languages that there isn't enough training data on. So it will never suggest them.
Code that uses older constructs is not always bad code. It almost never means the author is an idiot.
Code that is poorly readable or badly designed is bad code.
Theres not necessarily an advantage to rewriting older code with newer versions of the same because it works.
You're kind of implying that you dont write bad code. But from your reasoning all your code is bad because a newer way will replace your code.
So many opinions about code are wrong and I think you take something too seriously when it doesn't really matter. If someone uses var rather than let, that doesn't make them an idiot, it just means they're using an older construct. The difference is so unimportant that it rarely makes a difference to code understandability or readability.
Most developers go through your phase of thinking other people are idiots because they don't know something you do. But in the grand scheme of things, it makes no serious difference to code quality. That pedantic person just wastes everybody's time in a code review and spins their wheels when they could be learning to write more understandable code.
Leetcode interview questions will adapt to ask for the wrong answer. You'll have to write broken code to prove you can code better than the correct code AI can spit out.