AI Writes Bad Code

ChatGPT is a new artificial intelligence that has been introduced to the world. The whole internet is in a hubub because it appears to write code. It's apparently so impressive that even Reddit is struggling with multiple threads and constant reposts of the same rehashed content.

I agree that it's cool to watch and a nifty idea on the conceptual level, but it's writing bad code. That wouldn't be a problem except that many of the impressed are suggesting this AI generated content is a resource for learning.

Have you ever read a content regurgitation page generated by an AI? You know those useless search results that come up when you're looking for instructions on how to do something? Yeah those garbage heaps. That is what the AI is generating and people are accepting the output just a little too quickly.

Of the Xojo examples I've seen, hardly any of it has actually been usable. The code specific to Xojo that it has pulled from available repositories was incredibly outdated. API 2.0 was introduced three years ago now. It uses statements that don't exist in Xojo, it adds properties to classes that don't exist (and in this example uses functions incorrectly), and when asked to abstract the idea of a class it generates code that isn't even Xojo.

Please don't suggest that this AI is a good resource for beginners. It is not.
It is incredibly dumb and providing bad results.

Code writing artificial intelligence has come before and was plagued with problems of its own. Github Copilot launched to concerns around licensing, copyright, and ownership of existing code. Is this just our relatively recent history repeating itself? Yes, I believe that AI can be bad for human creativity; and yes, code is a creative art.

My concern is more objective. I wouldn't want someone new to Xojo to fall victim to the misconception that this AI is a learning resource.

If you are looking to learn how to code there are so many resources available. Skipping your homework (and that is exactly how this AI code reads) won't help you build better software. If you are enjoying the AI recreationally, that's okay too! It is fun to watch. Please remember what I've said though.

Best wishes, and happy coding!