This is Robin's personal site which he uses to note down his thoughts. He hopes you find it interesting. Enjoy.

He apologises for writing in the third person, but otherwise the idea behind the site's domain name, as seen in the header, doesn't work!

Progressive Web App

I decided to make my website installable, so it can be added to a device as an installed application. The way to do this is to add some javascript to the site so that it is a Progressive Web App (PWA).

To be a PWA, a website needs only one thing: a service worker. Adding one is fairly straightforward, once you know how. It does require a good understanding of asynchronous JavaScript, something which I struggle with. The alternative is just to copy someone else's service worker code and adapt if needed. I chose the alternative. πŸ€·β€β™‚οΈ

So I copied the one from Jeremy Keith. It took me a while to get it to work, although I am not sure I really changed anything very much. However, debugging PWAs is more complex than plain JavaScript. So most of my efforts were trial and error. And then it worked. Magic! πŸ§™β€β™‚οΈ

I even managed to get an offline page working for the PWA. Again, copied from Jeremy's offline page. What this page does, thanks to some nifty JavaScript, is check if there is a network connection. If there is it fetches the page from the server. If there isn't, it tries to fetch the page from the cache. If the page has not been cached, it displays a list of pages that have been cached and are therefore available for offline reading. Fantastic!




One of the challenges, at least for me, in modern web development, is keeping track of dependencies. On the one hand they help you avoid reinventing the wheel. On the otherhand they can cause unexpected problems which are sometimes hard to diagnose. I like to keep them to a minimum, especially when I don't really understand how they do what they do.

So, I improved my GitHub action that builds my eleventy based website by removing my dependency on an action from a GitHub user called TartanLlama. This action used a Docker file to build and generate the actual HTML pages for the website. The action has served me well for the last three years, but I did worry about what would happen if there was a bug and the user stopped maintaining this bit of code. It had stopped working once and it took me a couple of days to realise that I had to update my link to the action to a newer version. I didn't want to end up in this situation, should the user decide to call it a day.

So I did some Googling and found this blog post and this answer on Stack Overflow. (Yes, I know I am trying to avoid Stack Overflow, but Google makes it very hard!). Between the two, I came up with this step in my GitHub action:

- name: Install dependencies & build
    run: |
        npm install --package-lock-only
        npm ci
        npm run build  


William Gibson

Over the years I'd heard a lot about this book. The author coined the term "cyberspace" and basically invented the cyberpunk genre. Back in the early 80s. So I finally decided I should read it and it made a very suitable follow up to the previous book I read.

It's a fun read. I can see why it is so popular and how it would be a genre defining book. Very timely as well, with the rise of AI over the last year or two. Although that AI is nothing compared to what is described in this story. In fact the book is a suitable reminder that what we consider as AI right now, is nothing of the sort. It's certainly not intelligent, let alone self-aware.

I finished the last quarter of the book in one evening. On putting it down and thinking about it for a while, there were more questions than answers. But the one thought which I couldn't get out of my mind, is that this was basically a blue print for The Matrix. Reading other people's thoughts on the web, I am clearly not the only one who came to this conclusion.

Apparently this book is part of a trilogoy. I guess they'll be my next two reads.

Started 03/11/2023. Finished 12/11/2023.