Archives

Playing With AI

Playing with AI and Learning to Keep It Simple, Silly

Yesterday I was playing with AI in the evening and I asked it to help me write a function that would detect whether an array item was a photo or a video. I told the AI, this is a photo array item, and this is a video array item. I want the photo array item to display the img src code and for the video item to be displayed with video src code. At first it failed to detect anything and gave me an error message. I decided to highlight the photo array item snippet and the video array snippet. It didn’t come back with an error but it did not display any img or video code. In the end I decided to say “here’s the img src tag. I want you to detect whether the file is mp4 or jpg. If it’s mp4 add the video player, and if it’s a photo load the image. I went from asking it to read the array to determine what to do, to “check the filetype and load the appropriate src type. That worked, and required very little code. Don’t Over-Engineer With AI The moral I came away with, after the trial and error I went through last night is that whilst AI is great at reading and understanding code, and giving us answers it can sometimes fail. I was making something far more complicated than it had to be and chatGPT got confused, as would a human trying to complicate something simple. PHP has a lot of functionality built into it. It has tools that allow it to read exif information, file types and more, and if you know about these tools, then you can come up with elegant solutions, rather than complicated ones.

Experimenting With Hugo As A Blog

Converting This Blog To Hugo

On Saturday I converted my blog from WordPress to Hugo as an experiment and it went quite well. I downloaded the xml file and then I converted that xml with blog2md to go from xml to md pages. A page was created for every single blog post. This took a while. I now have my blog both as static pages, and as a wordpress blog.

My AI Teacher

Today I want to discuss something different. I want to discuss using AI as a teacher, rather than as a tool to replace us. For a few days I have been playing with the Instagram json file that I got when I requested my archive. With this json file I thought about things to do, and in so doing asked chatGPT for help, and it provided answers.

Adapting the Questions

Removable Batteries are coming back

By a large majority the European Union has voted to bring back user replaceable batteries to mobile phones. This is fantastic for one reason, over all others. I keep my phones for years, not seasons. Over that time the battery health degrades. As it degrades the battery life goes from lasting an entire day, to lasting a shorter and shorter amount of time.
The issue at the moment is that if we want to replace a battery we need to take it to a phone repair shop, because a battery replacement requires the phone to be unglued, elements to be disconnected, the battery to be swapped, and then for the phone to be put back together. What should take a few seconds, with old fashioned phones, and rugged phones, takes minutes, hours or even days with modern phones. It’s often easier to replace the phone, than to replace the battery.

Flawed Thinking and Cleaning

The Unilateral Solution

I stopped making a mess because I came up with unillateral solutions, until I found the ideal one. I experimented with skewers to remove the mud from shoes, I experimented with rubber boots that I could rinse under a tap. I tried with spare shoes in the letter box. 

A Simple Doormat

In the end my favourite solution was the doormat by the car in the garage. This is my favourite solution because it takes seconds to brush the mud off my shoes before going upstairs, and best of all, I walk with muddy shoes, into the garage where no one will complain. No more mud in the building. 

From Instagram Archive to PHP Website

Three years ago I stopped using Instagram because I was tired of seeing influencers and adverts rather than by the people I chose to follow. The cherry on the cake, that pushed me to dump Instagram is when they changed the location of the Post button from the left corner to the top right and changed the default from photo to story.

For ten years or more I used instagram and shared photos, and I enjoyed capturing at least an image or two every single day. It’s because Instagram was bought by Facebook that I fell out of love with the site and decided not to use it anymore. The community had been lost, so what good was there in sticking around? 

Swimming Pools Per Capita Map

Today I learned that Switzerland has a map that shows which communes have the most swimming pools per capita. Nyon has 50 swimming pools. That’s 2,3 per thousand people. Blonay St Legier has 336. Collonge- Bellerive has 491, as you’d expect. 

Switzerland has, on average, one swimming pool per 155 people. They cover an area of around 2,500,000 square meters. 

The Water Impact

Switzerland has 56,000 private pools that contain 3.5 billion litres of water according to their estimate. That’s an enormous amount of water. This doesn’t include the indoor private pools. As droughts become more common the concept of having a private pool becomes more and more absurd. It becomes absurd because private pools require a huge amount of water, and are seldom used. 

Podcasts and Social Media

When you listen to podcasts, and you read articles, and you visit websites you always see Twitter, Facebook, Reddit and Instagram, to name the giants. In every podcast episode you hear the guests say “You can find me under this name on this network, and the same name on that network.”

The Shift to CrowdFunded Media

With the recent shift from Venture Capitalist Social Media to crowdfunded social media I expect to hear about a shift in where people can be found. I expect that we will soon hear “And you can find me on Calckey at this address, on Pixelfeed.eu with this username, and peertube.social. 

Linear Bike Rides

Almost all of my bike rides are loops. The reason for this is that I am a single person, so I usually need to end where I start, either to get home, or to get to the car. This means that if I do a 30km loop it has to return to where it started eventually. 

Over the last two bike rides that I did they were linear. From Haute Morges to Nyon a few days ago, and vice versa today. The beauty of linear rides is that you make the effort unti you’re tired, and then you stop. With circular loops you cycle until you’re tired, and then you need to struggle to find the energy to make it home. With linear walks you don’t need to. 

A Desire to Dump WordPress

In theory WordPress is a fantastic tool to write a blog, without needing to learn to code. In practice I am tired of WordPress and I have been tired of WordPress ever since they started to use blocks, and ever since I noticed that it uses React. 

React and Meta

I know that PHP was developed by Facebook, and that we use it all the time, but I also know that React was developed by Facebook as it was morphing into Meta, the destroyer of the independent web. Instagram and Whatsapp were destroyed by Facebook, as the monopolist took over those accounts.