What I use ChatGPT for
I really buy into hype and love to try the newest developer tech. So it was both natural and expected that I got hyped when ChatGPT dropped 30. November 2022.
For the first hour I used it I felt like this would revolutionize the way we code and search for information (Peak of inflated expectation, gartner hype cycle anyone?)
After the initial hype phase where I was stunned by how well I thought it worked, it got a lot of things slightly wrong. I realized it was like talking to a super confident drunk person talking about a subject they have some knowledge of (now I'm in the through of disillusionment now).
While I didn't have the insane hype I had in the start, I still explored the usage and now I find myself using it daily when I solve problems or create specific solutions.
So here is a list of what I personally use ChatGPT for.
1. Generate seed data
It's very good for generating seed data for objects. The example under is simple, but it handles complex and multiple tables very well. I also use it for generating seed data for tests, but I think copilot might be better for tests.
2. CLI commands
This is very useful. You often want to do very specific things with a CLI, and tell someone in plain text what you want to do is more efficient than reading though documentation. I almost always look at the documentation as well to not run any commands I'm not sure about.
3. Create boilerplate code
I think this is more powerful than copilot only if you are bulk generating. In this case validation through zod.
4. Locating bugs
Why does this not work? PASTE CODE
Why does this code output X? PASTE CODE
5. Use it as a intelligent rubber duck buddy
This is what I use ChatGPT the most for. I just chat to it to either rubber duck, discuss pros/cons with ideas, find solutions to specific problems etc.
6. Explore topics / solutions
If I am new to a topic I can ask ChatGPT about it. It is a great way to get a quick overview of a topic before I deep dive into it.
Prompts like "Is there a better way to do X?" or "What is the best way to do X?" are great to explore to find alternatives to explore to what I'm doing.
ChatGPT is not good at actually generating bug free code, but it is useful for generating code that is a good starting point for you to explore and learn from.
Is it a great tool?
I do not think that ChatGPT is a great tool for beginners. Personally I think one of the most important skills to have when using it is to have a intuitive sense to when ChatGPT is blabbering nonsense. And the only way to know that (The overly confident)ChatGPT is blabbering out of its ass is to have enough context about the subject, be good at reading documentation and be a certified googler to verify the information. But it is really a great addition for people who can navigate it's shortcomings.
For actual writing code, I think copilot is a magnitude more efficient.