Initial Thoughts on ChatGPT and Generative AI

An Apprehensive Developer's Reflection

ยท

7 min read

Initial Thoughts on ChatGPT and Generative AI

Introduction

ChatGPT and the rise of generative AI are trending topics at the moment. Since AI affects developers I figured I'd write a piece about my early reflections on ChatGPT. This blog post will mostly be a stream of consciousness of my thoughts, opinions, and predictions on this topic so take it with a grain of salt ๐Ÿ˜… AI and its effects in the workforce are still to be seen but here are my early thoughts.

Let's start at the very beginning...

๐Ÿ˜จ Fear

When I first heard about ChatGPT and watched numerous videos on what it was capable of, I was terrified. That is not hyperbole either. I remember sitting back in my chair and sulking over how AI would take over my job. I felt dejected and that I would be obsolete in five years' time.

GitHub's Copilot had caused some anxiety when it was first announced, but this didn't compare to the panic that I felt when I saw ChatGPT work its magic. "What was the point of trying?" I thought to myself. This pity party lasted about a week before I snapped out of my funk and realized that I needed to face my fear.

๐Ÿ‚ Taking the Bull by the Horns

Instead of avoiding ChatGPT, I decided that I would give it a try for myself. Rather than dodging ChatGPT and trying to act like it didn't exist, I would "take the bull by the horns" and see what the hype was all about.

ChatGPT's conversational aspect is the feature that frightened me the most; however, it was also the part that intrigued me the most. Stack Overflow and Googling for an answer are some of a developer's top choices when it comes to finding answers to pesky bugs or solving a particularly difficult problem, so I was curious if ChatGPT would improve the feedback loop for workflows like this.

Surely it was at least worth a try...

๐Ÿฆ Work, work, work, work, work

(๐ŸŽต kudos to those who get the Rihanna song reference in the title)

Around the same time that I decided to create an OpenAI account, I was assigned a task at work to build out a chart to display a new finance metric. Data visualization (data viz) is not something that I had previous experience in, so, although it was an exciting task to get to work on, it was also a bit intimidating.

The only thing I really knew about data viz was that D3 was the de facto library that most people reached for when building charts and graphs. I also remembered hearing that D3 had a bit of a steep learning curve. Sigh ๐Ÿ˜” With no prior knowledge of data viz and somewhat of a deadline on when I needed to complete this task, I crammed hours of Frontend Masters courses at 2x speed into my brain.

After my crash course, I was now able to read D3 code a bit better than before, but writing it was a different story. I looked through numerous D3 examples with charts that resembled the one I needed to build, but the examples were so complex that I had a hard time adapting them to my use case. If only I could see a simplified example of a chart similar to the one I needed to create, then I could take that sample and tweak it to match my requirements.

If only I could generate an example...

๐Ÿค– Chatting with Robots

I was faced with a challenging task, so I figured this was as good a time as any to utilize ChatGPT. I had tinkered around ChatGPT a little beforehand, mainly asking it a few basic prompts, but nothing too serious. Finally confronted with a real problem, I was curious if it could help me get unstuck.

Prompt and response after asking ChatGPT to render a bar chart

The first couple of prompts I produced didn't yield promising results. The charts either looked wonky or fell apart once I modified the data it accepted. Eventually, I realized that the prompts you provide ChatGPT take some finessing. I needed to be less vague and more specific about what I wanted.

After some trial and error, I was finally able to get a stacked, bar chart that I could work with, albeit an ugly bar chart that didn't meet the design requirements by any stretch of the imagination. It was a starting point though! I was confident that once I had a code example that I could wrap my head around I would be off to the races and surely enough that was the case.

Once I learned that I could import the d3-shape package and leverage stacks to help with generating the chart, then I was able to move on to ask other prompts about how to set up the tick marks along the x-axis and even have it explain the code it provided.

ChatGPT explanation of generated code

This back and forth of taking the simplified code example and breaking it down into smaller pieces that I could consult with ChatGPT about continued until I was able to successfully build the chart and complete the task. I still wrote a majority of the code myself but being able to ask how to approach a particular problem in D3 for my specific use case was immensely helpful.

It was at this point that I realized ChatGPT wasn't so scary after all. In fact, I was finding that it made my job a bit easier. I felt more productive and soon found myself reaching for ChatGPT before initiating a Google search.

Talk about a 180. I went from being terrified of ChatGPT and wanting to avoid it to embracing it and incorporating it into my dev workflow. I'm still a bit shocked that I made such a big transition, but overall I'm glad I gave it a try.

๐Ÿ’ญ My Thoughts so Far

Here are some hot takes after using ChatGPT for almost two months:

  1. It's not as scary as I initially thought.

  2. Technologies like ChatGPT will be a tool in a developer's toolbox and help them be more productive.

  3. Conversing with ChatGPT is nuanced and providing the right prompt is key to getting desired results.

  4. Vet the code that is produced. Some of the code that gets generated is kinda jank, straight-up incorrect, or outdated (like the time it suggested I use floats to position elements in my CSS). Being able to decipher quality vs. not-so-bueno code is crucial.

  5. It's only a matter of time before AI tools seamlessly integrate into developers' environments. I think this will be similar to how IDE's, features like autocomplete and text formatting have weaved themselves into most developers' code editors.

โ“ Will AI Replace Developer Jobs?

This is the controversial question I see pop up all over and it's one that I have been wondering myself. My short and simple answer is: No, at this point in time, I don't think AI and tools like Chat GPT will replace developer jobs.

The world of AI and its impact on society is still new so who knows what the future holds. All I can say is after some early exposure to AI tools like ChatGPT I don't think developer jobs are in jeopardy at the moment. However, if the robots ever figure out how to create apps and build projects on their own without prompting, then I think we're screwed ๐Ÿ˜…. But if it ever reaches that point and AI got that smart, we would have larger problems on our hands.

Anyway, I guess this is a long-winded way of saying that I have no idea what the future holds for AI+ developers. All I know is that right now I'm excited to use tools like ChatGPT to improve my development workflow and move quicker through challenging tasks.

I went from being apprehensive of this tool to looking forward to using it in my daily dev work. I recommend you try it out for yourself to see what workflows it may help improve for you too.

๐Ÿ‘‹๐Ÿฝ El Fin

That's a wrap folks! I'd love to know your opinions on ChatGPT and generative AI in general so feel free to leave a comment.

If you enjoy what you read, feel free to like this article or subscribe to my newsletter, where I write about programming and productivity tips.

As always, thank you for reading, and happy coding!

P.S. The cover image was AI-generated using DALL-E 2.