Where my mind is blown by ChatGPT
ChatGPT has recently taken the Twitter space by storm. I’ll let it describe itself to you:
ChatGPT describing itself ChatGPT is a variant of the GPT-3 (Generative Pretrained Transformer-3) language model that has been optimized for generating human-like responses in conversation. It is trained on a large dataset of conversational data, such as chat logs and dialogue from social media, to enable it to generate text that resembles the language and style of natural human conversations. ChatGPT can be used to assist in creating chatbots, virtual assistants, and other conversational AI systems.
What has also been interesting has been the use of ChatGPT for coding applications, sites.
I came across the Tweet above this morning, and decided to play around with ChatGPT after lunch. My mind is 🤯🤯🤯🤯🤯🤯🤯
The first thing I did was to type in (simplified) Chinese, to see how Chat GPT deals with a non-English language. I asked it to tell a joke. Maybe it’s me, but I really didn’t understand how the jokes were funny at all: Why can’t the pig go up the mountain? Because it is always worried it’ll be beaten to death by the hunter. Why does the duck love to stand on the grass? Because there are a lot of people sitting there. (They are equally unfunny in Chinese btw…)
Chat GPT does Chinese well, but isn’t funny The next thing I tried was to ask about Xi Jinping. Like a proper politically-correct Asian, Chat GPT refused to answer my question: so far, so accurate. 😉 But it gave good replies on factual queries.
Chat GPT refuses to comment on Xi Jinping, but can give factual explanations Chat GPT also understands German too:
A German query about the Museum Island in Berlin
Where Chat GPT really shone in my opinion, was in answering questions about code. But only for more common programming languages, as you’ll see.
When I asked a question about cron jobs, Chat GPT gave a great answer on how to use crontab, and the syntax of editing a crontab file in the Terminal:
Chat GPT also helped me to troubleshoot a Python script I had written up to organize my screenshots on my desktop. I had written this script a few days ago, and while it works, it also had a strange effect of shifting the folder containing the script into the destination Screenshots folder (which I didn’t want). I didn’t know why this was the case.
The explanation was (surprisingly) initially given in Chinese, even though my query was in English. Maybe this was due to my initial language being in Chinese:
But the revised script actually works! The comments given by Chat GPT (that I shouldn’t use os.path.isdir as a Boolean) were also spot-on (I think), and it actually helps me understand Python better. In fact, it even provide a different code, in case my intention was slightly different:
When I tried to replicate the Replit Tweet, Chat GPT did a pretty good job with the basic HTML and CSS. I copied-and-pasted the HTML and CSS from Chat GPT into my VS Code editor, ran the code, and got this:
Initial basic design and copy from Chat GPT: except for the name Dharma Digital Designs, I didn’t provide any other words! … because life is incomplete without cats… Much better I then tried to get Chat GPT to generate Clojurescript code, and this is where it tripped up badly:
It didn’t just do this once, but TWICE:
For context, Clojure and Clojurescript are Lisps, which means they rely on parentheses for the language to work. Having an open parentheses without a closing one is going to cause the code to crash like a spacecraft in space with an open hatch!
It was even able to convert React to React Native, while telling you what are the main differences:
Jury is out, but what does this all MEAN…?
A few thoughts on ChatGPT that come to my mind.
The first is the use of ChatGPT for coding.
Prior to lunch, I was musing to my wife “maybe I shouldn’t bother learning how to code!” But actually, ChatGPT and AI actually makes it easier and more efficient to learn how to code. As a budding developer, the question I asked ChatGPT about my problematic Python code felt like I was sitting down with a Senior Developer who was going through my code:
And in the longer-term, I think generative AI will actually increase developer productivity, as described here by Swyx:
The second big bucket of thoughts are around AI’s economic implications. This tweet, in particular, comes to mind:
Basically, capital (through AI) will become infinitely cheaper than labour, and I think we will begin to see factor substitution over the coming years.
This, in turn, is going to be great for small, tech-heavy and tech-savvy countries, even if they have ageing populations. I think some of the social & economic policy experiments that Sam Altman (CEO of Open AI, the creator of ChatGPT) have written about here will need to be tried and tested. And I’m guessing countries that are small, tech-savvy & less polarized will likely be able to gather the political capital to try out these policies.
It isn’t going to bode that well for large populous poor countries that are dependent on creating large numbers of jobs for economic and social stability… This is especially if these countries are already polarized by income inequality.
This is both the best of times and the worst of times. Good luck to us all.