Nobody doubts that AI is becoming much better at programming every day. And it is an established fact that, eventually, AI-powered tools will be much better than humans at coding. But machines aren't going to become independent from humans anytime soon, and being able to create useful and practical code spanning more than a few lines is something that will require a level of intelligence that is close to the famous singularity.
Programmers do not write code by hand anymore. They already employ a vast range of intelligent tools that allow them to automate their compiling efforts. And that's what AI does: It assists programmers. But a future where an artificial intelligence will be able to make all the correct decisions needed to develop software from scratch or interpret the commercial value of every feature is still extremely far.
What most of the new AI-powered tools do, instead, is to improve their accuracy and performance through machine learning. Through extensive trial and error, their neural network architectures help them become better and more precise at automating their tasks. And that's where they are better than humans: finding mistakes and fixing them. But they aren't, and probably will never be, autonomous enough to have their own "opinions" on which one is the best approach to solve a problem or generate a new feature.
Eventually, humans will move away from the job of "programmers" and will simply learn how to "herd" their machine-learning tools into becoming more efficient in assisting them. As the AI will automate a complex task that previously needed very specialized knowledge, developers will have much more time to focus on the more "human" aspects of their jobs. Humans will always be needed to fill the gaps where machines will always be lacking, such as interacting with other devs, exploring new, daring solutions to known problems or just putting their creativity to work.