How to use ChatGPT to write code

 One of the more intriguing discoveries about ChatGPT is that it can write pretty good code. I tested this out in February when I asked it to write a WordPress plugin my wife could use on her website. It did a fine job, but it was a very simple project. There are two important facts about ChatGPT and coding. The first is that it can, in fact, write useful code. The second is that it can get completely lost, fall down the rabbit hole, chase its own tail, and produce absolutely unusable garbage.

ChatGPT responded with a flood of text and code. Then it stopped mid-code. When I asked it to continue, it vomited out even more code and text. I requested continue after continue and it dumped out more and more code. But... none of it was usable. It didn't identify where the code should go, how to construct the project, and -- when I looked carefully at the code produced -- it left out major operations I requested, leaving in simple text descriptions stating "program logic goes here."

Comments

Popular posts from this blog

UAE's Humanitarian Aid: A Glimpse into the Mobile Hospital for Quake-Affected Afghans

AlNeyadi achieved inspiring journey for every Emirati and Arab: UAE’s Ajman Ruler

Chad receives Nimr armoured vehicles from UAE