I've tried getting chatgpt and others to write code for me but it just seems to get confused about most everything once you get past the "write a function that does X" and X is some well known thing. Mostly I use it to suggest me a bunch of different ways to solve a problem so I can do research while I think about it. And I've been using it on an R library I'm developing and it ends up being a crutch. It's like following your GPS around. You will get somewhere but you'll never learn how to get there.