ChatGPT as a Replacement Programmer

When I left university I did so with a good grounding in several programming languages such as Cobol, Fortran and Pascal. Then, at my first job, I was given training in the language Application Master, part of ICL’s VME operating system. One of the things I was told about Application Master was that it was a “fourth generation language (4GL)” and that this would be the last generation that required a developer to write the code.

This was the late eighties and until very recently we have been still waiting for this transition to happen.

ChatGPT has Entered

Read the rest

Using a Raspberry Pi Camera to create a time-lapsed video

For my birthday last year I was bought a Raspberry Pi Camera Module 3 which I’d wanted for a while. I’d decided that I wanted to create a time-lapse video showing the change in seasons in the back garden. The rest of this article describes what I did and the results.

Setting up

As this didn’t require a huge amount of computing power I paired the camera module with a Raspberry Pi Zero 2W.

That turned out to be the easy bit! Getting it fixed such that there weren’t any reflections from the window took a bit of creativity. What … Read the rest

Changing your Bluesky handle to be your own domain

I’m liking Bluesky, which is a little like a rough around the edges X without the toxicity found there. And here’s a neat thing you can do on Bluesky that you can’t on X. If you have your own domain you can use that as your Bluesky handle. In the rest of this article, we’re going to look at how you do that.

Why would you want to do it?

First off why would you want to do so and what are the implications of making the change? I see a number of reasons to make the change:

  1. it
Read the rest

Posting to Bluesky via the API from PHP – Part Five – Putting it all Together

In this series of posts we have looked at:

In this final post we are looking at putting it all together. This includes a worked example plus a complete library of functions that will allow you to easily interact with the Bluesky API.

The Prerequisites

What this project has predominately been about is the correct formatting of the parameters that need to be passed to the Bluesky API. This code does not directly call the API but uses BlueskyApi by Clark Rasmussen to do that.

Here’s … Read the rest

Posting to Bluesky via the API from PHP – Part Four – Link Cards

In this we post we are continuing to look at accessing Bluesky from the API via PHP. Previously we looked at making a connection to Bluesky, posting text, images and handling links and in this post we take a look at Link Cards.

What Even IS a Link Card?

Link Cards are the snippets of a website that is linked to a post that you will no doubt be familiar with seeing elsewhere. Typically, elsewhere these are handled for you but not in Bluesky – here you do all the heavy lifting.

Example of a Link Card

Fetching Details

Read the rest

Posting to Bluesky via the API from PHP – Part Three – Links

So far we have looked at making a connection to Bluesky, posting text and images. In this post I want to look at how links are handled. Unlike X and Mastodon on Bluesky when you post text that includes one or more links these are not parsed and activated. You have to tell Bluesky that you have links in your text and where they are.

Parsing for Links

In order for links to be handled correctly by Bluesky in addition to the text itself you also need to pass an array as part of the parameters giving the start … Read the rest

Posting to Bluesky via the API from PHP – Part Two – Images

In the first of these posts we looked at creating the connection to the Bluesky API and posting a text post. In this second post we are going to extend that out to post images as well as text.

The code posted here are snippets from a larger library of functions that you can drop in and use to post to Bluesky. If some parts look more complex than they need to all will be revealed in the final version.

Uploading Images

In order to post an image to Bluesky you have to take a few steps:

  1. open and ingest
Read the rest

Posting to Bluesky via the API from PHP – Part One

With all the uncertainty surrounding the future of X (née Twitter), I decided to take a look at Bluesky which somewhat ironically has its roots in Twitter where it was started as an internal project. Bluesky is still in beta and is invite-only. I worry about its long-term given that ultimately it too has to make money, something that Twitter has singularly failed to do. None of this, of course, affects the topic today which is posting to Bluesky via the API.

Basic Concepts

The first thing to say is that I am using the following library to actually post … Read the rest

Simple Remote Wake on Lan with Raspberry Pi Zero W

As part of my drive to help the planet, I am trying to use less electricity. We have a Windows machine in the lounge that acts as a Plex media server. This works very well but I realised that it was only being used at certain times of the day, usually in the evenings, meaning that it was running for hours on end unnecessarily. Therefore, the plan was to have the machine automatically turn off each night at midnight when I knew we would definitely not be using it, but what about turning it on?

If I was at home … Read the rest

Sending messages to Pushover from PHP

One of the things that I regularly bake into my own applications is notifications of when things go really bad and need my immediate attention. For this, I use the excellent and simple Pushover service which allows me to send a push notification to my mobile device. In this post, I run through how to set up your application in Pushover and then send a notification via PHP.

Setup Pushover

I am assuming that you have already created your Pushover account. You get a 30-day trial and after that, it is just $5 as a one-off purchase.

From your dashboard … Read the rest