ChatGPT has been making waves in the tech industry for its ability to generate code based on natural language, but how effective is it really? In a bid to find out, Make Use Of put ChatGPT to the test, asking it to build a web app from scratch. The results were impressive.
To begin, they generated a blueprint for a simple chat app by describing their requirements in natural language. With the help of ChatGPT’s flowchart plugin, they had a clear blueprint for the app. They then broke down the app’s components into smaller modules, with ChatGPT suggesting splitting it into three components: registration, login, and chat modules.
The registration component was built first, with ChatGPT generating HTML code and a PHP registration script. Although the generated script had some vulnerabilities, it was relatively easy to fix by prompting ChatGPT to identify the issues and optimize the code. An SQL code was also generated to create a database for the data captured in the PHP script.
The login component was the easiest to build, and the generated login page worked without any modifications or debugging. The chat component was the final and toughest piece of the project. After generating a chat interface without a message input box, ChatGPT was prompted to include one, and after some trial and error with the messaging scripts, they had a working chat app.
While the app generated by ChatGPT had some bugs and inconsistencies, it is an impressive coding assistant that can help developers build web apps rapidly. Although it has limitations such as a limited context window, it is clear that ChatGPT has the potential to be a useful tool in the development process.
In conclusion, while ChatGPT may not be perfect, it is clear that it has a lot of potential to become an effective programming tool. With its ability to generate code from natural language, it can help developers build web apps rapidly and efficiently. However, developers should be aware of its limitations and continue to use it in combination with their own coding skills for the best results.