Thinking about progressive web apps

The Magento ecosystem has been talking about progressive web apps for ages now with various levels of (enthusia|cynici)sm so, when I saw a tutorial on freeCodeCamp about the basics, I gave it a quick try.

As someone whose last major frontend project used JavaScript ES5 on AngularJS (before it became just Angular), I had to park the urge to dig into arrow functions and CSS Flexbox when they cropped up in the sample code.

I have two ideas I think might be a good fit for PWAs. One is a personal learning project where I track my fuel spend every time I fill the car and sync that up to a server. That’d let me get up to speed on modern CSS/JS as well as the PWA stuff. Another is for my day job, and involves iOS, large photo files and locations with poor-to-no data signal.

I quickly learned that Android embraces PWAs much more enthusiastically than Apple do, even though the earliest ever iPhone apps were built on web technologies. Since the relevant work devices are all iOS, this matters. With App Store’s revenue-generating walled garden, it’s easy to see why Cupertino isn’t rushing to improve their support, although there are improvements in the latest few releases. The limitations on capabilities remain significant: 50 MB of cache storage; caches being cleared unexpectedly to free up resources; and no background sync.

I think the fuel-tracker fun is a go, but the work project will need something native.


That Safari thing

Last week, I thought I’d found a good Safari tip to open links from emails in the current macOS Space instead of having them switch me to another Space which already has a Safari window.

It didn’t work well, and I’ve switched it back. When a website decides a link should open in a new window, with this setting enabled, it really did open in a new window instead of a new tab. Since there’s no way, just by looking at a link, to know that the website will do this, I’d have to right click on every link and choose explicitly what I want. That’s no use.


Terrible code

I found some terrible code: no regard for data types, instead relying on the magic of implicit casting and type conversion; variables not named to indicate the units of the values within. It’s a pity I wrote it.

“If I had a dime for every time I’ve seen someone use FLOAT to store currency, I’d have $999.997634”

Bill Karwin

Enough said.

macOS Spaces and Safari

I sometimes have multiple projects open in different virtual desktops—macOS “Spaces”—at the same time.

In Mission Control preferences, there’s a setting: “When switching to an application, switch to a Space with open windows for the application.” I’ve switched that off, so if I Cmd-Tab to Safari from within a project Space and there’s no Safari window in that Space, I can use Cmd-N to open one.

It works well, but it’s not seamless. For example, my first Space is for general stuff (email, Slack, todo list, etc.). When I click a link in an email, macOS takes me to the most recent Safari window, in another space, and opens the link as a new tab. It’s rarely the one I want.

I found the an answer in the Safari Tabs preferences:

Open pages in tabs instead of windows: Never

Now, when I click a link in another application, it opens in a new window in the current space. If I want it as a tab in a specific project desktop, I right click and copy the link’s URL instead, and open the tab manually where I want it.

It’s the little things.

23andMe and Ancestry

In 2015, I sent a small vial of saliva to 23andMe. After numerous warnings and “Are you really sure?” messages, they revealed what they say are my genetic mutations that might put me at risk for various diseases. Nothing interesting came up.

They told me that my ancestry was very British/Irish and very Northern European. No surprises there either, so I didn’t spend much time on the site after that.

Then, a few weeks ago, I received a message from a DNA relative in the USA. Exciting! We share a set of great-great grandparents who lived a few miles from where I grew up. It took some days to figure out who the common connection was and, along the way, we learned about some great aunts and uncles we didn’t know existed.

I’m curious now about the several hundred other DNA relatives listed on 23andMe, and I wish they’d put some more detail—even a list of towns or family surnames—on their profiles.

I signed up for a trial on too, which is fascinating. After plugging in all the names, birth dates, death dates and locations, it searches lots of public archives for people you’ve entered and helps you find new connections very quickly via those records. It’s amazing when your own tree intersects with those uploaded by other users, some of whom have also uploaded old photos.

I know very little about genealogical research, but I’m learning slowly. For example, I’ve realised that census records (1901 and 1911 in Ireland especially) are helpful because they place parents and children in one document, with birth dates. Other records aren’t so useful with many people’s birth dates listed only approximately. It turns out that not everyone knows, or knew, their own dates of birth.

This post from the Lavazza cafe at the M1 services outside Lisburn, Northern Ireland after dropping my parents to the airport. It’s quiet.

“Looking for somewhere a bit quieter?”

Spam > Content

Akismet is good

Just five. That’s the number of spam comments required per day on this almost-empty blog to make me want to have Akismet running. If you’re not familiar, it’s a third party service that separates real comments from spam similar to how your email provider might remove (most) spam from your inbox. It comes installed on WordPress by default, but needs to be activated with an API key before it gets to work.

Since I last installed a fresh copy of WordPress, I see they’ve introduced a default privacy policy page; probably around the time of all the GDPR action. As I’m collecting very limited data it was quick to edit the text for relevance before publishing.

I was tempted to stick Google Analytics on this site too, but I don’t need to know that nobody is reading yet. I’m determined to build a writing habit for now—whatever it produces. Lucky you!

A week in Windows

I’ve been all-in on Apple stuff since 2010, a full six years before Microsoft released Windows Subsystem for Linux. Back then, I wanted a Unix-style command line environment for developing PHP applications. Now, in 2020, with all my Apple computers and devices loaded up with good software and talking to each other in all the right ways, I’m hooked.

This week, I found myself migrating an old .Net application from one server to another. Very glad that I’d taken detailed notes the first time I deployed it, I couldn’t help also being glad that Windows Server is a graphical interface and much more intuitive to learn than the command line.

I do have a Windows 10 virtual machine running on Parallels Desktop. In a Microsoft mood, I played with that for a few hours too, getting up to speed on all the configuration options and generally how to get around. I hadn’t realised that Microsoft have rebuilt their Edge browser on top of Chromium, and that it’s being rolled out gradually to replace the legacy version.

Google Nest Minis

YouTube sent us two free speakers at home for being YouTube Premium customers. They’re up and running and much better than our first-gen Amazon Echo at hearing us over the TV and everyday household noise. So far, all our requests have been about music, food timers and fact-checking.

People are very concerned about privacy with these speakers. I’ve never worried too much about it. I’m happy to exchange some data with huge and competent companies, in an educated way, in return for useful functionality and more relevant ads.

Their data security is much better than mine will ever be. I take them at their word that they’re mostly doing only what they say they’re doing—usually—and, if I’m going to get ads at all, I’d like them to be for things I might want to buy.

I hope I’m right.

By the way: On the subject of data privacy, if you’re a heavy Google user and have never visited the My Google Activity dashboard, you’re in for a treat.