Sure, you have to take all the answers with a grain of salt. But code is one area I can verify myself, so I’m less worried.
How is this helpful?
Where it is helpful is that it's way more convenient than asking a human, doing a web search, or looking it up in a book. Even if a followup question is required. In this particular case there is a lot of transferability between knowing programming languages, too, so one can filter most implausible answers even if they don't know the programming language they are asking about.