Sunday, March 23, 2025

Chatgpt #2 - or, how to develop a simple qt/qml app with it

So I have this use-case of planning the food ahead for the week.

I figured a simple note app would do it.

But then I thougth "Screw it, let's ramp it up and go for chatgpt to do it for me!"

So I prepared a repository on github account and opened my prompt, added my requirements:

 

    Write me a Qt5/qml application;

    - that handles a list of foods

    - the user can edit and add / remove to/from the list 

    - items of the list should be able to be grouped 

    - do all low-level code via QT api's

    - add data persistence in XML file 

    - add a button that triggers randomized choice of n elements (user has to input the number) that is then displayed to the user in a separate dialog 

    - add drag-and-drop Write this all down and do a PR to the following github repo: git@github.com:tortoisedoc/topmenu.git



Seems straightforward enough, right? I decided to not ask chatgpt to add all necessary package types (ios, android, SailfishOS) in order to keep it simple..


Chat gpt's reply was very straightforward: 

Got it! I'll structure the application accordingly:

  • All low-level operations will use Qt APIs (no STL, just Qt containers and file handling).

  • Data will be stored in an XML file for persistence.

  • A random selection button will allow users to input a number and get a random set of foods displayed in a dialog.

  • Drag-and-drop support for reordering food items.

  • Push as a PR to git@github.com:tortoisedoc/topmenu.git.

I'll start implementing this. Stay tuned! 🚀


Surprised by the efficiency of it all, I smiled and was looking forward to gitrepo. However, 20 minutes in, nothing had shown...

 So I inquired about it


 and after another 10 minutes passed; I wondered if there's any technical impediment (arranging github access etc); so I asked:


And here's where I started having the feeling that Chatgpt was just screwing with me:

 

 And in fact, it started sounding like a procrastinated Junior dev:


 

At which point I figured to get busy with othre more pressuring issues.
I returned to the prompt later that day to query the status (there was still no PR on my github repo):

So it seems the hopeful github integration wasnt going to happen.
"Screw it", I thought, and falled back to a more common download approach:

Dang. So I wasked it try 

However, that failed, in that clicking on the download link didnt proof to be usefull

 

so I complaied:


but still no download link. DOH!

 

This is quite disappointing, as I was hoping to get hands on a working sample / prototype.
I am not sure if this is due to the free account; but even if it was, it would be a very bad impression from a product perspective. ChatGPT, why u fail me?

After trying a few more times, I reached my daily limit. And then it hitted me.
The system was procrastinating _on purpose_ to exhaust my daily (free) usage tier, potentially coercing me into a subscription. Very, very, very sneaky dear chatgpt!