AI reminds me of all the junior developers I’ve ever worked with (including myself many times). You make a request for a feature or fix and the overwhelming confidence of the chatbot’s response has absolutely no correlation to how good the code is.
“Here’s your updated code,” it tells me, “and the results are are much more accurate, solving the validation issues you were experiencing!”
Solving my issues? With an exclamation point? Slow down little robot, I’ll be the judge of that.
What makes it worse is that one time out of ten, it never actually updated any code- it just told me that it did, but all the files were unchanged. The other nine times, yeah it wrote a ton of really solid, mostly functional code that I didn’t want to write.
This weekend I wanted a custom WordPress block. A relatively simple request, I wanted a block that showed a number, but when the number scrolled into view, it animated a count up from zero to the full value. You’ve seen this a million times on sales and marketing pages. When I searched Google, I found a dozen blocks like this, but every single one was part of some ‘block library’ that required installing dozens of unnecessary blocks. After a few minutes I did what most site builders are going to do in the future, I asked AI to build it for me.
I started with VS Code and Copilot (I really want a reason to stop paying for Cursor). I scaffolded the block myself with wordpress/create-block
so that it’d have the correct structure. I outlined what I wanted (three attributes: number, prefix, suffix) and the functionality (when it scrolls into view, the block animates from 0 to the number value).
The first shot was almost perfect. I opened it in the block editor, but it had one bad line of JavaScript that triggered an error. I passed the error to Copilot and it fixed it. The block was fine. Then I added multiple blocks on the page and it just wouldn’t work. I went around with Copilot trying to fix it, but it couldn’t solve the problem.
“You’re absolutely right!” it would say each time I told it that the animation still wasn’t working. I switched my IDE over to Cursor, went through a few rounds of chat, and Cursor couldn’t fix it. I started getting… frustrated.
Here’s the thing. The issue was never that I added multiple blocks on the page. I thought that was the change that caused it to stop working, and that’s what I told the chatbot. But that wasn’t even the issue. When I added multiple blocks, I did something else: I started using a comma for thousands values (i.e. 1,000
instead of 1000
). That was what was breaking my block.
My IDE had no idea how I was using the block inside WordPress, so it was only when I included that information that it could (very quickly) fix the bug in the block.
( Another thing AI didn’t do was add all the supports
in block.json
that allow you to style the block using the editor’s native color and typography settings. Even when I asked it to, it created nonexistent attributes, probably because all the typography settings are still __experimental
. This required me to actually *gasp* read the documentation and look at some of my other blocks I’d built. )
I hope the moral of the story is clear: human interaction is always going to be the weak point in gen-AI coding. In all software- and the WordPress editor more than most- the human interaction is the point. It’s the thing we’re creating. Nothing is fixed until it’s been battle-tested in the real world by a real user.
Ultimately AI saved me a lot of time building this block, but that time-savings was compounded by the fact that I already know a lot about building custom blocks and fixing bugs. I’m not sure what this will look like a year from now, what specific tools and workflows we’ll be using, but I never would’ve predicted this a year ago.
Links from around the web
WordPress
WordPress core has an AI team. So far, I like the direction they’re going and I hope they’ll focus more on builder/developer tooling (solving problems like the one I had above) that empower people building out the platform, because I really don’t need another mid-level content-generating chatbot inside another piece of software.
After a sizable break, Automattic (my employer) is resuming contributions to WordPress core again. I won’t get into the politics or drama surrounding all of this, but I will say that after a few months on the inside, and just as a WordPress user, I think the pause was much harder and much more valuable for the project than I was expecting. My theory is that we’ll look back on it as a positive turning point in the project.
WooCommerce
Tomorrow will mark my fourth month since joining the team WooCommerce. There’s been too many interesting things to write about, but related to today’s topic, I helped the team publish some new AI tools for developers in our Developer Docs, including llms-txt files and a ‘Copy to Markdown’ button.
We’re also experimenting with WordPress Playground’s Blueprint JSON format as a way to quickly spin up new sites with default settings, themes, and plugins. There’s a call for feedback out so you can let us know how this feature works for you. (I see Blueprints as becoming the standard tool for spinning up WordPress ‘distros’ in the future).
Courses and Content
Mike McAlister and the team at OllieWP launched a free block development course. Having seen this content, I know it’s probably the best guide to block development out there right now and the perfect complement to their free block theme development course.
I sat down with Christian Taylor (Craylor) to talk about his success on YouTube, how he thinks about WordPress content, and avoiding creator burnout.
Andrew Schmelyun is a developer and content creator who is tackling the same existential crisis many of us are dealing with: is our type of content becoming irrelevant? A must-watch if you’re a developer/educator.
If you’re as sick as I am of the sparkly AI button in every app (who knows what’ll happen if you click it?), then you’ll appreciate this post summarizing the problems and potential of integrating AI into user interfaces.
JuanMa Garrido released an extension for VS Code/Cursor that allows you to browse and download Cursor rules files directly into your IDE.
James LePage makes the important point that AI is still reliant on search engines to scrape the web. We don’t know where this is all headed (and I’m definitely concerned about the decreasing incentives for creating commercial content online and how that relates to WordPress), but don’t abandon your SEO just yet.
Cal Newport wrote about the implications of AI on tech. I tend to agree with Cal, I think we’re going to hit a ceiling with AI. It’ll be a very high ceiling, but I’m fairly skeptical of completely autonomous agents running free across our economy within the decade, or at least their ability to get past the human productivity bottleneck.
That’s all! What are you building this week? And how many chatbots did you have to yell at to get it done?
Leave a Reply