What I made is not important — it’s a list of kayak courses and available spots.
I already had created the logic — no AI needed for logical thinking1. So I already had the authentication, the API calls, the custom filtering and the presentation layer.
But since I didn’t have any experience with WordPress plugins/widgets, I hosted it on a separate domain and embedded it onto the web site. This has worked for years.
However, there were a few drawbacks. Mainly that it was dependent on my private website to be up in order to work. On the positive side; when things broke, I could easily debug it on my own server. Like the time the API stopped working, and it turned out I had been using an internal API endpoint, and not the one in the documentation. Whoops.
So, with AI being all over the place, and Microsoft pushing CoPilot on everything that can be displayed on a screen, I decided it could not hurt to ask it to make a simple Widget that I could plug my logic into.
I asked CoPilot to create a basic Widget. I asked it to display a placeholder text for now, but that I needed a settings interface to enter username and password for the API authentication.
When I tried this crude plugin, nothing worked. I wrote to CoPilot: “it doesn’t work”, to which it basically replied “Your code is wrong”, and then continued to present the right way to do it.
And this is what surprised me the most. Several times, CoPilot presented some code, just to lament me about it later.
Yes, I know there are other models2 out there that are a lot better for programming. But I only needed to make a simple template for a WordPress widget, not make an E-commerce system from scratch.
But part of me wonder; do these models behave this way just to make people spend as many tokens as possible?
Credit where credit is due
But I have to give CoPilot some credit as well. First, it did eventually present a workable Widget that I could put my logic into. Secondly, it created new token manager for me. My previous solution was to use Curl to get the API token bearer and store in a file. Hardly best practice.
I also learned a little bit more about WordPress.