Simplifying IT, Amplifying Knowledge

First AI success

Published on: 10 September 2024 Category: development

I finally got good source code from ai on the first try! Unbelievable, but true. And this is the resul

menu template

To be honest, I use chat AI a lot when I'm coding, but usually it's not that useful, especially when configuring any GUI. If you want to write some code, you have to specify very basic tasks and then connect everything by yourself, and then you have to hope that it works.

However, any complex tasks or GUI coding is usually absolutely useless.

Yesterday I had to make a menu for my new game for hryprodva.cz and I was really lazy, so I gave the AI another chance and today it worked. The picture at the beginning of the article is the result of the prompt:

"I need a page with a white background and a menu in the middle. The menu will be a grid, and it will be one third of the page size. it will be centered horizontally and vertically. the grid will theoretically be 3x3 tiles, but topleft 2x2 will be one big button, and the remaining corners will be rest 5 smaller buttons. The buttons should have different pastel colours and will be labelled by single UTF icons."

and I got the valid, working HTML on the first reply. Unbelievable!

So I tried my luck again. I wanted the same thing, just for an Android app, and it gave me an Android activity code, also with a Java class to handle input. And it went relatively well. Of course there are some minor problems, like the size of the button content, and also the grid covers the whole screen and not just the centre, but I think it is still enough to start with.