Cursor seems make my code worse, what is the issue?

I am trying to let the cursor to update my css class and dom to make it more visual appealing. But it seems doing the job in the opposite direction, making it more urgly.
This is what my original code looks like
Screenshot from 2024-08-29 22-31-51

Then I told cursor chat with the prompt
Can you polish the UI of the QRCodeDownload button? You can change the padding margin and background to make it visual appealing and consistent. I have already finished the code structure to let you select the image format and have a button to handle the downloading based on the selected format

This is the output UI of the code given by cursor
Screenshot from 2024-08-29 22-31-24

It looks worse than the original code, is it? Is my prompt correct?

Well, that is just not how language models work, it is expecting too much. It doesn’t actually know what it will look like, visually, try asking it to give you some ascii art, you will see, aside from ascii art that is extremely popular and straightforward like “give me an ascii art cow” it will completely mess up (If I ask for an alien, it often gives the linux penguin)

That being said, what you can try is to define better what and how you want it to look and have it do that for you. like “remove the spacing, increase the paddings on all elements, unify the colors, …”

You need to know exactly what to ask, this is important with any LLM and why all the “Create a snake game with ONE MINDBLOWING PROMPT Z0MG SO L33T” videos & articles are a total clickbait trap that hurts the industry :rofl:

If you don’t know exactly what you are asking, you are just relying on dicerolls

1 Like