I have very quickly picked up the habit of pasting snippets of my code into GPT-4 and simply asking "Why is this not working?" Almost every time, it succinctly explains the apparent purpose of the code, and how it is subtly wrong.
It's so good that I often do this preemptively to avoid a compile/deploy/test cycle.
If we're talking about generating and integrating sample code, it's great at that
Anything more advanced and it's a footgun