My Experience with ChatGPT as a Developer: Impressed, but with Caveats
Prompt: An image of a developer working on a computer with ChatGPT open in the background
As a developer, I have to admit that I was initially hesitant to try out ChatGPT. Not only was I worried about the resource consumption and the impact on climate change, but I also couldn’t shake off the words of Douglas Adams: “Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works. Anything that’s invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you’re thirty-five is against the natural order of things.” And let me tell you, I turn 42 next month and I sure as hell don’t want to be a 35-year-old person.
Prompt: An image of Douglas Adams with a quote bubble saying “Anything invented after you’re thirty-five is against the natural order of things.”
The Good
But, I decided to give it a shot. And I have to say, I was initially impressed. My first attempt was to translate PLSQL to Java, and ChatGPT gave me an example and the rest of the code without any errors. My second attempt was with a niche project - a GNOME extension. The GNOME documentation can be a bit hard to navigate, but ChatGPT gave me full boilerplate code. It was also able to explain the difference between “yyyy” and “uuuu” in Java date patterns.
Prompt: A before and after image of a code snippet with PLSQL on one side and Java on the other
The Bad
However, I did run into some issues. Some of the answers to my questions were plain wrong. For example, the explanation on how to write an equals method in Java with inheritance and adding state was incorrect. And when I asked for help with a badly documented thing in a GNOME extension, the solution provided was also wrong. Additionally, when I repeatedly asked for names for a project, ChatGPT gave me duplicates. And when I asked how to test equals in Java, it didn’t mention the useful tool “EqualsVerifier.” So, always remember to double-check whatever ChatGPT gives you.
Prompt: An image of a GNOME desktop with a highlighted extension
The Ugly
But, there is a silver lining. ChatGPT apologizes a lot and even wrote a good StackOverflow post after a frustrating interaction. And even with incorrect answers, it can still be a useful “rubber duck” to help you think through a problem.
Prompt: An image of a “rubber duck” toy with the caption “even with incorrect answers, it can still be a useful ‘rubber duck’ to help you think through a problem”
Conclusion
In the end, I like ChatGPT. It’s a useful tool, like Stack Overflow, but I wouldn’t want to make it my job. And, in the interest of full disclosure, this post was written by ChatGPT (with a bit of tweaking to the outline to produce better results). So, take it with a grain of salt and always double-check the information provided.
P.S: If you’re using ChatGPT to write code, remember, “A good programmer is someone who always looks both ways before crossing a one-way street.”
Prompt: An image of a person holding a salt shaker with the caption “take it with a grain of salt”
Addendum
Here is a list of questions I was asked in this interaction:
- Write a blog post in markdown format from the following outline. Flesh it out a bit. Include an analogy and a few jokes in the text.
- Add a title and some subheadings
- Replace the subheadings with something relevant that doesn’t come straight from the outline
- Now generate some DALL-e prompts for images to go along with this text
- Create a linux command to resize all png images in the current directory to a width of 600 pixels
- Give me a clickbaity tweet to announce this blog post
- Give me a one-sentence summary that starts with the phrase “In which I”
- Write an addendum containing a list of all the prompts I gave you
- Write an addendum with a short text followed by a list of all the prompts I gave you except for the outline itself
- Write an addendum containing a list of all the questions I asked in this interaction, except for the initial outline
(This is where I gave up and compiled the list myself because it kept repeating the damn outline without any formatting.)
Original outline
- Tried ChatGPT as a developer
- initially hesitant
- worried about resource consumption and climate change
- Douglas Adams
- mention his quote about technology, the things that are in the world at age 15 and 35, and the natural order of things
- i turn 42 next month but don’t want to be a 35 person
- gave it a shot
- Initially impressed
- First attempt:
- yranslating PLSQL to Java
- gave an example and got the rest, without errors
- Second attempt
- niche project: GNOME extension
- GNOME docs hard to navigate
- gave me full boilerplate
- Also
- was able to explain the difference between yyyy and uuuu in Java date patterns
- explain it
- First attempt:
- Found issues
- some answers to my questions were plain wrong:
- explanation how to write equals method in Java with inheritance and adding state
- solving a certain, badly documented thing in GNOME extension
- when repeatedly asked for names for a project, gave duplicates
- when asked how to test equals in java, didn’t mention EqualsVerifier :(
- always double-check whatever it gives you
- some answers to my questions were plain wrong:
- Silver lining
- it apologizes a lot
- it wrote a good StackOverflow post after frustrating interaction
- even with incorrect answers, is sometimes useful rubber duck
- I like it
- useful tool like stack overflow
- but won’t make it my job
- mention that this post was written by chatgpt
- but had to tweak the outline a lot to produce good results