DEV Community

Cover image for What's a cool concrete meaningful thing that you have done with ChatGPT?
Jean-Michel 🕵🏻‍♂️ Fayard
Jean-Michel 🕵🏻‍♂️ Fayard

Posted on

What's a cool concrete meaningful thing that you have done with ChatGPT?

I am late to the ChatGPT train because I dislike the many charlatans who are overselling. LinkedIn is especially full of them.

Even worse are the charlatans who do their best efforts to manufacture irrational fears

😱 AI will replace us! 🤥

But I've also seen a friend using it for content creation. And he is very much not carelessly trusting ChatGPT. He is using it expertly after being trained to ChatGPT, he treat ChatGPT like an intern, to go faster in a domain he is already an expert of.

So now I think that concerning ChatGPT we are at the same time in the Peak of expected inflation and in the Slope of Englightenment phrases of the Gartner Hype Cycle.

And you?

What's a cool concrete meaningful thing you have done with ChatGPT?

Feel free to {% embed xxx %} an article you have already written.

Top comments (38)

Collapse
 
ben profile image
Ben Halpern

This isn't really what's being asked, but I've used ChatGPT to write short stories for my pure personal enjoyment. Like — I pitch it some characters and then read what it gives me, and then if I like it, I'll ask for sequels to the story, etc.

I spend enough of my brainpower with generative AI trying to project into the future, understand the maximum impact, project concern or optimism, etc. But this activity is just for fun in a way I genuinely find to be a lot of fun, and I try not to overthink it.

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

Doing things just for fun is always a good idea.
I've heard a whole operating system was started this way.

Collapse
 
ariasdiniz profile image
Aria Diniz

Honestly, I was a late adopter of ChatGPT too, for the same reasons you pointed out. I've been using it for around a month, and despite it being a really impressive product, it isn't worth all the hype and fear mongering that people are attributing to it. I'm a physicist, and more than half of the questions I asked ChatGPT in this topic were answered in a completely hallucinatory way. When it comes to code, I use it sometimes for code reviews. It makes some nice suggestions sometimes, but when it comes to code generation, I noticed that it is often incapable of generating more complex snippets. Overall, I've been using it for writing. I've always struggled with writing, so I write what I need and then ask it to correct mistakes and/or rewrite some parts. It's been helping me a lot with article and email writing.

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

Code reviews? That sounds interesting.
Can you give a concrete example?

Collapse
 
ariasdiniz profile image
Aria Diniz • Edited

Sure! For example, I have this code I created some months ago:

github.com/ariasdiniz/cpf_cnpj_too...

I just asked the following input for GPT:

do you have any suggestions to improve this code?
# Code here
Enter fullscreen mode Exit fullscreen mode

And it's answer:

Your code is generally clear and well-organized. However, there are a few improvements you could consider:

1. Avoid Code Duplication: In your methods `cpf_valid?` and `cnpj_valid?`, you are performing some operations that are very similar. You could consider factoring out the common code into a separate method.

2. Avoid Magic Numbers: Use named constants instead of hard-coded values such as 2, 11 in `generate_valid_digit`. 

3. Documentation: It's great to see you're using documentation comments, but make sure the parameters align with the actual parameters in your method definitions. For example, in `cnpj_valid?`, you've written "@param {Integer, String} cpf" - it should be "@param {Integer, String} cnpj".

4. Error Handling: It would be good to handle cases where the input to `cpf_valid?` and `cnpj_valid?` is not of the expected length.

5. Modularity: Consider creating separate classes for CPF and CNPJ operations instead of one class handling both. It could help in terms of code maintainability and readability.

Here's an example modification based on these recommendations:

# Improved snippet

In this example, the logic of checking the validity of a CPF and CNPJ has been encapsulated into the `validate` method, reducing code duplication. Also, the `valid_digit?` method has been created to encapsulate the logic of checking individual digits. Constants like `LENGTH_OF_CPF`, `LENGTH_OF_CNPJ`, `BASE_CNPJ_NUMBERS` are added to make the code easier to read and maintain. Please adjust these modifications to fit your actual needs.

Remember, any code improvements should consider its context, use cases, and future extensions. The solution above is just a suggestion and there might be other valid ways to improve the code.
Enter fullscreen mode Exit fullscreen mode

I removed the code snippets because the answer was gigantic. But it's really nice to use it in this way.

Thread Thread
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

Ok, that's really simple and interesting.
I can see that especially in the context of pair programming session where you can debate what you think of said output.

Collapse
 
lelepg profile image
Letícia Pegoraro Garcez

I've been using ChatGPT for a lot of things. First of all, is content creation. I usually ask it to write me an article about technology X, then copy it and rewrite it. Starting articles was always difficult for me, so it helps in that sense and it also usually provides me with some good text structure.

I've also used it for writing LinkedIn posts. I'm terrible when it comes to exposing stuff on social media but I had some projects that I wanted to share so I decided to try it.

But I think that where ChatGPT really shines for me is in creating examples for courses. Sometimes when I have to teach a new technology, creating examples and exercises to illustrate the concepts is not easy, so I just type something like "write X exercises using Y technology", than I choose the best ones and usually I can finish the list for myself after some ideas.

I also used it to get suggestions for naming the repository of a project I was working on. It was better than brainstorming names for hours like I usually do.

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard • Edited

That's really cool, I have an article on how to write and I give the tip to always start with a first shitty draft and nowdays you can have ChatGPT to write hat first shitty draft, exactly like you said.

Do you mind sharing an example of prompts you use for ChatGPT in social posts or in courses?

Obrigado!

Collapse
 
lelepg profile image
Letícia Pegoraro Garcez

Not at all.
For courses I usually ask for something along the lines of "write me 10 exercises of X tecnhology using Y feature". I did a little search in my ChatGPT history and here are some prompts I've actually used:

  • Write a list of 10 crud exercises using the sample_mflix database from mongodb atlas
  • Write a list of exercises of aggregated queries with the collections comments, movies and users from mongodb atlas
  • Given these mongoose models paste code here write 10 exercises using crud operations
  • Create a mongodb collection with 6 documents with the following structure paste code here

For social media, I use something like these:

  • I just finished this project where I worked with X,Y,Z technologies. In this project, I developed something. Write a LinkedIn post saying that I've finished this project and am happy for it.
  • Write a LinkedIn post saying that I've presented X talk in Y event. (Sometimes from the event name ChatGPT creates some nice descriptions)
Collapse
 
montyharper profile image
Monty Harper

I'm taking an iOS Development course from Udacity. Their first line of defense in the help department is "Udacity GPT." Basically it's a Chat GPT interface built into their website right next to the content, so I can always ask any question and get an immediate answer. I love having it there. I'm constantly asking it to define terms and tell me the difference between this and that. When my code isn't working, I can copy it in and get an analysis. Given enough context it can always figure out what's wrong. When I was learning about delegates the other day I wrote and pasted in a bullet point list of what I felt like I had learned and asked for verification. GPT confirmed my understanding and added a few points to the list.

On the flip side, GPT has occasionally contradicted itself. Often this occurs when I haven't given it enough context, or if I try to get philosophical. So you do have to take its responses with a grain of salt. I've begun to get a sense of when to trust it and when to proceed with caution. GPT is expert at correcting errors in syntax, pretty good at describing features of and relationships between various concepts, and struggles mightily with the reasoning behind things. When it answers "why" questions, it tries, and it speaks with an air of authority, but you can really start to sense that it's just cobbling together text without understanding.

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

That's super interesting, I also thought ChatGPT can be useful for accelerating learning - not replacing it - but you lay that out in concrete details.

Collapse
 
rogue_paradigms profile image
Rogue Paradigms

I'm not an avid blogger. I sometimes start some experimental projects on weekends. I rarely complete them, but when I complete them I like to write about it.

I wrote this post 2 days back. Since you asked for it, the code walk through section was completely generated from plain code using chatgpt. I proofread it and I was impressed.
The rest of it is my own, but there are few paragraphs that ai has touched.

Collapse
 
brense profile image
Rense Bakker

I tried doing some written content analysis with it, to make it do predictions and generate new documents based on some user input, but the results vary a lot. To be honest, I think existing NLP tools might do a much better job. Whats nice though is that you dont have to be a math magician to use ChatGPT... Unlike some of these NLP tools...

I dont get the whole scare either... ChatGPT is great for small direct questions like: write me a loop. But it sucks when writing code from the ground up, or even refactoring an entire project... Its pretty obvious ChatGPT is just guessing a result together, it doesnt really understand what it is doing. Imagine a random person with zero coding experience but superman reading powers. Put this person inside a library with unlimited books about coding and tell them to write an app. Thats how good ChatGPT is at writing code. It can produce the result, but it has no idea what it is doing.

It becomes more obvious when you let it generate images with faces or hands... You specifically have to tell it that humans have 5 fingers on each hand and that they dont have beavis&butthead heads :P

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

I think the scare is because the less you know about the tech, the more you can make creative impressive claims about the what the tool will do in the future, which in turns make more views.
Also it's easier to raise funds. With Venture Capitalists the principle is "If you believe it, it's not a lie".

That doesn't mean ChatGPT is not an important technology, it happens with every tech regardless of their merit.

en.wikipedia.org/wiki/Gartner_hype...

Collapse
 
bcouetil profile image
Benoit COUETIL 💫

It is amazing at starting in a field we know nothing.

I have written a Python script, a language I did not know well. I have described the journey in my article ChatGPT, if you please, make me a GitLab jobs attributes sorter

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

C'est génial, je vais voir tout de suite, merci Benoît!

Collapse
 
lucgagan profile image
Luc Gagan

I've built a model trained on Playwright documentation to answer questions by referencing the original documentation.

ray.run/ask

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

I didn't know a thing about playwright so I asked an "How to get started" question and congrats, that's indeed a cool use case to make the documentation more discoverable

Collapse
 
lucgagan profile image
Luc Gagan

Thanks!

Collapse
 
heybhansali profile image
Bhansali

if we used ChatGPT in smart way then it is very useful!

Collapse
 
jmfayard profile image
Jean-Michel 🕵🏻‍♂️ Fayard

That's the point
It is a big IF

Collapse
 
heybhansali profile image
Bhansali

😂 true

Collapse
 
balagmadhu profile image
Bala Madhusoodhanan