Yes, it may give you code that works, but you should refactor it right away after understanding it, to conform to your project’s design decisions and good programming practices…
I use Github Copilot recently, here are some of my thought:
AI will definitely boost developers and testers performance with pre-defined comments and sample of our code to train them.
AI cannot replace us for now because all of recommended code are just suggestion like Github message:
Spend less time creating boilerplate and repetitive code patterns, and more time on what matters: building great software. Write a comment describing the logic you want and GitHub Copilot will immediately suggest code to implement the solution.
AI need many materials to learn and provide precise suggestions. With a very specific business logic, we definitely needs human to modify and update their generated code.
I never used such tools, and I am not sure I will use them soon.
Anyway, it should be treated as a simplified Stackoverflow at yout finger tips.
It may quicly provide some boilerplate code but most of the time will not be usable as it is, so human review is a must.
And usually may not provide the optimum solution for your use case, but just generic, so code cleanup / optimization is at the coder responsability.
Aside of that, Stackoverflow will provide to you, most of the time, not a single solution.
But plenty variants
Some of them better, some of them worse.
But with explanations.
Because more minds, more options.
Beat that, AI
Brainstorming moved our civilization forward, from the begining of humanity, now you just index ourselves?
No thx!