Tags: view

261

sparkline

Saturday, June 3rd, 2023

Tuesday, May 30th, 2023

First Experiments with View Transitions for Multi-page Apps

Some great ideas for view transitionts in here! Also:

If you look at any of the examples on a browser that does not support them, the pages still function just fine. The transitions are an extra that’s layered on top if and when your browser supports them. Another concrete example of progressive enhancement in practice.

Wednesday, May 24th, 2023

Add view transitions to your website

I must admit, when Jake told me he was leaving Google, I got very worried about the future of the View Transitions API.

To recap: Chrome shipped support for the API, but only for single page apps. That had me worried:

If the View Transitions API works across page navigations, it could be the single best thing to happen to the web in years.

If the View Transitions API only works for single page apps, it could be the single worst thing to happen to the web in years.

Well, the multi-page version still hasn’t yet shipped in Chrome stable, but it is available in Chrome Canary behind a flag, so it looks like it’s almost here!

Robin took the words out of my mouth:

Anyway, even this cynical jerk is excited about this thing.

Are you the kind of person who flips feature flags on in nightly builds to test new APIs?

Me neither.

But I made an exception for the View Transitions API. So did Dave:

I think the most telling predictor for the success of the multi-page View Transitions API – compared to all other proposals and solutions that have come before it – is that I actually implemented this one. Despite animations being my bread and butter for many years, I couldn’t be arsed to even try any of the previous generation of tools.

Dave’s post is an excellent step-by-step introduction to using view transitions on your website. To recap:

Enable these two flags in Chrome Canary:

chrome://flags#view-transition
chrome://flags#view-transition-on-navigation

Then add this meta element to the head of your website:

<meta name="view-transition" content="same-origin">

You could stop there. If you navigate around your site, you’ll see that the navigations now fade in and out nicely from one page to another.

But the real power comes with transitioning page elements. Basically, you want to say “this element on this page should morph into that element on that page.” And when I say morph, I mean morph. As Dave puts it:

Behind the scenes the browser is rasterizing (read: making an image of) the before and after states of the DOM elements you’re transitioning. The browser figures out the differences between those two snapshots and tweens between them similar to Apple Keynote’s “Magic Morph” feature, the liquid metal T-1000 from Terminator 2: Judgement Day, or the 1980s cartoon series Turbo Teen.

If those references are lost on you, how about the popular kids book series Animorphs?

Some classic examples would be:

  • A thumbnail of a video on one page morphs into the full-size video on the next page.
  • A headline and snippet of an article on one page morphs into the full article on the next page.

I’ve added view transitions to The Session. Where I’ve got index pages with lists of titles, each title morphs into the heading on the next page.

Again, Dave’s post was really useful here. Each transition needs a unique name, so I used Dave’s trick of naming each transition with the ID of the individual item being linked to.

In the recordings section, for example, there might be a link like this on the index page:

<a href="/recordings/7812" style="view-transition-name: recording-7812">The Banks Of The Moy</a>

Which, if you click on it, takes you to the page with this heading:

<h1><span style="view-transition-name: recording-7812">The Banks Of The Moy</span></h1>

Why the span? Well, like Dave, I noticed some weird tweening happening between block and inline elements. Dave solved the problem with width: fit-content on the block-level element. I just stuck in an extra inline element.

Anyway, the important thing is that the name of the view transition matches: recording-7812.

I also added a view transition to pages that have maps. The position of the map might change from page to page. Now there’s a nice little animation as you move from one page with a map to another page with a map.

thesession.org View Transitions

That’s all good, but I found myself wishing that I could just have those enhancements. Every single navigation on the site was triggering a fade in and out—the default animation. I wondered if there was a way to switch off the default fading.

There is! That default animation is happening on a view transition named root. You can get rid of it with this snippet of CSS:

::view-transition-image-pair(root) {
  isolation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
  display: block;
}

Voila! Now only the view transitions that you name yourself will get applied.

You can adjust the timing, the easing, and the animation properites of your view transitions. Personally, I was happy with the default morph.

In fact, that’s one of the things I like about this API. It’s another good example of declarative design. I say what I want to happen, but I don’t need to specify the details. I’ll let the browser figure all that out.

That’s what’s got me so excited about this API. Yes, it’s powerful. But just as important, it’s got a very low barrier to entry.

Chris has gathered a bunch of examples together in his post Early Days Examples of View Transitions. Have a look around to get some ideas.

If you like what you see, I highly encourage you to add view transitions to your website now.

“But wait,” I hear you cry, “this isn’t supported in any public-facing browser yet!”

To which, I respond “So what?” It’s a perfect example of progressive enhancement. Adding one meta element and a smidgen of CSS will do absolutely no harm to your website. And while no-one will see your lovely view transitions yet, once browsers do start shipping with support for the API, your site will automatically get better.

Your website will be enhanced. Progressively.

Update: Simon Pieters quite rightly warns against adding view transitions to live sites before the API is done:

in general, using features before they ship in a browser isn’t a great idea since it can poison the feature with legacy content that might break when the feature is enabled. This has happened several times and renames or so were needed.

Good point. I must temper my excitement with pragmatism. Let me amend my advice:

I highly encourage you to experiment with view transitions on your website now.

Wednesday, April 26th, 2023

Make Something Wonderful | Steve Jobs

This anthology of Steve Jobs interviews, announcements and emails is available to read for free as a nicely typeset web book.

Monday, March 20th, 2023

Pixel Pioneers Bristol 2023 Speaker Spotlight: Jeremy Keith

Oliver asked me some questions about my upcoming talk at Pixel Pioneers in Bristol in June. Here are my answers.

Tuesday, March 14th, 2023

Wednesday, January 4th, 2023

Tree views in CSS

Styling a list of nested details elements to create a beautiful lokking tree view, all in CSS, all nicely accessible.

Wednesday, December 28th, 2022

Books I read in 2022

I read 25 books in 2022. I wish I had read more, but I’m not going to beat myself up about it. I think no matter how many books I read in any given year, I’ll always wish I had read more.

18 of the 25 books were written by women. I think that’s a pretty good ratio. But only 6 of the 25 books were written by Black authors. That’s not a great ratio.

Still, I’m glad that I’m tracking my reading so at least I can be aware of the disparity.

For the first half of the year, I stuck with my usual rule of alternating between fiction and non-fiction, never reading two non-fiction books or two fiction books back-to-back. Then I fell off the wagon. In the end, only 7 of the 25 books I read were non-fiction. We’ll see whether the balance gets redressed in 2023.

As is now traditional, I’m doing my end-of-year recap, complete with ridiculous star ratings.

I’m very stingy with my stars:

  • One star means a book is meh.
  • Two stars means a book is perfectly fine.
  • Three stars means a book is a good—consider it recommended.
  • Four stars means a book is exceptional.
  • Five stars is pretty much unheard of.

Cowboy Feng’s Space Bar And Grille by Steven Brust

★★☆☆☆

Even the author doesn’t think this is a particularly good book, and he’s not wrong. But I have a soft spot for it. This was a re-read. I had already read this book years before, and all I rememberd was “sci-fi with Irish music.” That’s good enough for me. But truth be told, the book is tonally awkward, never quite finding its groove. Still a fun romp if you like the idea of a teleporting bar with a house band playing Irish folk.

A Ghost In The Throat by Doireann Ní Ghríofa

★★★★☆

Stunning. I still don’t know whether it’s fiction, autobiography, translation, or some weird mix of all of the above. All that matters is that the writing is incredible. It’s so evocative that the book practically oozes.

Parable Of The Talents by Octavia E. Butler

★★★★☆

A terrific follow-up to The Parable Of The Sower. It seems remarkably relevant and prescient. So much so that I’m actually glad I didn’t read this while Trump was in power—I think it would’ve been too much. It’s a harrowing read, but always with an unwavering current of hope throughout.

About Time: A History of Civilization in Twelve Clocks by David Rooney

★★★☆☆

A great examination of history and colonialism through the lens of timekeeping. Even for a time-obsessed nerd like me, there are lots of new stories in here.

The Lathe Of Heaven by Ursula Le Guin

★★★★☆

While I was reading this, I distinctly remember thinking “Oh, so this is what Philip K. Dick was trying to do!” And I say that as a huge fan of Philip K. Dick. But his exuction didn’t always match up to his ideas. Here, Le Guin shows how it’s done. Turns out she was a fan of Philip K. Dick and this book is something on an homage. I found its central premise genuinely disconcerting. I loved it.

Orwell’s Roses by Rebecca Solnit

★★★★☆

When someone asked me what I was reading, I was honestly able to respond, “It’s a book about George Orwell and about roses.” I know that doesn’t sound like a great basis for a book, but I thought it worked really well. As a huge fan of Orwell’s work, I was biased towards enjoying this, but I didn’t expect the horticultural aspect to work so well as a lens for examining politics and power.

The Testaments by Margaret Atwood

★★★☆☆

A solid sequel to the classic The Handmaid’s Tale. It’s not more of the same: we get a different setting, and a very different set of viewpoints. It didn’t have quite the same impact as the first book, but then very little could. As with The Handmaid’s Tale, Margaret Atwood stuck with her rule of only including shocking situations if they have actually occurred in the real world.

On Tyranny by Timothy Snyder

★★☆☆☆

I wrote about this book in more detail:

For a book that’s about defending liberty and progress, On Tyranny is puzzingly conservative at times.

No One Is Talking About This by Patricia Lockwood

★★★★☆

Astonishing. I know that a person’s reaction to a book is a personal thing, but for me, this book had a truly emotional impact. I wrote about it at the time:

When I started reading No One Is Talking About This, I thought it might end up being the kind of book where I would admire the writing, but it didn’t seem like a work that invited emotional connection.

I couldn’t have been more wrong. I can’t remember the last time a book had such an emotional impact on me. Maybe that’s because it so deliberately lowered my defences, but damn, when I finished reading the book, I was in pieces.

East West Street by Philippe Sands

★★★☆☆

An absorbing examination of the origins of international war crimes: genocide and crimes against humanity. The book looks at the interweaving lives of the two people behind the crime’s definitions …and takes in the author’s own family history on the way. A relative of mine ran in the same legal circles in wartime Lviv, and I can’t help but wonder if their paths crossed.

A Desolation Called Peace by Arkady Martine

★★★☆☆

Just as good as A Memory Called Empire, maybe even more enjoyable. Here we get a first contact story, but there’s still plenty of ongoing political intrigue powering the plot. I can’t wait for the next book in this series!

The Biggest Bluff: How I Learned to Pay Attention, Master Myself, and Win by Maria Konnikova

★★★☆☆

A thoroughly enjoyable piece of long-form journalism. It’s ostensibly about the world of high-stakes poker, but there are inevitable life lessons along the way. The tone of this book is just right, with the author being very open and honest about her journey. Her cards are on the table, if you will.

The Long Tomorrow by Leigh Brackett

★★★☆☆

I wonder how much of an influence this book had on Walter M. Miller’s A Canticle For Leibowitz? They’re both post-apocalyptic books of the Long Now. While this is no masterpiece, Brackett writes evocatively of her post-nuclear America.

Being You: A New Science of Consciousness by Anil Seth

★★★☆☆

A compelling and accessible examination of a big subject. It doesn’t shy away from inherently complex topics, but manages to always be understable and downright enjoyable. I liked this book so much, I asked Anil to speak at dConstruct.

All Systems Red by Martha Wells

★★★☆☆

A good fast-paced sci-fi story that acts as a vehicle for issues of identity and socialisation. It’s brief and peppy. I’ll definitely be reading the subsequent books in the Murderbot Diaries series.

The Glass Hotel by Emily St. John Mandel

★★★☆☆

Not in the same league as Station Eleven, but a solid work, looking at the events before and after the collapse of a Ponzi scheme. It’s not a ghost story, but it’s also not not a ghost story. And it’s not about crypto …but it’s not not about crypto.

The Alchemy Of Us by Ainissa Ramirez

★★☆☆☆

I was really looking forward to reading this, but I ended up disappointed. All the stories about historical inventions were terrifically told, but then each chapter would close with an attempt to draw parallels with modern technology. Those bits were eye-rollingly simplistic. Such a shame. I wonder if they were added under pressure from the publisher to try to make the book “more relevant”? In the end, they only detracted from what would’ve otherwise been an excellent and accessible book on the history of materials science.

Looking back, I notice that The Alchemy Of Us was the last non-fiction book I read this year.

Wild Seed by Octavia E. Butler

★★★☆☆

After reading this, I decided to read the rest of the Patternist series in one go. This scene-setter is almost biblical in scope. The protagonist is like an embodiment of matriarchy, and the antogonist is a frightening archetype of toxic masculinity.

Mind Of My Mind by Octavia E. Butler

★★★☆☆

All of Butler’s works are about change in some way (as exemplified in the mantra of Earthseed: “God is change”). Change—often violent—is at the heart of Mind Of My Mind. As always, the world-building is entirely believable.

Clay’s Ark by Octavia E. Butler

★★★☆☆

This works as a standalone novel. Its connection to the rest of the Patternist series is non-existient for most of the book’s narrative. That sense of self-containment is also central to the tone of the novel. You find yourself rooting for stasis, even though you know that change is inevitable.

Pattern Master by Octavia E. Butler

★★★☆☆

By the final book in the Patternist series, the world has changed utterly. But as always, change is what drives the narrative. “The only lasting truth is Change.”

The Unreal And The Real: Selected Stories Volume 2: Outer Space, Inner Lands by Ursula K. Le Guin

★★★★☆

I’ve read quite of few of Le Guin’s novels, but I don’t think I had read any of her short stories before. That was a mistake on my part. These stories are terrific! There’s the classic The Ones Who Walk Away From Omelas to kick things off, and the quality is maintained with plenty of stories from the Hainish universe. I was struck by how many of the stories were anthropological in nature, like the centrepiece story, The Matter of Seggri.

The Galaxy, and the Ground Within by Becky Chambers

The fourth and final book in the Wayfarers series was a satisfying conclusion. I still preferred Record Of A Spaceborn Few, but that’s probably just because I preferred the setting. As always, it’s a story of tolerance and understanding. Aliens are people too, y’know.

★★★☆☆

The Táin translated by Ciaran Carson

As a story, this is ludicrous and over the top, but that’s true of any near-mythological national saga. Even though this is an English translation, a working knowledge of Irish pronunciation is handy for all the people and places enumerated throughout. In retrospect, I think I would’ve liked having the source text to hand (even if I couldn’t understand it).

★★★☆☆

The Star Of The Sea by Joseph O’Connor

I’m less than half way through this, but I’m enjoying being immersed in its language and cast of characters. You’ll have to wait until the end of 2023 for an allocation of stars for this nautical tale of the Great Hunger.


There we have it. I think the lesson this year is: you can’t go wrong with Octavia E. Butler or Ursula K. Le Guin.

And now it’s time for me to pick one favourite fiction and one favourite non-fiction book that I read in 2022.

The pool is a bit smaller for the non-fiction books, and there were some great reads in there, but I think I have to go for Rebecca Solnit’s Orwell’s Roses.

Now I have to pick a favourite work of fiction from the 18 that I read. This is hard. I loved The Lathe Of Heaven and Ghost In The Throat, but I think I’m going to have choose No One Is Talking About This by Patricia Lockwood.

If you want to read any of the books I’ve mentioned, you can find them all in this list on Bookshop.org—support independent bookshops! I bought Octavia Butler’s Patternist books at Brighton’s excellent Afori Books, located in Clearleft’s old building at 28 Kensington Street. Do swing by if you’re in the neighbourhood.

Or try your local library. Libraries are like a sci-fi concept made real.

If you’re interested in previous installments of my annual reading updates, you can peruse:

Wednesday, November 16th, 2022

BBC World TV News interview of Ariel Waldman for the NASA Artemis I launch! - YouTube

This is so cool—Ariel was on BBC World TV News live during the Artemis launch!

BBC World TV News interview of Ariel Waldman for the NASA Artemis I launch!

Saturday, November 5th, 2022

Video Interview Series #10: Caring about the World Wide Web, with Jeremy Keith - Skip To Content

Here’s a short fifteen minute video (and transcript) of an interview I did about accessibility and inclusive design. I quite like how it turned out!

Negativity bias

When I wrote about my hopes and fears for the View Transitions API, a few people latched on to this sentiment:

If the View Transitions API only works for single page apps, it could be the single worst thing to happen to the web in years.

But I also wrote:

If the View Transitions API works across page navigations, it could be the single best thing to happen to the web in years.

I think it’s worth focusing on that.

Part of the problem is that I gave my hopes and fears an equal airing. But they’re not equally likely.

Take the possibility that the View Transitions API only ships for single page apps, but never ships for regular page transitions. The consequences of that would be big—the API would act as an incentive to build single page apps. But the likelihood of that happening is small. In fact, according to Jake, there’s already an implemention for page transitions in the works at Chrome.

Now what if the View Transitions API ships for pages? The consequences would be equally big—the API would act as an incentive to ditch single page apps and build in a more performant, resilient way. Best of all, the chances of that happening are very large indeed (pretty much a certainty now, given Jake’s update).

So I made a comparison between both of the consequences, which are equally large, but I didn’t make a corresponding comparison of the likelihoods, which are not equally large. Mea culpa!

I should’ve made it clearer that, although the consequences would be really bad if the View Transitions API only supports single page apps, the actual likelihood of that is pretty slim.

That’s probably my negativity bias showing through. (The reason I have a negativity bias is because I am a human. Like, have you ever noticed that if you get feedback on something and 98% of it is positive, you inevitably fixate on the 2%?)

Anyway, the real takeaway here is that if the View Transitions API ships for pages, then the consequences will be really, really good! It would be another nail in the coffin for monolithic JavaScript frameworks slowing down the web. And best of all, the likelihood of this happening is very high!

So let me amend my closing sentences from my previous post:

If the View Transitions API only works for single page apps—which is very unlikely—it could be the single worst thing to happen to the web in years.

If the View Transitions API works across page navigations—which is very, very likely—it could be the single best thing to happen to the web in years.

The glass is half full and it’s only going to get fuller. Time to start planning for a turbo-charged web now.

If you’ve got a website with full page navigations, start thinking about how you’ll be able to apply the View Transitions API as a progressive enhancement to improve the user experience.

If you’ve got a single page app, start thinking about how to ditch a whole bunch of uneccessary dependencies to make a more lightweight foundation of HTML instead of JavaScript, and still get all those slick transitions you get in a single page app!

Time for transitions

I am simultaneously very excited and very nervous about the View Transitions API.

You may know it by its former name—Shared Element Transitions. The name change is very recent.

I’ve been saying for years that some kind of API like this would be brilliant:

I honestly think if browsers implemented this, 80% of client-rendered Single Page Apps could be done as regular good ol’-fashioned websites.

Miriam Suzanne describes the theory of View Transitions succinctly:

Shared-element transitions are designed to work with standard web navigation across multiple page loads, as well as page transitions in ‘single-page’ apps (often called SPAs).

This all sounds brilliant. But the devil is in the implementation details. Right now, the API only works for single page apps. This is totally understandable. For purely pragmatic reasons, single page apps are a simple use case to solve for. It’s going to take a lot more work to get this API to work for multi-page apps (or as we used to call them, websites).

If we get a View Transitions API that works across page navigations, it could potentially turbo-charge the web. It will act as a disencentive to building single page apps—you’d be able to provide swish transitions without sacrificing performance or resilience at the alter of a heavy-handed JavaScript-only architecture.

But if the API only ever works for single page apps (which is the current situation), then it will act as an incentive to make any kind of website into a single page app, regardless of whether it’s actually the appropriate architecture.

That prospect has me very worried indeed.

I’m making my feelings on this known just in case any of the implementators out there are thinking, “Hey, maybe it’s fine that this API only works for single page apps—I’m sure most people would be happy with that.”

If the View Transitions API works across page navigations, it could be the single best thing to happen to the web in years.

If the View Transitions API only works for single page apps, it could be the single worst thing to happen to the web in years.

Update: Jake says:

We’re currently landing code in Chrome for the MPA version.

Very happy to hear that! It’s already in the spec, but it’s good to hear that the implementation isn’t going to lag too much.

Also, read this follow-up.

Tuesday, September 27th, 2022

The Future History of the Nuclear Renaissance With Isabelle Boemeke

I really like the format of this bit of journo-fiction. An interview from the future looking back at the turning point of today.

It probably helps that I’m into nuclearpunk just as much as solarpunk, so I approve this message.

Atomkraft? Ja, bitte!

Thursday, August 11th, 2022

Let websites framebust out of native apps | Holovaty.com

Adrian brings an excellent historical perspective to the horrifying behaviour of Facebook’s in-app browsers:

Somewhere along the way, despite a reasonably strong anti-framing culture, framing moved from being a huge no-no to a huge shrug. In a web context, it’s maligned; in a native app context, it’s totally ignored.

Yup, frames are back—but this time they’re in native apps—with all their shocking security implications:

The more I think about it, the more I cannot believe webviews with unfettered JavaScript access to third-party websites ever became a legitimate, accepted technology. It’s bad for users, and it’s bad for websites.

By the way, this also explains that when you try browsing the web in an actual web browser on your mobile device, every second website shoves a banner in your face saying “download our app.” Browsers offer users some protection. In-app webviews offer users nothing but exploitation.

Monday, July 11th, 2022

The Dangerous Populist Science of Yuval Noah Harari ❧ Current Affairs

We have been seduced by Harari because of the power not of his truth or scholarship but of his storytelling. As a scientist, I know how difficult it is to spin complex issues into appealing and accurate storytelling. I also know when science is being sacrificed to sensationalism. Yuval Harari is what I call a “science populist.” (Canadian clinical psychologist and YouTube guru Jordan Peterson is another example.) Science populists are gifted storytellers who weave sensationalist yarns around scientific “facts” in simple, emotionally persuasive language. Their narratives are largely scrubbed clean of nuance or doubt, giving them a false air of authority—and making their message even more convincing. Like their political counterparts, science populists are sources of misinformation. They promote false crises, while presenting themselves as having the answers. They understand the seduction of a story well told—relentlessly seeking to expand their audience—never mind that the underlying science is warped in the pursuit of fame and influence.

This tracks.

Harari has seduced us with his storytelling, but a close look at his record shows that he sacrifices science to sensationalism, often makes grave factual errors, and portrays what should be speculative as certain.

Sunday, May 15th, 2022

Image previews with the FileReader API

I added a “notes” section to this website eight years ago. I set it up so that notes could be syndicated to Twitter. Ever since then, that’s the only way I post to Twitter.

A few months later I added photos to my notes. Again, this would get syndicated to Twitter.

Something’s bothered me for a long time though. I initially thought that if I posted a photo, then the accompanying text would serve as a decription of the image. It could effectively act as the alt text for the image, I thought. But in practice it didn’t work out that way. The text was often a commentary on the image, which isn’t the same as a description of the contents.

I needed a way to store alt text for images. To make it more complicated, it was possible for one note to have multiple images. So even though a note was one line in my database, I somehow needed a separate string of text with the description of each image in a single note.

I eventually settled on using the file system instead of the database. The images themselves are stored in separate folders, so I figured I could have an accompanying alt.txt file in each folder.

Take this note from yesterday as an example. Different sizes of the image are stored in the folder /images/uploaded/19077. Here’s a small version of the image and here’s the original. In that same folder is the alt text.

This means I’m reading a file every time I need the alt text instead of reading from a database, which probably isn’t the most performant way of doing it, but it seems to be working okay.

Here’s another example:

In order to add the alt text to the image, I needed to update my posting interface. By default it’s a little textarea, followed by a file upload input, followed by a toggle (a checkbox under the hood) to choose whether or not to syndicate the note to Twitter.

The interface now updates automatically as soon as I use that input type="file" to choose any images for the note. Using the FileReader API, I show a preview of the selected images right after the file input.

Here’s the code if you ever need to do something similar. I’ve abstracted it somewhat in that gist—you should be able to drop it into any page that includes input type="file" accept="image/*" and it will automatically generate the previews.

I was pleasantly surprised at how easy this was. The FileReader API worked just as expected without any gotchas. I think I always assumed that this would be quite complex to do because once upon a time, it was quite complex (or impossible) to do. But now it’s wonderfully straightforward. Story of the web.

My own version of the script does a little bit more; it also generates another little textarea right after each image preview, which is where I write the accompanying alt text.

I’ve also updated my server-side script that handles the syndication to Twitter. I’m using the /media/metadata/create method to provide the alt text. But for some reason it’s not working. I can’t figure out why. I’ll keep working on it.

In the meantime, if you’re looking at an image I’ve posted on Twitter and you’re judging me for its lack of alt text, my apologies. But each tweet of mine includes a link back to the original note on this site and you will most definitely find the alt text for the image there.

Sunday, March 6th, 2022

A bug with progressive web apps on iOS

Dave recently wrote some good advice about what to do—and what not to do—when it comes to complaining about web browsers. I wrote something on this topic a little while back:

If there’s something about a web browser that you’re not happy with (or, indeed, if there’s something you’re really happy with), take the time to write it down and publish it

To summarise Dave’s advice, avoid conspiracy theories and snark; stick to specifics instead.

It’s very good advice that I should heed (especially the bit about avoiding snark). In that spirit, I’d like to document what I think is a bug on iOS.

I don’t need to name the specific browser, because there is basically only one browser allowed on iOS. That’s not snark; that’s a statement of fact.

This bug involves navigating from a progressive web app that has been installed on your home screen to an external web view.

To illustrate the bug, I’ll use the example of The Session. If you want to recreate the bug, you’ll need to have an account on The Session. Let me know if you want to set up a temporary account—I can take care of deleting it afterwards.

Here are the steps:

  1. Navigate to thesession.org in Safari on an iOS device.
  2. Add the site to your home screen.
  3. Open the installed site from your home screen—it will launch in standalone mode.
  4. Log in with your username and password.
  5. Using the site menu, navigate to the links section of the site.
  6. Click on any external link.
  7. After the external link opens in a web view, tap on “Done” to close the web view.

Expected behaviour: you are returned to the page you were on with no change of state.

Actual behaviour: you are returned to the page you were on but you are logged out.

So the act of visiting an external link in a web view while in a progressive web app in standalone mode seems to cause a loss of cookie-based authentication.

This isn’t permanent. Clicking on any internal link restores the logged-in state.

It is surprising though. My mental model for opening an external link in a web view is that it sits “above” the progressive web app, which remains in stasis “behind” it. But the page must actually be reloading, either when the web view is opened or when the web view is closed. And that reload is behaving like a fetch event without credentials.

Anyway, that’s my bug report. It may already be listed somewhere on the WebKit Bugzilla but I lack the deductive skills to find it. I’m not even sure if that’s the right place for this kind of bug. It might be specific to the operating system rather than the rendering engine.

This isn’t a high priority bug, but it is one of those cumulatively annoying software paper cuts.

Hope this helps!

Monday, January 31st, 2022

Science Fiction and Philosophy - Five Books Expert Recommendations

I’ve only read three of these five books, but after reading this rollicking interview with Eric Schwitzgebel, I’ve added the other two recommendations to my wishlist.

Thursday, December 30th, 2021

Books I read in 2021

I read 26 books in 2021, which is a bit more than I read in 2020. That said, some of them were brief books. I don’t think I actually read any more than my usual annual allotment of words.

I’m glad that I’m tracking my reading here on my own site. About halfway through the year I thought that I was doing a pretty good job of reading a mix of books from men and women, but a glance at my reading list showed that wasn’t the case at all and I was able to adjust my intake accordingly. I wasn’t doing as badly as some but by just keeping an ongoing reading list is a handy to spot any worrying trends.

I continued my practice of alternating between fiction and non-fiction. It’s working for me.

Now that the year is at an end, I’m going to my traditional round-up and give a little review of each book. I’m also going to engage in the pointless and annoying practice of assigning a rating out of five stars for each book.

To calibrate:

  • a one-star book would be rubbish,
  • a two-star book would be perfectly fine,
  • a three-star book would be good,
  • a four-star book would be excellent, and
  • a five-star book is unheard of.

This is How You Lose the Time War by Amal El-Mohtar and Max Gladstone

★★★☆☆

I was reading this at the end of 2020 and finished it at the start of 2021. I let it wash over me, which I think is how this impressionistic and rightly short book is meant to be enjoyed. But I might just be telling myself that because I wasn’t following it closely enough.

Humankind: A Hopeful History by Rutger Bregman

★★★★☆

A terrific book about human nature. As I wrote at the time, it makes a great companion piece to—and is influenced by—Rebecca Solnit’s excellent A Paradise Built In Hell.

The only frustrating facet of Bregman’s book is that it’s also influenced by Yuval Noah Harari’s mess Sapiens. That’s probably where it gets its wrong-headed fantasy about the evils of the agricultural revolution and the glories of a pre-civilisational nomadic lifestyle. Fortunately it sounds like this pernicious myth is in for a well-earned skewering in Davids Graeber and Wengrow’s new book The Dawn of Everything

Apart from that though, Humankind is pretty darn wonderful.

The Stinging Fly Issue 43/Volume Two Winter 2020-21 — The Galway 2020 Edition edited by Lisa McInerney and Elaine Feeney

★★★☆☆

Reading this collection of stories, poems and essays was my way of travelling to Galway when a global pandemic prevented me from actually going there. The quality was consistently high and some of the stories really stayed with me.

The Moment of Eclipse by Brian Aldiss

★★☆☆☆

Another pulp paperback of short stories from Brian Aldiss. I wrote about reading this book.

Sustainable Web Design by Tom Greenwood

★★★☆☆

Reading a title from A Book Apart almost feels like a cheat—the books are laser-focused into a perfectly brief length. This one is no exception and the topic is one that every web designer and developer needs to be versed in.

Lagoon by Nnedi Okorafor

★★★☆☆

A thoroughly enjoyable first-contact story set in Nigeria. It’s absolutely dripping in atmosphere and features fully-formed characters that feel grounded even when in the middle of fantastical events.

Broad Band: The Untold Story of the Women Who Made the Internet by Claire L. Evans

★★★★★

Yeah, that’s right: five stars! This books is superb, the perfect mix of subject matter and style as I wrote as soon as I finished it. What a writer!

British Ice by Owen D. Pomery

★★☆☆☆

This is a bit of a cheat on my part. It’s a short graphic novel, and the story is told more through pictures than words. The story is somewhat slight but the imagary, like the landscape being described, is hauntingly sparse.

Klara and the Sun by Kazuo Ishiguro

★★★☆☆

This one divided opinion. I thought that, on the whole, the novel worked. There are moments of seeing the world through a robot’s eyes that feel truly alien. It’s not in the same league as Never Let Me Go, but it does share the same feeling of bleak inevitability. So not a feelgood book then.

It pairs nicely with Ian McEwan’s recent Machines Like Us to see how two respected mainstream authors approach a genre topic.

Invisible Women: Exposing Data Bias in a World Designed for Men by Caroline Criado Perez

★★★☆☆

Sharp and scathing, this is a thorough exposé. Sometimes it feels a little too thorough—there are a lot of data points that might have been better placed in footnotes. Then again, the whole point of this book is that the data really, really matters so I totally get why it’s presented this way.

A Memory Called Empire by Arkady Martine

★★★☆☆

Properly good human-level space opera with oodles of political intrigue. I will definitely be reading the next book in the series.

My Rock ‘n’ Roll Friend by Tracey Thorn

★★★☆☆

I really enjoyed this account of the friendship between Tracey Thorn and Lindy Morrison. I’m a huge Go-Betweens fan, but the band’s story is almost always told from the perspective of the boys, Grant and Robert. You could say that those narratives have (puts on sunglasses) …Everything But The Girl.

Anyway, this was a refreshing alternative. Writing about music is notoriously tricky, but this might be the best biography of a musician I’ve read.

Piranesi by Susanna Clarke

★★★★☆

I loved this! If I tried to give a plot synopsis, it would sound ridiculous, like someone describing their dreams. But somehow this works in a way that feels cohesive and perfectly internally consistent. Just read it—you won’t regret it.

On Writing: A Memoir of the Craft by Stephen King

★★★☆☆

I enjoy reading books about the craft of writing and this is one that I had been meaning to read for years. It didn’t disappoint. That said, I think I might have enjoyed it more as an autobiography of an American childhood than as a guide to writing. Some of the writing advice is dispensed as gospel when really, that’s just like your opinion, man.

A Brilliant Void: A Selection of Classic Irish Science Fiction edited by Jack Fennell

★★☆☆☆

A quirky collection of 19th century and early 20th century short stories. Today we’d probably classify them as fantasy more than science fiction. What was really interesting was reading the biographies of the writers. The collection has an impressive amount of stories by fascinating women. Kudos to Jack Fennell for the curation.

Let The Game Do Its Work by J.M. Berger

★★☆☆☆

An enjoyable little study of dystopian film sports (I’ve always wanted to do a movie marathon on that theme). The format of this work is interesting. It’s not a full-length book. Instead it’s like a quick exploration of the topic to see whether it should be a full-length book. Personally, I think this is enough. Frankly, I can think of plenty of full-length non-fiction books that should’ve been more like this length.

The City We Became by N. K. Jemisin

★★★☆☆

Sci-fi? Fantasy? Magical realism? This has a premise that’s tricky to pull off, but it works. That said, I think it could’ve been shorter. I enjoyed this but I’m not sure if I’ll be reading any sequels.

Factfulness: Ten Reasons We’re Wrong About The World - And Why Things Are Better Than You Think by Hans Rosling with Ola Rosling and Anna Rosling Roennlund

★★★★☆

Wonderful! A book about facts and figures with a very human soul. It can be summed up in this quote:

The world cannot be understood without numbers. And it cannot be understood with numbers alone.

Sometimes the self-effacing style of the late Hans Rosling can be a little grating, but overall this is a perfectly balanced book.

The Sunken Land Begins to Rise Again by M. John Harrison

★★★☆☆

Dripping with creepy Brexity atmosphere, this is more of a slow rising damp than a slow burn. But while the writing is terrific at the sentence level, it didn’t quite pull me in as a book. I admired it more than I enjoyed it.

The Relentless Moon by Mary Robinette Kowal

★★★☆☆

More escapist wish fulfilment in the Lady Astronaut series. These books aren’t great literature by any stretch, but I find the premise of an alternative history of the space race very appealing (like For All Mankind). This third book has a change of narrator and a change of scene: the moon.

Let It Go: My Extraordinary Story - From Refugee to Entrepreneur to Philanthropist by Dame Stephanie Shirley

★★★★☆

Absolutely brilliant! Both the book and the author, I mean. Steve Shirley is a hero of mine so it’s gratifying to find that she’s a great writer along with being a great person. Her story is by turns astonishing and heartbreaking. She conveys it all in an honest, heartfelt, but matter-of-fact manner.

I didn’t expect to find resonances in here about my own work, but it turns out that Clearleft wouldn’t have been able to become an employee-owned company without the groundwork laid down by Steve Shirley.

If you’re ever tempted to read some self-help business autobiography by some dude from Silicon Valley, don’t—read this instead.

Binti: The Night Masquerade by Nnedi Okorafor

★★★☆☆

The third in the Binti series of novellas is just as good as the previous two. This is crying out to be turned into a television show that I would most definitely watch.

Design For Safety by Eva PenzeyMoog

★★★☆☆

Another excellent addition to the canon of A Book Apart. I found myself noting down quotations that really resonated.

Parable of the Sower by Octavia E. Butler

★★★★☆

Excellent writing once again from Octavia Butler. Like Kindred, this can be harrowing at times but there’s a central core of humanity running through even the darkest moments. I’ll definitely be reading Parable of the Talents.

Responsible JavaScript by Jeremy Wagner

★★★☆☆

It will come as a surprise to absolutely no one that this book was right up my alley. I was nodding my head vigorously at many passages. While I might talk about progressive enhancement at the theoretical level, my fellow Jeremy dives deep into the practicalities. If you write JavaScript, you have to read this book.

Record of a Spaceborn Few by Becky Chambers

★★★☆☆

I wasn’t that into the first book in the Wayfarers series. I enjoyed the second one more. When it came to this third installment, I was completely won over. I was in just the right mood for it after the heaviness of Parable of the Sower. There’s not much in the way of threat, but plenty in the way of warmth. I’m also a sucker for stories of generation starships.

The Road from Castlebarnagh: Growing Up in Irish Music, A Memoir by Paddy O’Brien

★★★☆☆

An enjoyable series of vignettes told from the viewpoint of a young boy growing up in rural Ireland. I was hoping for more stories of the music, but if you’re involved in trad music in any way, this is well worth a read.


Now it’s time to choose one book of the year from the fiction stack and one book of the year from non-fiction.

In any other year I think Parable of the Sower would be the fiction winner, but this year I’m going to have to go for Piranesi.

There’s stiff competition in the non-fiction category: Humankind, Factfulness, and Let It Go are all excellent. But it’s got to be Broad Band.

Most of these books are available on Bookshop if you fancy reading any of them.

And for context, here’s:

Thursday, September 9th, 2021

Why We Create Progressive Web Apps: A Conversation with Jeremy Keith

This is a really nice write-up by Sydney of the chat we had on her podcast.