Productive Uses of chatGPT

Just for kicks, I entered this prompt into chatGPT:

I am writing a javascript web app. It uses the framer-motion library. I have an array of reasons that looks like this:

const reasonsToTalkToANurse = [
“When you need to find out if you should see a doctor right away.”,
“When you want guidance or advice on a rash or minor injury.”,
“When you want help managing a chronic condition like diabetes or high blood pressure.”,
“When you need guidance on medication management.”,
“When you need general advice and guidance about health and wellness.”
]

I want to display 3 reasons at a time. Every 10 seconds, or when the user clicks a button, I want the 3 reasons to fly out to the left, not all at once but one by one. And I want the next 3 reasons to fly in from the right, not all at once but one by one.

Please provide javascript code that uses framer-motion to accomplish this.

And it responded with a complete React component that did it and worked. Insane!

5 Likes

It’s useful for tons of stuff like this.

I asked it to "Please create a Javascript object with all New Zealand regions as the keys and each region’s districts as a string array, sorted North-South, including Maori macrons.

Saves a lot of googling and typing. Of course I checked it against other sources, but it was spot on.

In a Laravel PHP (uurgh!) project I was working on: “Here’s a User model… Here’s an Agency Model… please write a new Laravel migration for these two models with foreign key references”.

(I still can’t stop myself saying “Please…” though :wink: )

edit: btw, our jobs are all dooomed!

1 Like

If your job is writing code, you are doomed.

If your job is solving problems, you don’t have to worry

2 Likes

Yes, I think we’ll just make bigger, more powerful apps, faster. :slight_smile:

1 Like

I’ve been using the API to move our tests from cypress to playwright. Not perfect but combined with co-pilot it’s reasonably quick.

Sometimes I also have some json formatted text and I paste it in and say, give me just the x field in a comma separated array.

Definitely a useful companion to have. If the max tokens was higher it could be even more useful.

That’s interesting. In future, it will help us a lot.