I like ChatGPT. A lot. It's the best digital writing assistant I've ever used.

If my time using ChatGPT has taught me anything, though, it's that ChatGPT isn't a brilliant writer. I'm not worried about my job. And if my experience using ChatGPT to write a Python program from scratch is any indication, programmers don't need to worry either.

But you should be paying attention.

This article was originally published in my Curious About Code newsletter. Never miss an issue. Subscribe here

A Promising Failure

I've been thinking about building a terminal app to practice typing for a while, so I decided to give ChatGPT a shot at building it.

This was my prompt:

ChatGPT's program is surprisingly close to what I want:

"well-commented"

It's impressive how much ChatGPT gets right here. The code runs error-free. It gets the accuracy calculation correct and computes raw speed in words per minute. It is, for all practical purposes, a functional typing analysis app.

But it doesn't color the user input as I requested:

Again, the code runs. Here's a sample execution:

That's not quite what I want, but it's getting closer. I tell ChatGPT that the program doesn't work as expected and reiterate that the colors should be applied to the text as the user types it.

Things begin to derail:

It looks reasonable, but it doesn't work:

I spent a good half an hour trying to get ChatGPT to fix its code, but things just kept getting weirder and weirder. I let it know how I felt before I closed the chat: