blog.lehtuska.com

7 Ways to Use ChatGPT

2023-08-12

Very common idea is to use ChatGPT for creating emails, tweets, blog posts and other content - especially if writing is not your favorite thing or english isn't your native language. However I personally see that there is much more potential in this.

1. Ask ChatGPT to Write a Function

Every now and then I'm building something that is far from my comfort zone. For example something with geometry, vectors and such. I just tell to ChatGPT what I will give as an input and what do I want as output, then it simply creates a function for me and explains how it works and why the function is done in this spesific way. It doesn't always understand from the first prompt, but I can iterate and give more instructions and usually it hits the correct answer in somepoint.

2. Writing (Unit) Tests

Sometimes writings tests is a struggle or on the other hand just boring task. Especially thinking good names for tests. So, I can just give my function to ChatGPT and tell it to do tests for this function. It's really good at this, not sure if I really safe any time in this, but it's a fun way to see how AI writes tests, does it figure out something I wouldn't have thought. For several times I have seen it being much better writing the names for tests than my co-workers.. or myself.

3. Am I Being Rude

There have been times when my text messages have been misunderstood by the receiver and I'm not always sure if I am actually writing in a certain way or does the reading actually have anything to do with my output. Anyways, sometimes I might write a message and before sending it I check with ChatGPT if my message sounds like rude, cold, frustrated or so. It has been wonderful in explaining emotions and structure how I should and shouldn't be writing in certain situations.

4. Nutritions and Mentalhealth

For example there is a common advice that you should eat a lot of cucumber, because it's mainly water, it helps you stay well hydrated. Once I was driving to work and started to think about this.. How does eating cucumber actually differ from just drinking water? I told my though process and question to ChatGPT, and it gave me an answer - which I think was a good one.

Another example on this was something I was thinking about how I feel and act in certain situations and I got some kind of idea what it could be, but still didn't quite get there. ChatGPT helped me with possible reasons and kinda validated my thought process.

5. Brainstorming Business or Project Ideas

This is something I usually do with a friend or on my own, but it has been a pleasure to use ChatGPT on this one. I get an raw idea of a new business or project, and I ask what ChatGPT thinks about it and what it would make differently or what more could be done. Same goes with pricing services and I also do ask just pros/cons list. Very useful!

6. Code Performance

I have used ChatGPT also for making legacy code to perform faster. Give a code block and ask it to make more performant or detect why it might be slow, and it will explain and make a suggestion how to improve or replace the code. This has been really useful with one old codebase where is VisualBasic and I'm not that familiar with VB.

7. Speech to Notes

I'm using a selfmade Telegram bot, I can speak even 20 minute long voice messages to it and it will use Whisper for speech2text conversion, then send it to ChatGPT and tell it to summarize the text and format in markdown and add to Github as an issue.

BONUS: ANTISPAM BOT

Indiehackers forum gets a lot of messages in daily basis and there is ofc as in any internet forum a lot of spam. Courtland, the founder of Indiehackers, built an antispam bot with ChatGPT. He get's a telegram message from the bot and reason why it thinks a message is spam, certainty level and then he can just approve or decline with the bot. From what I have heard in the Indiehackers podcast, it has never been wrong with detecting spam!

What is your way of using ChatGPT?