Everyone can be a developer now But

November 28, 2024

..but there is still, a subtle difference between coding with AI, and relying on AI. The first is an absolutely amazing thing, whereas the second is a potentially erroneous way.

Recently I had an amazing experience of building a quiz to check the knowledge on a specific subject.

In the past, I spent some time, implementing both sophisticated and not very ones; the most challenging was probably that – https://devby.io/news/it-portret-2013-test. (I’m not sure if it works now, do not hurry up providing answers to 100 questions, you’ll probably see some “server error 500” at the end). The other was a bit less complicated but also challenging, checking the knowledge of potential Project Managers on a course that I designed and taught.

Both used Google Script, and Google Forms, which were full of data, the development took a while, and I faced sometimes even server timeout issues because of too big amount of code for a free tier. Now, I decided to go quite radically the other way and put all questions into a single HTML page driven by a JS. And, of course, I asked ChatGPT to provide me with the code.

If you decide to go my way, here is my initial prompt:

I decided to use just a ChatGPT as is, Notepad++ to get all the code together, and Google Chrome console to see how it works. It was more than enough.

Now, about the timing. Writing the prompt, thinking of what was needed, what not, what would happen next, etc, took about 20 minutes. Getting the prototype of a quiz generated by that prompt took literally a few minutes. Getting it to run with the quiz for squirrels’ life took a few minutes more, as ChatGPT did generate a full JSON, being lazy and saying “..etc”, or outputting not the whole file, but piece by piece.

However, as you may expect, ChatGPT is a very optimistic guy. It never says “no, it is impossible”, it offers various workarounds. My prompt contained one not-supported requirement (guess what?:), but the ChatGPT generated the code for it, and I was stuck a bit on why it didn’t work. The HTML code of a quiz was driven by JavaScript, and it didn’t work in a cloud environment as is, being blocked by security policies; the same was about loading the fonts. Finally, I needed to tailor it to the business requirements and apply some UX style, and here my happy flight stopped, and I had to walk the last mile on my own.

Anyway, I was more than happy with the final result, so I have one more option for quiz building, fast, effective, user-friendly, and working in any environment with no costs 🙂 The explanations of ChatGPT were amazing, even if the solutions she suggested were wrong. But, this is a completely different story 🙂