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.

From ChatGPT

What has also been interesting has been the use of ChatGPT for coding applications, sites.

> This site was built in less than 10 minutes using a few ChatGPT prompts and Replit. > > Here's a glimpse into how software development has changed forever 👇 [pic.twitter.com/sSYK4Umlm6](https://t.co/sSYK4Umlm6) > > — Replit ⠕ (@Replit) [December 5, 2022](https://twitter.com/Replit/status/1599803817515548674?ref_src=twsrc%5Etfw)
The Tweet that started it for me

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!

When I tried getting Chat GPT to do the same task (coding a to-do app, with various features) with more established languages (like Python earlier), and later with both React and React Native (both Javascript), there was no problem at all:

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:

> As a Jr developer I see it the other way. ChatGPT feels like having a Sr developer in our corner that actually has time for our questions. Making us learn and grow faster. I think this will make people hire more juniors because you don’t need seniors to baby sit us anymore. > > — taku (@T\_E\_Gwindingwi) [December 4, 2022](https://twitter.com/T_E_Gwindingwi/status/1599493686345478144?ref_src=twsrc%5Etfw)

And in the longer-term, I think generative AI will actually increase developer productivity, as described here by Swyx:

> Developers should NOT be threatened by generative AI. It's an unequivocal good. We get more time for actually valuable parts of jobs. Architecture, system design, shipping features users want. > > we're seeing "memory management is now optional" levels of productivity improvement. <https://t.co/2aC4Twc0l0> > > — swyx 🤖 (@swyx) [December 5, 2022](https://twitter.com/swyx/status/1599890745200377857?ref_src=twsrc%5Etfw)
Economic implications

The second big bucket of thoughts are around AI’s economic implications. This tweet, in particular, comes to mind:

> Unlike most people on Twitter, I’m actually using GPT3 in a production system. The mistake people are making is they are asking “how can I use this to automate a smart person’s job”, when they should be asking “what would I do if I had unlimited dumb people” > > — Zack Korman (@ZackKorman) [December 4, 2022](https://twitter.com/ZackKorman/status/1599317547509108736?ref_src=twsrc%5Etfw)

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.