Building a PoC with ChatGPT

can I use ChatGPT to hack something together while leaving my brain to the side?

I had a couple of hours to spare this morning and I thought it would be fun to do something productive. OK, maybe not productive, but something that might make me feel productive.

I had seen people on Twitter claiming to build a proof of concept they had within a few hours with the help of ChatGPT, so I decided to test it out for myself.

Wondering a little bit about what I could build, I remembered I have been meaning to ‘print to PDF’ a few newsletters so I can read them on my iPad to make notes, etc. So this became the task:

Write a Google Chrome Extension that allows me to open and print to PDF all the articles in a newsletter via its “archive” page.

The aim was to see how far I could get if I was not technically adept.

So I started with the prompt:

how would I go around writing a simple Chrome extension that when activated opens all the links in a page

I followed the steps ChatGPT gave me. The initial instructions took a clear step by step approach, including how to add the extension to Chrome and run it. Great start.

Or so I thought….

it didn’t actually work. It was confusing commands from different versions of Chrome extension manifest. I went back and forth a few times, where I provided the error Chrome gave me, and it re-wrote a few components and I finally got to where I thought I needed to go.

I then tried to add additional features such as only selecting links with certain attributes, opening the print dialogue after you have opened the tab, and so on.

Some of this sort of worked, but on one of the steps ChatGPT managed to get itself in a loop where fixing one error led to another one and fixing that gave the original error back. I finally gave up and googled the problem which gave me the fix quickly.

Happy days.

So in summary

It worked. I was able to use ChatGPT’s help to quickly hack something together to complete a simple task. However, ChatGPT was not enough, I still had to resort to reading a question on Stackoverflow, and Chrome documentation.

Did I enjoy the process?

Not really. It is an hour later, and I feel like I have not actually learnt anything. I just copy and pasted instructions.

If I was going to code this up myself without ChatGPT I would spend a few minutes doing some googling and reading some tutorials. I might read a bit of the Chrome documentation, and click on a few questions on Stackoverflow.

During the process I would learn a lot more about building Chrome extensions, which I could reuse in later projects.

The problem is that if you really use it without getting any understanding of the underlying steps, processes and structure of the code it becomes really difficult to then debug the code without resorting to ChatGPT again.

It felt like I was a customer services person following steps provided to me by my business on how to solve a customer’s problem, rather than a Software Engineer that understood the business domain and built a solution for the problem at hand.

Would I use it again?

Potentially, if I was really desperate to put something together that I did not care about maintaining, understanding or sharing.

So were the people on Twitter right? Does it work? Kinda? But I would struggle to see how a non-technical person can pull one of these together unless they get lucky and things work via just communicating with ChatGPT (which was not the case for me). And secondly, I don’t think the person would learn much, apart from improving their prompt engineering. I don’t think individuals would or can become better engineers by using ChatGPT this way.

So going forward….

I will continue to use ChatGPT as a learning tool. For example to understand how a particular component might be written, or whether a certain action is possible. But I see little long-term benefit for using it to write a full application. It is just not productive to my goals of learning and being a better engineer.

Don’t get me wrong, I can imagine in 5-10 years time there will be a new job in the industry “Technical ChatGPT/LLM operators” who are individuals capable of building systems using ChatGPT. I am not sure that role is for me.

Hopefully there is still a place for a code monkey (as my old CEO used to call me) like myself, who is able to deliver as a software engineer with the use of various tools, among them ChatGPT or other LLMs.