AI performs better than expected

Skepticism mollified – for specific tasks

Cute robot writing code

If you’ve talked to me about AI recently, you’ll know that I’m a bit of a skeptic when it comes to AI being a panacea for the world’s problems. What between hallucinations about academic articles, many inherent biases, lack of training on obscure subjects, stuff that’s just plain wrong, enshittification … and the list goes on.

I’ve played around using AI as a coding copilot on a couple of projects, and while it’s a nice addition, I haven’t found it life-changing.

Until I asked Claude to write a WordPress plugin from scratch.

Now, I’ve played around with WordPress code in the past, but wouldn’t call myself an expert, and I’m by no means adept at either PHP or Javascript. So I was super impressed when I was able to produce a WordPress plugin in a couple of hours heavily relying on Claude, a job that might have taken me a few days to research and then do on my own. I was impressed.

It started out with a simple question that I asked ChatGPT:

I’m running WordPress 6.6.1 using the twenty twenty four theme. New posts default to the “single post” template, but I’d like them to default to the “single post with sidebar” template. Is there a way to set that default without diving into the PHP code?

Sounds a simple enough question. ChatGPT’s first response was to recommend that I install the “Default Post Template” plugin. Good solution, but there’s only one problem: there is no such plugin. Hallucination. Ugh!

So I decided to ask Claude the same question. It came back with a similar hallucination, but I decided to stick with it – and asked Claude to help me write the missing plugin from scratch.

I spent an hour and half refining my specification, and ended up with 132 lines of PHP and 23 lines of Javascript that do pretty much exactly what I want. It would have literally taken me a few days and much frustration to do this on my own.

My friend Andy Linton compared this more-than-an-order-of-magnitude improvement to the difference between walking several hundred km vs driving – but also questioned the amount of energy and water resources consumed during the process – was it really worth it?

Another friend not in the IT industry quipped, “well there goes another industry”, to which I responded no, no you have it all wrong. The thirst for IT development is truly insatiable, imagine IT projects that were backlogged for years suddenly completed in months. I don’t think anyone is going to lose their job as a developer, they’re just going to 15x (or more) productivity, with a higher resultant quality of work.

So it turns out AI is pretty good at coding, and a lot better than me especially in languages and domains where I’m not particularly experienced, but know enough to guide the process. I used to joke that I knew enough to be dangerous, but now I know enough to be actually useful. And you still need to go through the code, test it, make sure it isn’t doing anything stupid, and that it’s secure.

The bottom line is that building or modifying simple components using well-known languages and systems just got a lot easier and quicker.

Image credit: https://emojis.sh/emoji/cute-robot-behind-computer-writing-code-jGdnI4O9qh

1 Comment

  1. The more I use AI (and I haven’t used it nearly enough to be really insightful – yet) the more I am coming to think of it as a kind of idiot-savant employee. Exceptionally gifted in ways that I need to fish around to find out. Overconfident. In need of gentle but firm feedback, and the occasional challenge. But extraordinarily responsive to that feedback, and patient too.

Comments are closed.