I tend to think of AI coding more like a tool and an advanced search engine. It closes the loop of searching for info, adjusting it to my needs, and writing the code. The trick (as this article states) is that you need to give clear instructions, and have the knowledge about what a good solution might look like to get anywhere near a good result. Also clearing or starting new prompts for smaller problems in the code might be helpful because the bigger the history gets, the more the model might be confused about what you want it to solve.