Discover more from Sunday Mornings in Bed
And other fun things to do with AI
🌱 Learning & Growing
Building a plugin with AI
I just built a seemingly simple yet cool WordPress plugin using AI. As you can probably tell, I’m a documenter of life, and so I wanted a plugin to help me with that documentation.
I bought two 5-year journals before turning 40 and wrote daily excerpts in them for the entire decade, at which point I bought a 10-year journal to keep documenting.
There were two problems with this. First, the 10-year journal is REALLY heavy. I had not taken that into account for travel. Plus, I would love to go to the journal to write an entry and see the entries from all previous years. As it is, I’m starting on year one in the new journal and can’t see anything.
So, I wondered if I could build a plugin that collected the daily short journal entries and showed me all previous entries.
I had just gotten an email from Google’s Bard with a headline, “Export Code to More Places,” which is what prompted me to work on the plugin again in the first place.
I put my prompt into Bard and got this response:
“I can write PHP code, but I'm not yet proficient enough to write a complex WordPress plugin. I'm still under development, and I'm learning new things every day. I'm confident that I'll be able to write PHP code that can rival human-written code in the future, but for now, I'm happy to help you with simpler tasks.”
So, I went back to ChatGPT and put in a complex prompt. I’m better at asking for things than when I started trying to get AI to help with this plugin. I now know that I can write multiple sentences to describe what I want when I originally thought I had to jam it all into one sentence.
The initial code I got was very comprehensive, but it took me a few minutes to make progress after uploading the plugin file because I forgot that I had to activate the plugin in the WordPress interface. (All official and such.)
This is what it looks like while ChatGPT is spitting out my code.
Once I got it working, I was able to manipulate the code by asking follow-up requests for help with specific issues. Then, for some things, it was easier to do a Google search for the solution. I definitely could not have completed the app without my existing knowledge of PHP development.
Here are some screen captures of the plugin:
(Click on each image to enlarge)
Because it’s for journal entries, I made the page on the website only accessible to logged-in administrators.
Full disclosure, there is still one issue with the plugin: a message is supposed to appear after I submit the form that tells me it was submitted successfully. I tried to get AI to help, but then I didn’t want to spend any more time on it right now. Here is AI trying to help me fix it, but the solution didn’t work.
I’ll revisit that at another time since it’s otherwise fully functional at the moment.
You can now practice a foreign language by chatting with a chatbot about whatever you’d like in that language. Plus, the chatbot makes you feel seen and heard. ❤
You can download SpeakAI onto your phone and begin chatting after choosing your native language and what language you’d like to chat in. Disappointingly, they do not have Portuguese as a chat language (since I’m already studying that on Duolingo). So I had to chat in Spanish. It currently supports Chinese, English, Japanese, Korean, French, German, Italian, and Spanish.
The chatbot seemed very interested in asking me about my work and telling me how impressive I am. It was nice to feel appreciated.
Better AI Images
For those of you following my AI image creation journey (which consisted of hilariously deformed bodies), I found a new tool that gives me better results. Here are some results I got with Image AI Art Generator for free:
I still don’t like the idea of creating “art” with AI. These are images I might use in this newsletter or a blog post to replace stock imagery. And I still have a problem with the fact that they are aggregated from other online images that may be protected artwork.
No more business card
I think I’ve given out a single business card for Solid Red Studios in the last year, so I’ve decided to no longer have printed business cards for that business.
This is a weird feeling because I love designing business cards for my various endeavors.
I looked for alternatives and considered using a service like Blinq which is basically a digital business card on your phone that shows a QR code. But then I was like, “Why?” I can just keep an image of the QR code on my phone. So, I made a QR code that is now stored on my phone (and favorited in my image gallery for easy retrieval), and it is linked to a new page on the website that introduces myself and includes my photo and contact info. I did this because anyone following the QR code will be someone I recently met in person, and I want them to remember what I looked like.
Having said all this, I will probably keep a business card for The Hugmobile because they’re square and pretty, and fun to hand out.
👀 Life Observations
We already know that many people who refused to get vaccinated were injured or killed by Covid-19. But why did they refuse? Not because they have inside information on virology. It’s because someone gave them some very bad information.
I listened to this This American Life episode last week and was struck by it. Aside from the Second Amendment youth camps (which I just cannot even with right now), far-right conservatives are going to set up medical clinics in Florida so that quack “doctors” can prescribe people ineffective cures and treatments for their very real illnesses and conditions.
This makes me sad and harkens to mind Jim Jones and his cult. Except Jim Jones was a wackadoo. He was not in it for profit. He was a lunatic. What I predict will happen if these clinics get set up in Florida is that opportunists will use them to milk these people for everything they have without helping them one bit.
Is everyone who wants alternative treatments a poor sucker? I don’t know. But I do know that if you choose to ignore generally agreed upon science in favor of something that only makes the rounds on YouTube and Fox News, then you’ve decided to take your life into your own hands. The problem is that many of these people have children who will suffer from their poor decisions.
No matter the reason, the people opening these clinics are endangering the lives of… I’m going to say… vulnerable people. People who don’t understand how science works and have decided they don’t trust anyone traditionally involved with it. They don’t trust traditional science because they’ve been convinced not to trust it by people who do not have their best interests in mind.
I do not see any of this ending well, just like it didn’t end well in Jonestown.
🌻 One Positive Thing
There is still so much beauty in the world that we can appreciate outside the noise of all that’s going wrong. Step outside your door and see it. Flowers push through sidewalks in the grittiest of neighborhoods. Summer is a good time to chuck a handful of flower seeds into an empty grass lot. Put some sidewalk chalk out near your home. Invite people to play and beautify. Be a catalyst for beauty.
🗺 Daydreaming about travel both next month and next year.
📈 Trying to make the most of some downtime by learning new stuff and engaging in business development.
Enjoy the rest of your Sunday. ❤️