I would never trust ChatGPT, but I can see it being useful to help people learn to program. Although admittedly the old fashioned way of buying programming books, learning by doing and watching tutorials + reading stackoverflow discussions is just as useful.