

Discover more from Sunday Mornings in Bed
š± 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.
SpeakAI
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
Cultivate Empathy
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.
ā°ļø Currently
šŗ Started watching The Bear on Amazon Video. The first episode was a bit stressful, so I hope the whole show isnāt going to be that way. (Aw, shit, just saw this review! š¤£)
šŗ 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. ā¤ļø
Hugs, Elsie
Building Plugins
Was lovely waking up in Taos to this newsletter/discussion. Read it as I watched the sun rise over the mountains and am also daydreaming about future travel. Thanks for being in my world, Friend š§”