Archive: March, 2020

184

                    5th                     10th                     15th                     20th                     25th                     30th     
12am          
4am  
8am                                              
12pm                                                  
4pm                                    
8pm                

map

Tuesday, March 31st, 2020

This Is Not the Apocalypse You Were Looking For | WIRED

I just love the way that Laurie Penny writes.

In the end, it will not be butchery. Instead it will be bakery, as everyone has apparently decided that the best thing to do when the world lurches sideways is learn to make bread. Yeast is gone from the shops. Even I have been acting out in the kitchen, although my baked goods are legendarily dreadful. A friend and former roommate, who knows me well, called from Berlin to ask if I had “made the terrible, horrible biscuits yet.” These misfortune cookies tend to happen at moments of such extreme stress that those around me feel obliged to eat them. They say that if you can make a cake, you can make a bomb; if the whole thing implodes, my job will not be in munitions.

Playing The High Part Of The Road (jig) on mandolin:

https://thesession.org/tunes/183

https://www.youtube.com/watch?v=kC7M7PTC4Z8

The High Part Of The Road (jig) on mandolin

Replying to a tweet from @trysmudford

Thank you for listening!

Monday, March 30th, 2020

Replying to a tweet from @zeldman

❤️

Replying to a tweet from @briankardell

Thank you very much, Brian—glad you like ’em!

Replying to a tweet from @justingoboom

Might be a good use for the pre element to preserve formatting.

In fact, that very use case is mentioned in the spec:

https://html.spec.whatwg.org/#the-pre-element

Replying to a tweet from @brad_frost

Violent Femmes, Blister In The Sun?

Living Through The Future

You can listen to audio version of Living Through The Future.

Usually when we talk about “living in the future”, it’s something to do with technology: smartphones, satellites, jet packs… But I’ve never felt more like I’m living in the future than during The Situation.

On the one hand, there’s nothing particularly futuristic about living through a pandemic. They’ve occurred throughout history and this one could’ve happened at any time. We just happen to have drawn the short straw in 2020. Really, this should feel like living in the past: an outbreak of a disease that disrupts everyone’s daily life? Nothing new about that.

But there’s something dizzyingly disconcerting about the dominance of technology. This is the internet’s time to shine. Think you’re going crazy now? Imagine what it would’ve been like before we had our network-connected devices to keep us company. We can use our screens to get instant updates about technologies of world-shaping importance …like beds and face masks. At the same time as we’re starting to worry about getting hold of fresh vegetables, we can still make sure that whatever meals we end up making, we can share them instantaneously with the entire planet. I think that, despite William Gibson’s famous invocation, I always figured that the future would feel pretty futuristic all ‘round—not lumpy with old school matters rubbing shoulders with technology so advanced that it’s indistinguishable from magic.

When I talk about feeling like I’m living in the future, I guess what I mean is that I feel like I’m living at a time that will become History with a capital H. I start to wonder what we’ll settle on calling this time period. The Covid Point? The Corona Pause? 2020-P?

At some point we settled on “9/11” for the attacks of September 11th, 2001 (being a fan of ISO-8601, I would’ve preferred 2001-09-11, but I’ll concede that it’s a bit of a mouthful). That was another event that, even at the time, clearly felt like part of History with a capital H. People immediately gravitated to using historical comparisons. In the USA, the comparison was Pearl Harbour. Outside of the USA, the comparison was the Cuban missile crisis.

Another comparison between 2001-09-11 and what we’re currently experiencing now is how our points of reference come from fiction. Multiple eyewitnesses in New York described the September 11th attacks as being “like something out of a movie.” For years afterwards, the climactic showdowns in superhero movies that demolished skyscrapers no longer felt like pure escapism.

For The Situation, there’s no shortage of prior art to draw upon for comparison. If anthing, our points of reference should be tales of isolation like Robinson Crusoe. The mundane everyday tedium of The Situation can’t really stand up to comparison with the epic scale of science-fictional scenarios, but that’s our natural inclination. You can go straight to plague novels like Stephen King’s The Stand or Emily St. John Mandel’s Station Eleven. Or you can get really grim and cite Cormac McCarthy’s The Road. But you can go the other direction too and compare The Situation with the cozy catastrophes of John Wyndham like Day Of The Triffids (or just be lazy and compare it to any of the multitude of zombie apocalypses—an entirely separate kind of viral dystopia).

In years to come there will be novels set during The Situation. Technically they will be literary fiction—or even historical fiction—but they’ll feel like science fiction.

I remember the Chernobyl disaster having the same feeling. It was really happening, it was on the news, but it felt like scene-setting for a near-future dystopian apocalypse. Years later, I was struck when reading Wolves Eat Dogs by Martin Cruz-Smith. In 2006, I wrote:

Halfway through reading the book, I figured out what it was: Wolves Eat Dogs is a Cyberpunk novel. It happens to be set in present-day reality but the plot reads like a science-fiction story. For the most part, the book is set in the post-apocolyptic landscape of Prypiat, near Chernobyl. This post-apocolyptic scenario just happens to be real.

The protagonist, Arkady Renko, is sent to this frightening hellish place following a somewhat far-fetched murder in Moscow. Killing someone with a minute dose of a highly radioactive material just didn’t seem like a very realistic assassination to me.

Then I saw the news about Alexander Litvinenko, the former Russian spy who died this week, quite probably murdered with a dose of polonium-210.

I’ve got the same tingling feeling about The Situation. Fact and fiction are blurring together. Past, present, and future aren’t so easy to differentiate.

I really felt it last week standing in the back garden, looking up at the International Space Station passing overhead on a beautifully clear and crisp evening. I try to go out and see the ISS whenever its flight path intersects with southern England. Usually I’d look up and try to imagine what life must be like for the astronauts and cosmonauts on board, confined to that habitat with nowhere to go. Now I look up and feel a certain kinship. We’re all experiencing a little dose of what that kind of isolation must feel like. Though, as the always-excellent Marina Koren points out:

The more experts I spoke with for this story, the clearer it became that, actually, we have it worse than the astronauts. Spending months cooped up on the ISS is a childhood dream come true. Self-isolating for an indefinite period of time because of a fast-spreading disease is a nightmare.

Whenever I look up at the ISS passing overhead I feel a great sense of perspective. “Look what we can do!”, I think to myself. “There are people living in space!”

Last week that feeling was still there but it was tempered with humility. Yes, we can put people in space, but here we are with our entire way of life put on pause by something so small and simple that it’s technically not even a form of life. It’s like we’re the martians in H.G. Wells’s War Of The Worlds; all-conquering and formidable, but brought low by a dose of dramatic irony, a Virus Ex Machina.

Replying to a tweet from @adactio

Consequently, nobody on iOS—other than devs like you and me—ever adds any websites to their home screens (progressive web apps or otherwise).

Replying to a tweet from @mrgnrdrck

Chrome, Opera and Samsung Internet “promote” progressive web apps and encourage users to add them to their home screen (becuase—thanks to the manifest file—once opened from there, they behave just like native apps). Safari does nothing.

Brighton Quarantine Delivery

Fellow Brightonians, here’s a handy one-stop shop for all the places doing deliveries right now, generated from this spreadsheet by Chris Boakes.

Replying to a tweet from @mrgnrdrck

It wouldn’t. I don’t understand what you’re asking. The issue is with the sites (the vast majority) that aren’t being added to the home screen—they’re the ones being hobbled by this 7 day deletion.

Playing The Earl’s Chair (reel) on mandolin:

https://thesession.org/tunes/221

https://www.youtube.com/watch?v=_MZ5mh-PwP0

The Earl’s Chair (reel) on mandolin

HTML DOM - Common tasks of managing HTML DOM with vanilla JavaScript

This is a great way to organise code snippets—listed by use case, and searchable too!

Next time you’re stuck on some DOM scripting, before reaching for a framework or library, check here first.

Hobbies for the hell of it | Brad Frost

We should celebrate our hobbies for the joy-giving activities they are, and recognize that they don’t need to become anything bigger than that. And of course that’s not to say they those hobbies can’t turn into something bigger — it’s incredible when your passions and your occupation overlap — but it should be because you want to rather than that you feel pressured to. Not every activity you do needs to become a big official thing.

To-Do Terrarium

I love this little to-do app! Every time you tick something off your list, something grows in your virtual terrarium. Lovely!

Prioritising Requirements | Trys Mudford

Over the past few years, I’ve given quite a few workshops and talks on evaluating technology. This methodical approach to evaluation and prioritisation from Trys is right up my alley!

In any development project, there is a point at which one must decide on the tech stack. For some, that may feel like a foregone conclusion, dictated by team appetite and experience.

Even if the decision seems obvious, it’s always worth sense-checking your thought process. Along with experience and gut-feelings, we also have blind-spots and biases.

I feel like there’s a connection here to having good design principles—the kind that explicitly value one facet over another.

Sunday, March 29th, 2020

Reading The Fabric Of Reality by David Deutsch.

Buy this book

I felt it right there in my chest, the cool clutch of a cliché: my heart sank.

— Machines Like Me

My radio, with its irregular blobs of solder on a board, appears no less a wonder than consciousness itself arising from matter.

— Machines Like Me

Replying to a tweet from @mdenieffe

Oh, nice! I’ll add that site to the links section of The Session:

https://thesession.org/links

Playing Bonaparte Crossing The Rhine (hornpipe) on mandolin: https://thesession.org/tunes/7 https://www.youtube.com/watch?v=74xrIsxL84Q

Playing Bonaparte Crossing The Rhine (hornpipe) on mandolin:

https://thesession.org/tunes/7

https://www.youtube.com/watch?v=74xrIsxL84Q

Bonaparte Crossing The Rhine (hornpipe) on mandolin

Saturday, March 28th, 2020

Playing Donnybrook Fair (jig) on mandolin: https://thesession.org/tunes/26 https://www.youtube.com/watch?v=dlAo5x-NUj0

Playing Donnybrook Fair (jig) on mandolin:

https://thesession.org/tunes/26

https://www.youtube.com/watch?v=dlAo5x-NUj0

Donnybrook Fair (jig) on mandolin

Replying to a tweet from @mxbck

Enjoy!

Replying to a tweet from @KatieELambert

I’m so sorry, Katie.

Replying to a tweet from @betterThanMin

They’re both asynchronous actions—using cache and using fetch—and the waitUntil ensures that when one of them is done, the other still carries on. It doesn’t mean that one waits until the other is done.

Replying to a tweet from @betterThanMin

The return part still happens first though. The waitUntil ensures that the service worker doesn’t “hang up” while you’re getting the fresh version from the network, but while that’s happening, the user has been served the cached file.

Replying to a tweet from @betterThanMin

Sure. Fire away.

Friday, March 27th, 2020

It’s another clear night tonight and the @Space_Station will pass overhead at 7:42pm.

Look to the skies, my friends!

So no one told us the internet was gonna be this way | The Outline

An interview with Joanne McNeil about her new book, Lurking:

Someone who was creating, say, a small decentralized community for a specific group of people would not have luck finding investors, as opposed to Facebook, which sought to build a platform for all.

‘Sfunny, when I was on Quarantine Book Club the other day, this is exactly what I talked about one point—how Facebook (and venture capital) moved the goalposts on what constitutes success and failure on the web.

Replying to a tweet from @csswizardry

You’re just like Tom Cruise in that film!…

Rain Man.

Let a website be a worry stone

I find myself thinking about writing more than usual at the moment. This is partially because I am inspired by more people sharing their own thoughts and stories, but also because I want to record how I’m feeling, and what’s happening on a day-to-day basis.

Playing Paddy Fahey’s (reel) on mandolin: https://thesession.org/tunes/150 https://www.youtube.com/watch?v=o-1E7qrAulM

Playing Paddy Fahey’s (reel) on mandolin:

https://thesession.org/tunes/150

https://www.youtube.com/watch?v=o-1E7qrAulM

Paddy Fahey’s (reel) on mandolin

Replying to a tweet from @harrybr

The Raven Tower by Ann Leckie.

Binti by Nnedi Okorafor.

Rosewater by Tade Thompson.

Thursday, March 26th, 2020

Literally everyone on my street came to their doors at 8pm to cheer and clap for the NHS and I think I might have a little something in my eye. #ClapForCarers

Replying to a tweet from @TimoTijhof

Explain to me how a service worker could be abused, given its same-origin policy.

Replying to a tweet from @briankardell

I think when I (or someone else) says the word “enhancement” what you hear is “just an enhancement”—I think that may be at the heart of your Colombo-like feigned confusion.

Playing The Yellow Wattle (jig) on mandolin: https://thesession.org/tunes/1237 https://www.youtube.com/watch?v=90GbCBKrHng

Playing The Yellow Wattle (jig) on mandolin:

https://thesession.org/tunes/1237

https://www.youtube.com/watch?v=90GbCBKrHng

The Yellow Wattle (jig) on mandolin

I very much hope that Safari devs will be reasonable and not go ahead with the drastic hobbling of service workers that they’re planning:

https://adactio.com/journal/16619

Replying to a tweet from @briankardell

Brian, there’s a world of difference between something being a useful enhancement you can add to any website, and something that’s so hobbled as to be not worth your time.

Replying to a tweet from @TimoTijhof

That’s only true if the website has been added to the home screen (which is very, very rare). Most websites using service workers (and almost all progressive web apps) are badly affected by this drastic change.

Join me at 4pm UK time for Quarantine Book Club:

https://www.eventbrite.com/e/quarantine-book-club-jeremy-keith-tickets-100923242134

We can chat about Resilient Web Design. Or I can just play mandolin. Your call.

Apple’s attack on service workers

Apple aren’t the best at developer relations. But, bad as their communications can be, I’m willing to cut them some slack. After all, they’re not used to talking with the developer community.

John Wilander wrote a blog post that starts with some excellent news: Full Third-Party Cookie Blocking and More. Safari is catching up to Firefox and disabling third-party cookies by default. Wonderful! I’ve had third-party cookies disabled for a few years now, and while something occassionally breaks, it’s honestly a pretty great experience all around. Denying companies the ability to track users across sites is A Good Thing.

In the same blog post, John said that client-side cookies will be capped to a seven-day lifespan, as previously announced. Just to be clear, this only applies to client-side cookies. If you’re setting a cookie on the server, using PHP or some other server-side language, it won’t be affected. So persistent logins are still doable.

Then, in an audacious example of burying the lede, towards the end of the blog post, John announces that a whole bunch of other client-side storage technologies will also be capped to seven days. Most of the technologies are APIs that, like cookies, can be used to store data: Indexed DB, Local Storage, and Session Storage (though there’s no mention of the Cache API). At the bottom of the list is this:

Service Worker registrations

Okay, let’s clear up a few things here (because they have been so poorly communicated in the blog post)…

The seven day timer refers to seven days of Safari usage, not seven calendar days (although, given how often most people use their phones, the two are probably interchangable). So if someone returns to your site within a seven day period of using Safari, the timer resets to zero, and your service worker gets a stay of execution. Lucky you.

This only applies to Safari. So if your site has been added to the home screen and your web app manifest has a value for the “display” property like “standalone” or “full screen”, the seven day timer doesn’t apply.

That piece of information was missing from the initial blog post. Since the blog post was updated to include this clarification, some people have taken this to mean that progressive web apps aren’t affected by the upcoming change. Not true. Only progressive web apps that have been added to the home screen (and that have an appropriate “display” value) will be spared. That’s a vanishingly small percentage of progressive web apps, especially on iOS. To add a site to the home screen on iOS, you need to dig and scroll through the share menu to find the right option. And you need to do this unprompted. There is no ambient badging in Safari to indicate that a site is installable. Chrome’s install banner isn’t perfect, but it’s better than nothing.

Just a reminder: a progressive web app is a website that

  • runs on HTTPS,
  • has a service worker,
  • and a web manifest.

Adding to the home screen is something you can do with a progressive web app (or any other website). It is not what defines progressive web apps.

In any case, this move to delete service workers after seven days of using Safari is very odd, and I’m struggling to find the connection to the rest of the blog post, which is about technologies that can store data.

As I understand it, with the crackdown on setting third-party cookies, trackers are moving to first-party technologies. So whereas in the past, a tracking company could tell its customers “Add this script element to your pages”, now they have to say “Add this script element and this script file to your pages.” That JavaScript file can then store a unique idenitifer on the client. This could be done with a cookie, with Local Storage, or with Indexed DB, for example. But I’m struggling to understand how a service worker script could be used in this way. I’d really like to see some examples of this actually happening.

The best explanation I can come up with for this move by Apple is that it feels like the neatest solution. That’s neat as in tidy, not as in nifty. It is definitely not a nifty solution.

If some technologies set by a specific domain are being purged after seven days, then the tidy thing to do is purge all technologies from that domain. Service workers are getting included in that dragnet.

Now, to be fair, browsers and operating systems are free to clean up storage space as they see fit. Caches, Local Storage, Indexed DB—all of those are subject to eventually getting cleaned up.

So I was curious. Wanting to give Apple the benefit of the doubt, I set about trying to find out how long service worker registrations currently last before getting deleted. Maybe this announcement of a seven day time limit would turn out to be not such a big change from current behaviour. Maybe currently service workers last for 90 days, or 60, or just 30.

Nope:

There was no time limit previously.

This is not a minor change. This is a crippling attack on service workers, a technology specifically designed to improve the user experience for return visits, whether it’s through improved performance or offline access.

I wouldn’t be so stunned had this announcement come with an accompanying feature that would allow Safari users to know when a website is a progressive web app that can be added to the home screen. But Safari continues to ignore the existence of progressive web apps. And now it will actively discourage people from using service workers.

If you’d like to give feedback on this ludicrous development, you can file a bug (down in the cellar in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying “Beware of the Leopard”).

No doubt there will still be plenty of Apple apologists telling us why it’s good that Safari has wished service workers into the cornfield. But make no mistake. This is a terrible move by Apple.

I will say this though: given The Situation we’re all living in right now, some good ol’ fashioned Hot Drama by a browser vendor behaving badly feels almost comforting.

Replying to a tweet from @Ahhhellgarp

Zarjaz!

Replying to a tweet from @ravavyr

I do not. I think it is the furthest thing from “fine”.

Replying to a tweet from @ravavyr

That’s right. And on iOS in particular, a vanishingly small number of offline apps are ever added to the home screen.

A progressive web app means HTTPS+service worker+manifest. It does not mean “added to home screen”.

Replying to a tweet from @brucel

Not true. They aren’t deleting service workers for sites added to the home screen. That’s a vanishingly small percentage of progressive web apps.

Added to home screen != progressive web app.

Let a website be a worry stone. — Ethan Marcotte

It was a few years before I realized that worry stones had a name, that they were borrowed from cultures other and older than mine. Heck, it’s been more than a few years since I’ve even held one. But in the last few weeks, before and after launching the redesign, I’ve kept working away at this website, much as I’d distractedly run my fingers over a smooth, flat stone.

CSS Can Influence Screenreaders | Ben Myers

This surprises me. But forewarned is forearmed.

Charlie Walton - Charlie Walton’s Blog

This is my favourite website now.

Wednesday, March 25th, 2020

Replying to a tweet from @jonathandavis

Thank you for the response.

So this change isn’t minor—it’s a massive kick in the teeth for service workers.

(Also, I need help understanding how a third party could use service worker registrations …which have a same-origin scope.)

Just about 10 minutes ’till the next ISS flyover: 7:40pm.

People of southern England—look to the skies!

Replying to a tweet from @chefcbailey

Yes! 7:40pm this evening. Should be good one.

Replying to a tweet from @jonathandavis

Can you clarify what the previous time limit was for service workers on Safari before deletion?

(Or was there no time limit?)

Replying to a tweet from @slightlylate

I’m trying to find out what/if the time limit on service worker registrations was in Safari before this change to 7 days.

Was it a set amount of days? Was it unbounded? @johnwilander?

(Does Chrome or Firefox do anything like this?)

Replying to a tweet from @adactio

If you don’t know the answer, can you point me to someone who does?

Replying to a tweet from @alexandtheweb

Aw, thank you! 🎶

Replying to a tweet from @johnwilander

I’m trying to understand what the expiration time was for service workers across the board before this change to 7 days. Was it 30 days? 90? Indefinite?

Replying to a tweet from @johnwilander

What does “classified domains” mean in this context?

Does the 7 day (previously 30 day) time period not apply across the board to any domain that registers a service worker?

Replying to a tweet from @kylebean

With everyone using Google Hangouts right now, I bet loads of people are seeing your lovely work on the Canvas Project:

https://canvasproject.withgoogle.com/kyle-bean/

Replying to a tweet from @johnwilander

Hey John, quick question: what was the time period for deregistering service workers (and emptying caches) before this change to 7 days?

(I have it in the back of my mind it was something like 30 days without engagement—is that right?)

Playing The Lady On The Island (reel) on mandolin: https://thesession.org/tunes/938 https://www.youtube.com/watch?v=9INkXX3bDU8

Playing The Lady On The Island (reel) on mandolin:

https://thesession.org/tunes/938

https://www.youtube.com/watch?v=9INkXX3bDU8

The Lady On The Island (reel) on mandolin

Replying to a tweet from @cassiecodes

You must tweeting from an alternate universe train, right? Because you’re on your way to Manchester to run a workshop on SVG animations tomorrow.

I Don’t Care What Google or Apple or Whomever Did | Adrian Roselli

Cargo cultism is not a strategy:

Apple and Google get it wrong just as often as the rest of us.

Tuesday, March 24th, 2020

Replying to a tweet from @danielpietzsch

Yes, I linked to that in my post (at the end).

BBC - Future Media Standards & Guidelines - Accessibility Guidelines v2.0

A timely reminder:

The minimum dependency for a web site should be an internet connection and the ability to parse HTML.

Scatternotes - QuirksBlog

Jeremy is right. Writing helps. I feel better already.

See?

Oh, embed!

I wrote yesterday about how messing about on your own website can be a welcome distraction. I did some tinkering with adactio.com on the weekend that you might be interested in.

Let me set the scene…

I’ve started recording and publishing a tune a day. I grab my mandolin, open up Quicktime and make a movie of me playing a jig, a reel, or some other type of Irish tune. I include a link to that tune on The Session and a screenshot of the sheet music for anyone who wants to play along. And I embed the short movie clip that I’ve uploaded to YouTube.

Now it’s not the first time I’ve embedded YouTube videos into my site. But with the increased frequency of posting a tune a day, the front page of adactio.com ended up with multiple embeds. That is not good for performance—my Lighthouse score took quite a hit. Worst of all, if a visitor doesn’t end up playing an embedded video, all of the markup, CSS, and JavaScript in the embedded iframe has been delivered for nothing.

Meanwhile over on The Session, I’ve got a strategy for embedding YouTube videos that’s better for performance. Whenever somebody posts a link to a video on YouTube, the thumbnail of the video is embedded. Only when you click the thumbnail does that image get swapped out for the iframe with the video.

That’s what I needed to do here on adactio.com.

First off, I should explain how I’m embedding things generally ‘round here. Whenever I post a link or a note that has a URL in it, I run that URL through a little PHP script called getEmbedCode.php.

That code checks to see if the URL is from a service that provides an oEmbed endpoint. A what-Embed? oEmbed!

oEmbed is like a minimum viable read-only API. It was specced out by Leah and friends years back. You ping a URL like this:

http://example.com/oembed?url=https://example.com/thing

In this case http://example.com/oembed is the endpoint and url is the value of a URL from that provider. Here’s a real life example from YouTube:

https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=-eiqhVmSPcs

So https://www.youtube.com/oembed is the endpoint and url is the address of any video on YouTube.

You get back some JSON with a pre-defined list of values like title and html. That html payload is the markup for your embed code.

By default, YouTube sends back markup like this:

<iframe
width="480"
height="270"
src="https://www.youtube.com/embed/-eiqhVmSPcs?feature=oembed"
frameborder="0
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>

But now I want to use an img instead of an iframe. One of the other values returned is thumbnail_url. That’s the URL of a thumbnail image that looks something like this:

https://i.ytimg.com/vi/-eiqhVmSPcs/hqdefault.jpg

In fact, once you know the ID of a YouTube video (the ?v= bit in a YouTube URL), you can figure out the path to multiple images of different sizes:

(Although that last one—maxresdefault.jpg—might not work for older videos.)

Okay, so I need to extract the ID from the YouTube URL. Here’s the PHP I use to do that:

parse_str(parse_url($url, PHP_URL_QUERY), $arguments);
$id = $arguments['v'];

Then I can put together some HTML like this:

<div>
<a class="videoimglink" href="'.$url.'">
<img width="100%" loading="lazy"
src="https://i.ytimg.com/vi/'.$id.'/default.jpg"
alt="'.$response['title'].'"
srcset="
https://i.ytimg.com/vi/'.$id.'/mqdefault.jpg 320w,
https://i.ytimg.com/vi/'.$id.'/hqdefault.jpg 480w,
https://i.ytimg.com/vi/'.$id.'/maxresdefault.jpg 1280w
">
</a>
</div>

Now I’ve got a clickable responsive image that links through to the video on YouTube. Time to enhance. I’m going to add a smidgen of JavaScript to listen for a click on that link.

Over on The Session, I’m using addEventListener but here on adactio.com I’m going to be dirty and listen for the event directly in the markup using the onclick attribute.

When the link is clicked, I nuke the link and the image using innerHTML. This injects an iframe where the link used to be (by updating the innerHTML value of the link’s parentNode).

onclick="event.preventDefault();
this.parentNode.innerHTML='<iframe src=https://www.youtube-nocookie.com/embed/'.$id.'?autoplay=1></iframe>'"

But notice that I’m not using the default YouTube URL for the iframe. That would be:

https://www.youtube.com/embed/-eiqhVmSPcs

Instead I’m swapping out the domain youtube.com for youtube-nocookie.com:

https://www.youtube-nocookie.com/embed/-eiqhVmSPcs

I can’t remember where I first came across this undocumented parallel version of YouTube that has, yes, you guessed it, no cookies. It turns out that, not only is the default YouTube embed code bad for performance, it is—unsurprisingly—bad for privacy too. So the youtube-nocookie.com domain can protect your site’s visitors from intrusive tracking. Pass it on.

Anyway, I’ve got the markup I want now:

<div>
<a class="videoimglink" href="https://www.youtube.com/watch?v=-eiqhVmSPcs"
onclick="event.preventDefault();
this.parentNode.innerHTML='<iframe src=https://www.youtube-nocookie.com/embed/-eiqhVmSPcs?autoplay=1></iframe>'">
<img width="100%" loading="lazy"
src="https://i.ytimg.com/vi/-eiqhVmSPcs/default.jpg"
alt="The Banks Of Lough Gowna (jig) on mandolin"
srcset="
https://i.ytimg.com/vi/-eiqhVmSPcs/mqdefault.jpg 320w,
https://i.ytimg.com/vi/-eiqhVmSPcs/hqdefault.jpg 480w,
https://i.ytimg.com/vi/-eiqhVmSPcs/maxresdefault.jpg 1280w
">
</a>
</div>

The functionality is all there. But I want to style the embedded images to look more like playable videos. Time to break out some CSS (this is why I added the videoimglink class to the YouTube link).

.videoimglink {
    display: block;
    position: relative;
}

I’m going to use generated content to create a play button icon. Because I can’t use generated content on an img element, I’m applying these styles to the containing .videoimglink a element.

.videoimglink::before {
    content: '▶';
}

I was going to make an SVG but then I realised I could just be lazy and use the unicode character instead.

Right. Time to draw the rest of the fucking owl:

.videoimglink::before {
    content: '▶';
    display: inline-block;
    position: absolute;
    background-color: var(--background-color);
    color: var(--link-color);
    border-radius: 50%;
    width: 10vmax;
    height: 10vmax;
    top: calc(50% - 5vmax);
    left: calc(50% - 5vmax);
    font-size: 6vmax;
    text-align: center;
    text-indent: 1vmax;
    opacity: 0.5;
}

That’s a bunch of instructions for sizing and positioning. I’d explain it, but that would require me to understand it and frankly, I’m not entirely sure I do. But it works. I think.

With a translucent play icon positioned over the thumbnail, all that’s left is to add a :hover style to adjust the opacity:

.videoimglink:hover::before,
.videoimglink:focus::before {
    opacity: 0.75;
}

Wheresoever thou useth :hover, thou shalt also useth :focus.

Okay. It’s good enough. Ship it!

The Banks Of Lough Gowna (jig) on mandolin

If you embed YouTube videos on your site, and you’d like to make them more performant, check out this custom element that Paul made: Lite YouTube Embed. And here’s a clever technique that uses the srcdoc attribute to get a similar result (but don’t forget to use the youtube-nocookie.com domain).

Laura Kalbag – How to read RSS in 2020

RSS: now more than ever!

You get to choose what you subscribe to in your feed reader, and the order in which the posts show up. You might prefer to read the oldest posts first, or the newest. You might group your feeds by topic or another priority. You are not subjected to the “algorithmic feed” of Facebook, Twitter, Instagram, YouTube, where they choose the order for you.

I’ll be taking part in Quarantine Book Club discussing ResilientWebDesign.com this Thursday at 4pm UTC:

https://www.quarantinebookclub.com/#keith

2020-03-26T16:00:00

Grab a ticket for $5 (or free if you can’t spare $5 right now).

Quarantine Book Club

Join your favorite authors on Zoom where you can have spirited discussions from the privacy of our own quarantined space!

A great initiative from the folks at Mule Design. As well as chatting to talented authors, you can also chat to me: this Thursday at 4pm UTC I’ll be discussing Resilient Web Design.

Playing Elizabeth Kelly’s Delight (slip jig) on mandolin: https://thesession.org/tunes/953 https://www.youtube.com/watch?v=l0BGOkknK10

Playing Elizabeth Kelly’s Delight (slip jig) on mandolin:

https://thesession.org/tunes/953

https://www.youtube.com/watch?v=l0BGOkknK10

Elizabeth Kelly’s Delight (slip jig) on mandolin

Monday, March 23rd, 2020

Replying to a post on adactio.com

What a lovely sight! Skimming along between Venus and Orion.

Replying to a tweet from @ed_barton

It will appear 10° above west-southwest, and disappear 25° above east.

Fellow Brightonians: there’s another ISS flyover at 7:36pm this evening—should be nice and clear.

Let’s pop outside for a few minutes to (individually) watch it go overhead.

Workshop Countdown Clock

Here’s a nifty little progressive web app that Trys whipped up so that Clearlefties running workshops remotely still get to have their beloved countdown clock.

Outlet

We’re all hunkering down in our homes. That seems to be true of our online homes too.

People are sharing their day-to-day realities on their websites and I’m here for it. Like, I’m literally here for it. I can’t go anywhere.

On an episode of the Design Observer podcast, Jessica Helfand puts this into context:

During times of crisis, people want to make things. There’s a surge in the keeping of journals when there’s a war… it’s a response to the feeling of vulnerability, like corporeal vulnerability. My life is under attack. I am imprisoned in my house. I have to make something to say I was here, to say I mattered, to say this day happened… It’s like visual graphic reassurance.

It’s not just about crisis though. Scott Kelly talks about the value of keeping a journal during prolonged periods of repitition. And he should know—he spent a year in space:

NASA has been studying the effects of isolation on humans for decades, and one surprising finding they have made is the value of keeping a journal. Throughout my yearlong mission, I took the time to write about my experiences almost every day. If you find yourself just chronicling the days’ events (which, under the circumstances, might get repetitive) instead try describing what you are experiencing through your five senses or write about memories. Even if you don’t wind up writing a book based on your journal like I did, writing about your days will help put your experiences in perspective and let you look back later on what this unique time in history has meant.

That said, just stringing a coherent sentence together can seem like too much during The Situation. That’s okay. Your online home can also provide relief and distraction through tidying up. As Ethan puts it:

let a website be a worry stone

It can be comforting to get into the zone doing housekeeping on your website. How about a bit of a performance audit? Or maybe look into more fluid typography? Or perhaps now is the time to tinker about with that dark mode you’ve been planning?

Whatever you end up doing, my point is that your website is quite literally an outlet. While you’re stuck inside, your website is not just a place you can go to, it’s a place you can control, a place you can maintain, a place you can tidy up, a place you can expand. Most of all, it’s a place you can lose yourself in, even if it’s just for a little while.

Through a design system, darkly. — Ethan Marcotte

  1. Design systems haven’t “solved” inconsistency. Rather, they’ve shifted how and when it manifests.
  2. Many design systems have introduced another, deeper issue: a problem of visibility.

Ethan makes the case that it’s time we stopped taking a pattern-led approach to design systems and start taking a process-led approach. I agree. I think there’s often more emphasis on the “design” than the “system”.

“Making Design Systems Public,” an article from SuperFriendly

Is making your design system public worth the effort? In short: yes, it is.

I agree with Dan. But I wish that more people would make their design system mistakes and misteps public, like Robin talked about.

Maintaining Performance - daverupert.com

In my experience, 99% of the time Web Performance boils down to two problems:

  1. “You wrote too much JavaScript.”
  2. “You have unoptimized images.”

But as Dave points out, the real issue is this:

I find that Web Performance isn’t particularly difficult once you understand the levers you can pull; reduce kilobytes, reduce requests, unblock rendering, defer scripts. But maintaining performance that’s a different story entirely…

Playing The Lilting Fisherman (reel) on mandolin: https://thesession.org/tunes/345 https://www.youtube.com/watch?v=xvuw3tmLdHU

Playing The Lilting Fisherman (reel) on mandolin:

https://thesession.org/tunes/345

https://www.youtube.com/watch?v=xvuw3tmLdHU

The Lilting Fisherman (reel) on mandolin

Free Movie of the Week

While we’re all confined to quarters during The Situation, Gary Hustwit is offering one of his films for free every week. The fantastic Helvetica is just about to finish its run, but every one of Gary’s films is worth watching (and rewatching): Helvetica, Objectified, Urbanized, and Rams.

Filmmaker Gary Hustwit is streaming his documentaries free worldwide during the global COVID crisis. Each week we’ll be posting another film here. We hope you enjoy them, and please stay strong.

Accessible HTML Elements | Amber’s Website

Amber runs through some HTML elements that help you provide semantic information—and accessibility—for your website: headings, paragraphs, lists, and more:

You may be aware that ARIA roles are often used with HTML elements. I haven’t written about them here, as it’s good to see how HTML written without ARIA can still be accessible.

Get Static – Eric’s Archived Thoughts

Performance matters …especially when the chips are down:

If you are in charge of a web site that provides even slightly important information, or important services, it’s time to get static. I’m thinking here of sites for places like health departments (and pretty much all government services), hospitals and clinics, utility services, food delivery and ordering, and I’m sure there are more that haven’t occurred to me. As much as you possibly can, get it down to static HTML and CSS and maybe a tiny bit of enhancing JS, and pare away every byte you can.

Inclusive Inputs « Texte | ovl – code & design

This is a great walkthough of making a common form pattern accessible. No complex code here: some HTML is all that’s needed.

Ugh! Mondays! Am I right?

Sunday, March 22nd, 2020

Replying to a post on adactio.com

That was a lovely fly-past! @AstroDrewMorgan @Astro_Jessica Oleg Skripochka

Those astro/cosmonauts know a thing or two about self isolating…

https://www.nasa.gov/feature/an-astronaut-s-tips-for-living-in-space-or-anywhere

People of Brighton: it should be clear skies when the @Space_Station passes over at 8:23pm.

Let’s all go outside and look up at people doing some real social distancing.

(This is something we can do together while keeping our distance.)

Replying to a tweet from @SaraSoueidan

I’m making little tweaks to my site today too—it feels good. I’ll do a little write-up later too.

Looking forward to seeing your RSS feed light up with new articles!

Playing The Banks of Lough Gowna (jig) on mandolin: https://thesession.org/tunes/775 https://www.youtube.com/watch?v=-eiqhVmSPcs

Playing The Banks of Lough Gowna (jig) on mandolin:

https://thesession.org/tunes/775

https://www.youtube.com/watch?v=-eiqhVmSPcs

The Banks Of Lough Gowna (jig) on mandolin

Lea Verou on Twitter

Now that all modern browsers support SVG favicons, here’s how to turn any emoji into a favicon.svg:

<svg xmlns="http://w3.org/2000/svg" viewBox="0 0 100 100"> <text y=".9em" font-size="90"> 💩 </text> </svg>

Useful for quick apps when you can’t be bothered to design a favicon!

Replying to a tweet from @MaOberlehner

Just a heads-up that the URLs for liking an image aren’t resolving if client-side JavaScript isn’t available (e.g. /like/6).

Saturday, March 21st, 2020

Picture 1 Picture 2

Enjoyed a lovely côte de boeuf from @BarfieldButcher.

Cheers!

Cheers!

Checked in at Queen's Park. Getting some fresh air — with Jessica map

Checked in at Queen’s Park. Getting some fresh air — with Jessica

Playing Swinging On The Gate (reel) on mandolin: https://thesession.org/tunes/236 https://www.youtube.com/watch?v=iq5sxhD_bTU

Playing Swinging On The Gate (reel) on mandolin:

https://thesession.org/tunes/236

https://www.youtube.com/watch?v=iq5sxhD_bTU

Swinging On The Gate (reel) on mandolin
My first sourdough! (Thanks to @SometimeSophia’s starter and excellent instructions.)

My first sourdough! (Thanks to @SometimeSophia’s starter and excellent instructions.)

Friday, March 20th, 2020

Replying to a tweet from @cassiecodes

❤️

Replying to a tweet from @beep

Y’know what? I’m going to update the bookmarklet in my original post to use your code (if that’s cool with you, daddy-o).

Replying to a tweet from @beep

Noice!

Is Me Cavechild Getting Too Much Pictogram-Time? - McSweeney’s Internet Tendency

Sometimes me think me should just tear bull pictogram down. Can bull pictogram really be worth it? Sure, pictogram help advance caveculture and foster writing system. But what good that stuff if whole cave society is just bunch of brainwashed bull-pictogram-watchers? You know what Aiden say yesterday? When he grow up, he want be bull-pictogram-painter! That not real job! Real job hunter! Or at least gatherer! How many bull-pictogram-painters world need?

Local

How are you doing? Are you holding up okay?

It’s okay if you’re not. This is a tough time.

It’s very easy to become despondent about the state of the world. If you tend to lean towards pessimism, The Situation certainly seems to be validating your worldview right now.

I’m finding that The Situation is also a kind of Rorschach test. If you’ve always felt that humanity wasn’t deserving of your faith—that “we are the virus”—then there’s plenty happening right now to bolster that opinion. But if you’ve always thought that human beings are fundamentally good and decent, there’s just as much happening to reinforce that viewpoint.

I’ve noticed concentric circles of feelings tied to geography—positive in the centre, and very negative at the edges. What I mean is, if you look at what’s happening in your building and your street, it’s quite amazing how people are pulling together:

Our street (and the guy who runs the nearby corner store) is self-organizing so that everyone’s looking out for each other, checking up on elderly and self-isolating folks, sharing contact details, picking up shopping if necessary, and generally just being good humans.

This goodwill extends just about to the level of city mayorships. But once you look further than that, things turn increasingly sour. At the country level, incompetence and mismanagement seem to be the order of the day. And once you expand out to the whole world, who can blame you for feeling overwhelmed with despair?

But the world is made up of countries, and countries are made up of communities, and these communities are made up of people who are pulling together and helping one another.

Best of all, you can absolutely be part of this wonderful effort. In normal times, civic activism would require you to take action, get out there, and march in the streets. Now you can be a local hero by staying at home.

That’s it. Stay inside, resist the urge to congregate, and chat to your friends and relatives online instead. If you do that, you are being a most excellent human being—the kind that restores your faith in humanity.

I know it feels grim and overwhelming but, again, look at what’s triggering those feelings—is it the national news? International? I know it’s important to stay informed about the big picture—this is a global pandemic, after all—but don’t lose sight of what’s close to hand. Look closer to home and you’ll see the helpers—heck, you are one of the helpers.

On Ev’s blog, Fiona Cameron Lister quotes the president of the Italian Society of Psychiatrists:

Fear of an epidemic is as old as mankind itself. In this case its effect is amplified by incomplete, even false information which has caused public confidence in our institutions to collapse.

She points out that the media are in the business of amplifying the outliers of negative behaviour—panic buying, greed, and worst-case scenarios. But she goes on to say:

It doesn’t take much to start a panic and we are teetering on the brink.

Not to be the “well, actually” guy but …well, actually…

That view of humanity as being poised on the brink of mass panic is the common consensus viewpoint; it even influences public policy. But the data doesn’t support this conclusion. (If you want details, I highly recommend reading Critical Mass: How One Thing Leads to Another by Philip Ball.) Thinking of ordinary people as being one emergency away from panicking is itself giving into fear.

I guess what I’m saying is, if you’re feeling misanthropic about your fellow humans right now, try rebalancing your intake. Yes, it’s good to keep yourself informed about national and global events, but make sure to give plenty of attention to the local level too. You may just find your heart warming and your spirits lifting.

After all, you’re a good person, right? And you probably also think of yourself as a fairly ordinary person, right? So if you’re doing the right thing—making small sacrifices and being concerned for your neighbours—then logic dictates that most other people are too.

I have faith in you:

When this is over, I hope we will be proud of how well we loved one another.

What Does `playsinline` Mean in Web Video? | CSS-Tricks

I have to admit, I don’t think I even knew of the existence of the playsinline attribute on the video element. Here, Chris runs through all the attributes you can put in there.

Playing The Rose In The Heather (jig) on mandolin: https://thesession.org/tunes/447 https://www.youtube.com/watch?v=qB74np9YemE

Playing The Rose In The Heather (jig) on mandolin:

https://thesession.org/tunes/447

https://www.youtube.com/watch?v=qB74np9YemE

The Rose In The Heather (jig) on mandolin

Day four of not leaving the house.

I may have resorted to cannibalism a tad early.

Replying to a tweet from @Wordridden

That was a work chat!

cc. @TrysMudford @CleverDigit @AlisPie

Into content strategy? UX writing? At 11am UTC you can pepper @Minette_78 with questions using the tag of hashiness #AskClearleft.

Into content strategy? UX writing? At 11am UTC you can pepper @Minette_78 with questions using the tag of hashiness #AskClearleft.

Thursday, March 19th, 2020

We are all Julian Assange now.

Because of the self isolation, I mean. Not, y’know, the rapiness.

Not All Self-isolating Men.

I’ll see myself out.

No, wait! I won’t!

Nice

Yesterday was Wednesday. Wednesday evening is when I play in an Irish trad session at The Jolly Brewer. It’s a highlight of my week.

Needless to say, there was no session yesterday. I’ll still keep playing tunes while we’re all socially distancing, but it’s not quite the same. I concur with this comment:

COVID-19 has really made me realize that we need to be grateful for the people and activities we take for granted. Things like going out for food, seeing friends, going to the gym, etc., are fun, but are not essential for (physical) survival.

It reminds of Brian Eno’s definition of art: art is anything we don’t have to do. It’s the same with social activities. We don’t have to go to concerts—we can listen to music at home. We don’t have to go the cinema—we can watch films at home. We don’t have to go to conferences—we can read books and blog posts at home. We don’t have to go out to restaurants—all our nutritional needs can be met at home.

But it’s not the same though, is it?

I think about the book Station Eleven a lot. The obvious reason why I’d be thinking about it is that it describes a deadly global pandemic. But that’s not it. Even before The Situation, Station Eleven was on my mind for helping provide clarity on the big questions of life; y’know, the “what’s it all about?” questions like “what’s the meaning of life?”

Part of the reason I think about Station Eleven is its refreshingly humanist take on a post-apocalyptic society. As I discussed on this podcast episode a few years back:

It’s interesting to see a push-back against the idea that if society is removed we are going to revert to life being nasty, brutish and short. Things aren’t good after this pandemic wipes out civilisation, but people are trying to put things back together and get along and rebuild.

Related to that, Station Eleven describes a group of people in a post-pandemic world travelling around performing Shakespeare plays. At first I thought this was a ridiculous conceit. Then I realised that this was the whole point. We don’t have to watch Shakespeare to survive. But there’s a difference between surviving and living.

I’m quite certain that one positive outcome of The Situation will be a new-found appreciation for activities we don’t have to do. I’m looking forward to sitting in a pub with a friend or two, or going to see a band, or a play or a film, and just thinking “this is nice.”

Playing Farrel O’Gara’s reel on mandolin: https://thesession.org/tunes/234 https://www.youtube.com/watch?v=ouOkbvElZSI

Playing Farrel O’Gara’s reel on mandolin:

https://thesession.org/tunes/234

https://www.youtube.com/watch?v=ouOkbvElZSI

Farrel O’Gara’s (reel) on mandolin

Replying to a tweet from @Aizlewood

Knock knock.

Who’s there?

Control freak—now you say “Control freak who?”

Replying to a tweet from @harrybr

That is seriously brilliant.

Reading Machines Like Me by Ian McEwan.

Buy this book

Wednesday, March 18th, 2020

Winding down with a can of @LostFoundABL R23 session IPA. Cheers!

Winding down with a can of @LostFoundABL R23 session IPA.

Cheers!

Cameron Moll | Don’t call it a comeback. I been here for years.

Cameron’s blog is back, and very nicely redesigned/aligned it is too!

Replying to a tweet from @beep

❤️

❤️

Tuesday, March 17th, 2020

Having a St. Patrick’s night feast at home. Lá ‘le Pádraig sona daoibh go léir!

Having a St. Patrick’s night feast at home.

Lá ‘le Pádraig sona daoibh go léir!

Scripts: async, defer

I’m constantly forgetting the difference between the async attribute and the defer attribute on script elements—this is a handy explanation.

I usually do my procrastinating in the @Clearleft studio but I’ll be Procrastinating From Home now.

I usually do my procrastinating in the @Clearleft studio but I’ll be Procrastinating From Home now.

Home

Clearleft is a remote-working company right now. I mean, that’s hardly surprising—just about everyone I know is working from home.

We made this decision on Friday. It was clear that the spread of COVID-19 was going exponential (even with the very incomplete data available in the UK). Despite the wishy-washy advice from the government—which has since pivoted drastically—we made the decision to literally get ahead of the curve. We had one final get-together in the studio yesterday to plan logistics and pick up equipment. Then it was time to start this chapter.

I’ve purloined:

  • one Aeron chair,
  • one big monitor,
  • a wired keyboard,
  • a wireless mouse, and
  • noise-cancelling headphones.

Cassie kindly provided the use of her van to get that stuff home. The Aeron chair proved to be extremely tricky to get through my narrow front door. For a while there, it looked like I’d need to take the door off the hinges but with a whole lotta pushin’ and a-pullin’ Jessica and I managed to somehow get it in.

Now I’ve got a reasonable home studio set up, I can get back to working on that conference talk I’m prepar… Oh.

Yeah, I guess I’ve got a stay of execution on that. For the past few months I’ve had my head down preparing a new hour-long talk for An Event Apart. Yes, it takes me that long to put a talk together—it feels kinda like writing a book. I’d like to think it’s because I’m so meticulous, but the truth is that I’m just very slow at most things. Also, I’m a bad one for procrastinating.

For the past week or so, while I’ve been making pretty darn good progress on the talk, a voice in the back of my head has been whispering “Hey, maybe the conference won’t even happen!” In answer to which, the voice in the front of my head has been saying “Would you shut the fuck up? I’m trying to work here!”

I was due to debut the talk at An Event Apart Seattle in May. Sure enough, that event has quite rightly been cancelled. So have a lot of other excellent events. It’s a real shame, and my heart goes out to event organisers who pour so much of themselves into their events; their love, their care, and not least, their financial risk.

I speak at quite a few events every year. I really, really enjoy it. For one, public speaking is one of the few things I think I’m actually any good at. Also, I just love the chance to meet my peers and collectively nerd out together for a short while.

Then there’s the travel. This year I was planning on drastically reducing my plane travel. I had bagged myself speaking slots in European cities that I could reach by train: Cologne, Strasbourg, even Lisbon, along with domestic destinations like Nottingham, Manchester, and Plymouth. I was quite looking forward to some train adventures. But those will have to wait.

Right now I’m going to settle into this new home routine. It’s not entirely new to me. Back in the early 2000s, I worked from home as a freelancer. Back then, Jessica and I worked not just in the same room, but on opposite ends of the same table!

We’ve got more room now. Jessica has her own office space. I’m getting used to mine. But as Jessica pointed out:

I’ve worked from home for 20(!) years, I love it, I’m made for it, I can’t imagine not doing it—and I’ve gotten absolutely nothing done for the past week.

Newly WFH folks, the situation now is totally unconducive to concentration and productivity. Be gentle with yourselves.

Sunday, March 15th, 2020

Twitter thread as blog post: Thoughts on how we write CSS | Lara Schenck

CSS only truly exists in a browser. As soon as we start writing CSS outside of the browser, we rely on guesses and memorization and an intimate understanding of the rules. A text editor will never be able to provide as much information as a browser can.

Replying to a tweet from @hotdogsladies

Well, now I know what I’m going to be listening to again during my self isolation.

Checked in at The Hartington. Last chance for some tunes? map

Checked in at The Hartington. Last chance for some tunes?

Friday, March 13th, 2020

Replying to a tweet from @rem

Here’s a list of resources I put together for someone starting out in web development:

https://adactio.com/journal/15782

Rise of the Digital Fonts

A history of typesetting from movable type to variable fonts.

Thursday, March 12th, 2020

Pure CSS Landscape - An Evening in Southwold

This is not an image format. This is made of empty elements styled with CSS. (See for yourself by changing the colour value of the sun.)

This day last year was filled with travel—from Geneva to London—to celebrate the web at 30:

https://adactio.com/journal/14948

This year, there’s a lot less travelling.

Anyway. Happy 31st birthday to Information Management: A Proposal!

Checked in at Jolly Brewer. Tunes! 🎶🎻🎶 — with Jessica map

Checked in at Jolly Brewer. Tunes! 🎶🎻🎶 — with Jessica

Wednesday, March 11th, 2020

Networked information services: The world-wide web [PDF]

A 1992 paper by Tim Berners-Lee, Robert Cailliau, and Jean-Françoise Groff.

The W3 project is not a research project, but a practical plan to implement a global information system.

A curl in every port

A few years back, Zach Bloom wrote The History of the URL: Path, Fragment, Query, and Auth. He recently expanded on it and republished it on the Cloudflare blog as The History of the URL. It’s well worth the time to read the whole thing. It’s packed full of fascinating tidbits.

In the section on ports, Zach says:

The timeline of Gopher and HTTP can be evidenced by their default port numbers. Gopher is 70, HTTP 80. The HTTP port was assigned (likely by Jon Postel at the IANA) at the request of Tim Berners-Lee sometime between 1990 and 1992.

Ooh, I can give you an exact date! It was January 24th, 1992. I know this because of the hack week in CERN last year to recreate the first ever web browser.

Kimberly was spelunking down the original source code, when she came across this line in the HTUtils.h file:

#define TCP_PORT 80 /* Allocated to http by Jon Postel/ISI 24-Jan-92 */

We showed this to Jean-François Groff, who worked on the original web technologies like libwww, the forerunner to libcurl. He remembers that day. It felt like they had “made it”, receiving the official blessing of Jon Postel (in the same RFC, incidentally, that gave port 70 to Gopher).

Then he told us something interesting about the next line of code:

#define OLD_TCP_PORT 2784 /* Try the old one if no answer on 80 */

Port 2784? That seems like an odd choice. Most of us would choose something easy to remember.

Well, it turns out that 2784 is easy to remember if you’re Tim Berners-Lee.

Those were the last four digits of his parents’ phone number.

The History of the URL

This is a wonderful deep dive into all the parts of a URL:

scheme:[//[user:password@]host[:port]][/]path[?query][#fragment]

There’s a lot of great DNS stuff about the host part:

Root DNS servers operate in safes, inside locked cages. A clock sits on the safe to ensure the camera feed hasn’t been looped. Particularily given how slow DNSSEC implementation has been, an attack on one of those servers could allow an attacker to redirect all of the Internet traffic for a portion of Internet users. This, of course, makes for the most fantastic heist movie to have never been made.

Why is CSS frustrating? ・ Robin Rendle

CSS is frustrating because you have to actually think of a website like a website and not an app. That mental model is what everyone finds so viscerally upsetting. And so engineers do what feels best to them; they try to make websites work like apps, like desktop software designed in the early naughts. Something that can be controlled.

Overcoming my panic towards accessibility | Zell Liew

This is very open and honest. Thank you for writing it, Zell.

How big tech hijacked its sharpest, funniest critics - MIT Technology Review

How design fiction was co-opted. A piece by Tim Maughan with soundbites from Julian Bleecker, Anab Jain, and Scott Smith.

Tuesday, March 10th, 2020

BBC World Service - 13 Minutes to the Moon, Season 2: The Apollo 13 story

The best podcast of last year is back for another season, this time on the Apollo 13 mission.

FontGoggles — Interactive Previewing and Comparing

A really nice open-source font-previewing tool for the Mac.

Testing out the Lighthouse bookmarklet I whipped up: https://adactio.com/journal/16523

Testing out the Lighthouse bookmarklet I whipped up:

https://adactio.com/journal/16523

Lighthouse bookmarklet

I use Firefox. You should too. It’s fast, secure, and more privacy-focused than the leading browser from the big G.

When it comes to web development, the CSS developer tooling in Firefox is second-to-none. But when it comes to JavaScript and network-related debugging (like service workers), Chrome’s tools are currently better than Firefox’s (for now). For example, Chrome has a tab in its developer tools that lets you run Lighthouse on the currently open tab.

Yesterday, I got the Calibre newsletter, which always has handy performance-related links from Karolina. She pointed to a Lighthouse extension for Firefox. “Excellent!”, I thought, and I immediately installed it. But I had some qualms about installing a plug-in from Google into a browser from Mozilla, particularly as the plug-in page says:

This is not a Recommended Extension. Make sure you trust it before installing

Well, I gave it a go. It turns out that all it actually does is redirect to the online version of Lighthouse. “Hang on”, I thought. “This could just be a bookmarklet!”

So I immediately uninstalled the browser extension and made this bookmarklet:

Lighthouse

Drag that up to your desktop browser’s bookmarks toolbar. Press it whenever you’re on a site that you want to test.

Checked in at Cartwheel Cafe and Roastery. with Remy map

Checked in at Cartwheel Cafe and Roastery. with Remy

Eating toast with @Rem.

Monday, March 9th, 2020

Everyone is being so critical of Trump’s handling of the situation with COVID-19, but honestly, if I had the virus, I’d want to shake him by the hand.

Checked in at 200 Degrees Coffee map

Checked in at 200 Degrees Coffee

41 hours in Galway

It was my birthday recently. I’m a firm believer in the idea that birthday celebrations should last for more than 24 hours. A week is the absolute minimum.

For the day itself, I did indeed indulge in a most luxurious evening out with Jessica at The Little Fish Market in Hove (on the street where we used to live!). The chef, Duncan Ray, is an absolute genius and his love for all things fish-related shines through in his magnificent dishes.

But to keep the celebrations going, we also went on a weekend away to Galway, where I used to live decades ago. It was a quick trip but we packed in a lot. I joked at one point that it felt like one of those travel articles headlined with “36 hours in someplace.” I ran the numbers and it turned out we were in Galway for 41 hours, but I still thought it would be fun to recount events in the imperative style of one of those articles…

A surprisingly sunny day in Galway.

Saturday, February 29th

The 3:30pm train from Dublin will get you into Galway just before 6pm. The train station is right on the doorstep of Loam, the Michelin-starred restaurant where you’ve made your reservation. Enjoy a seven course menu of local and seasonal produce. Despite the quality of the dishes, you may find the overall experience is a little cool, and the service a touch over-rehearsed.

You’ll be released sometime between 8:30pm and 9pm. Stroll through Eyre Square and down Shop Street to the Jury’s Inn, your hotel. It’s nothing luxurious but it’s functional and the location is perfect. It’s close to everything without being in the middle of the noisy weekend action. The only noise you should hear is the rushing of the incredibly fast Corrib river outside your window.

Around 9:30pm, pop ‘round to Dominick Street to enjoy a cocktail in the America Village Apothecary. It’s only open two nights a week, and it’s a showcase of botanicals gathered in Connemara. Have them make you a tasty conconction and then spend time playing guess-that-smell with their specimen jars.

By 10:30pm you should be on your way round the corner to The Crane Bar on Sea Road. Go in the side entrance and head straight upstairs where the music session will be just getting started. Marvel at how chilled out it is for a Saturday night, order a pint, and sit and listen to some lovely jigs’n’reels. Don’t forget to occassionally pester one of the musicians by asking “What was that last tune called? Lovely set!”

Checked in at The Crane Bar. Great tunes! 🎻🎶 — with Jessica

Sunday, March 1st

Skip the hotel breakfast. Instead, get your day started with a coffee from Coffeewerk + Press. Get that coffee to go and walk over to Ard Bia at Nimmos, right at the Spanish Arch. Get there before it opens at 10am. There will already be a line. Once you’re in, order one of the grand brunch options and a nice big pot of tea. The black pudding hash will set you up nicely.

Checked in at Ard Bia at Nimmos. Black pudding hash and a pot of tea — with Jessica

While the weather is far clearer and sunnier than you were expecting, take the opportunity to walk off that hearty brunch with a stroll along the sea front. That’ll blow out the cobwebs.

Galway bay. Galway bay.

When the cold gets too much, head back towards town and duck into Charlie Byrne’s, the independent bookshop. Spend some time in there browsing the shelves and don’t leave without buying something to remember it by.

By 1pm or so, it’s time for some lunch. This is the perfect opportunity to try the sushi at Wa Cafe near the harbour. They have an extensive range of irrestistable nigiri, so just go ahead and get one of everything. The standouts are the local oyster, mackerel, and salmon.

Checked in at wa cafe. Sushi — with Jessica

From there, head to Tigh Cóilí for the 2pm session. Have a Guinness and enjoy the tunes.

Checked in at Tigh Cóilí. Afternoon session — with Jessica

Spend the rest of the afternoon strolling around town. You can walk through the market at St. Nicholas Church, and check out the little Claddagh ring museum at Thomas Dillon’s—the place where you got your wedding rings at the close of the twentieth century.

Return the ring from whence it came!

If you need a pick-me-up, get another coffee from Coffeewerk + Press, but this time grab a spot at the window upstairs so you can watch the world go by outside.

By 6pm, you’ll have a hankering for some more seafood. Head over to Hooked on Henry Street. Order a plate of oysters, and a cup of seafood chowder. If they’ve got ceviche, try that too.

Checked in at Hooked. with Jessica

Walk back along the canal and stop in to The Salt House to sample a flight of beers from Galway Bay Brewery. There’ll probably be some live music.

Checked in at The Salt House. 🍺 — with Jessica

With your appetite suitably whetted, head on over to Cava Bodega for some classic tapas. Be sure to have the scallops with black pudding.

Checked in at Cava Bodega. Scallops with black pudding — with Jessica

The evening session at Tigh Cóilí starts at 8:30pm on a Sunday so you can probably still catch it. You’ll hear some top-class playing from the likes of Mick Conneely and friends.

Checked in at Tigh Cóilí. 🎶🎻 — with Jessica

And when that’s done, there’s still time to catch the session over at The Crane.

Checked in at The Crane Bar. 🎶🎻 — with Jessica

Monday, March 2nd

After a nice lie-in, check out of the hotel and head to McCambridge’s on Shop Street for some breakfast upstairs. A nice bowl of porridge will set you up nicely for the journey back to Dublin.

If you catch the 11am train, you’ll arrive in Dublin by 1:30pm—just enough time to stop off in The Winding Stair for some excellent lunch before heading on to the airport.

Checked in at The Winding Stair. Lunch in Dublin — with Jessica

Getting there

Aer Lingus flies daily from Gatwick to Dublin. Dublin’s Heuston Station has multiple trains per day going to Galway.

Going to Nottingham. brb

Replying to a post on www.jvt.me

See you later!

Sunday, March 8th, 2020

Replying to a tweet from @ProfBrianCox

Yes! The Age Of Wonder is my favourite book on the history of science.

The 3 Laws of Serverless - Burke Holland

“Serverless”, is a buzzword. We can’t seem to agree on what it actaully means, so it ends up meaning nothing at all. Much like “cloud” or “dynamic” or “synergy”. You just wait for the right time in a meeting to drop it, walk to the board and draw a Venn Diagram, and then just sit back and wait for your well-deserved promotion.

That’s very true, and I do not like the term “serverless” for the rather obvious reason that it’s all about servers (someone else’s servers, that is). But these three principles are handy for figuring out if you’re building with in a serverlessy kind of way:

  1. You have no knowledge of the underlying system where your code runs.
  2. Scaling is an intrinsic attribute of the technology; so much so that it just happens automatically.
  3. You only pay for what you use.

Abstraction; scale; consumption.

Saturday, March 7th, 2020

Replying to a tweet from @infovore

I properly LOL’d at this …a nice warm-hearted, non-snarky LOL.

A Guide to Handling Browser Events by Sarah Chima - Front-End Developer

This is a great step-by-step explanation of event handling in JavaScript!

From a BBC News story:

Facebook is closing its London office for the weekend …Staff members have been told to work from home until Monday.

Wait.

Friday, March 6th, 2020

Replying to a tweet from @VorganHaze

Muchas, muchas gracias, Vorgan!

Learn Box Alignment

A cute walkthrough for flexbox and grid.

Oh Hello Ana - IndieWebCamp London

Don’t forget—it’s IndieWebCamp London next weekend!

A Variable Fonts Primer

Everything you ever wanted to know about variable fonts, gathered together into one excellent website.

Thursday, March 5th, 2020

Replying to a tweet from @heydonworks

Let me know if you come up with a good job title for that because it me.

Reading A Short History Of Irish Traditional Music by Gearóid Ó hAllmhuráin.

Buy this book

Tuesday, March 3rd, 2020

Abolish Silicon Valley by Wendy Liu

I got an email a little while back from Michael at Repeater Books asking me if I wanted an advance copy of Abolish Silicon Valley: How to Liberate Technology From Capitalism by Wendy Liu. Never one to look a gift horse in the mouth, I said “Sure!”

I’m happy to say that the book is most excellent …or at least mostly excellent.

Contrary to what the book title—or its blurb—might tell you, this is a memoir first and foremost. It��s a terrific memoir. It’s utterly absorbing.

Just as the most personal songs can have the most universal appeal, this story feels deeply personal while being entirely accessible. You don’t have to be a computer nerd to sympathise with the struggles of a twenty-something in a start-up trying to make sense of the world. This well-crafted narrative will resonate with any human. It calls to mind Ellen Ullman’s excellent memoir, Close to the Machine—not a comparison I make lightly.

But as you might have gathered from the book’s title, Abolish Silicon Valley isn’t being marketed as a memoir:

Abolish Silicon Valley is both a heartfelt personal story about the wasteful inequality of Silicon Valley, and a rallying call to engage in the radical politics needed to upend the status quo.

It’s true that the book finishes with a political manifesto but that’s only in the final chapter or two. The majority of the book is the personal story, and just as well. Those last few chapters really don’t work in this setting. They feel tonally out of place.

Don’t get me wrong, the contents of those final chapters are right up my alley—they’re preaching to the converted here. But I think they would be better placed in their own publication. The heavily-researched academic style jars with the preceeding personal narrative.

Abolish Silicon Valley is 80% memoir and 20% manifesto. I worry that the marketing isn’t making that clear. It would be a shame if this great book didn’t find its audience.

The book will be released on April 14th. It’s available to pre-order now. I highly recommend doing just that. I think you’ll really enjoy it. But if you get mired down in the final few chapters, know that you can safely skip them.

Insecure

Universal access is at the heart of the World Wide Web. It’s also something I value when I’m building anything on the web. Whatever I’m building, I want you to be able to visit using whatever browser or device that you choose.

Just to be clear, that doesn’t mean that you’re going to have the same experience in an old browser as you are in the latest version of Firefox or Chrome. Far from it. Not only is that not feasible, I don’t believe it’s desirable either. But if you’re using an old browser, while you might not get to enjoy the newest CSS or JavaScript, you should still be able to access a website.

Applying the principle of progressive enhancement makes this emminently doable. As long as I build in a layered way, everyone gets access to the barebones HTML, even if they can’t experience newer features. Crucially, as long as I’m doing some feature detection, those newer features don’t harm older browsers.

But there’s one area where maintaining backward compatibility might well have an adverse effect on modern browsers: security.

I don’t just mean whether or not you’re serving sites over HTTPS. Even if you’re using TLS—Transport Layer Security—not all security is created equal.

Take a look at Mozilla’s very handy SSL Configuration Generator. You get to choose from three options:

  1. Modern. Services with clients that support TLS 1.3 and don’t need backward compatibility.
  2. Intermediate. General-purpose servers with a variety of clients, recommended for almost all systems.
  3. Old. Compatible with a number of very old clients, and should be used only as a last resort.

Because I value universal access, I should really go for the “old” setting. That ensures my site is accessible all the way back to Android 2.3 and Safari 1. But if I do that, I will be supporting TLS 1.0. That’s not good. My site is potentially vulnerable.

Alright then, I’ll go for “intermediate”—that’s the recommended level anyway. Now I’m no longer providing TLS 1.0 support. But that means some older browsers can no longer access my site.

This is exactly the situation I found myself in with The Session. I had a score of A+ from SSL Labs. I was feeling downright smug. Then I got emails from actual users. One had picked up an old Samsung tablet second hand. Another was using an older version of Safari. Neither could access the site.

Sure enough, if you cut off TLS 1.0, you cut off Safari below version six.

Alright, then. Can’t they just upgrade? Well …no. Apple has tied Safari to OS X. If you can’t upgrade your operating system, you can’t upgrade your browser. So if you’re using OS X Mountain Lion, you’re stuck with an insecure version of Safari.

Fortunately, you can use a different browser. It’s possible to install, say, Firefox 37 which supports TLS 1.2.

On desktop, that is. If you’re using an older iPhone or iPad and you can’t upgrade to a recent version of iOS, you’re screwed.

This isn’t an edge case. This is exactly the kind of usage that iPads excel at: you got the device a few years back just to do some web browsing and not much else. It still seems to work fine, and you have no incentive to buy a brand new iPad. And nor should you have to.

In that situation, you’re stuck using an insecure browser.

As a site owner, I can either make security my top priority, which means you’ll no longer be able to access my site. Or I can provide you access, which makes my site less secure for everyone. (That’s what I’ve done on The Session and now my score is capped at B.)

What I can’t do is tell you to install a different browser, because you literally can’t. Sure, technically you can install something called Firefox from the App Store, or you can install something called Chrome. But neither have anything to do with their desktop counterparts. They’re differently skinned versions of Safari.

Apple refuses to allow browsers with any other rendering engine to be installed. Their reasoning?

Security.

Telling the story of performance

At Clearleft, we’ve worked with quite a few clients on site redesigns. It’s always a fascinating process, particularly in the discovery phase. There’s that excitement of figuring out what’s currently working, what’s not working, and what’s missing completely.

The bulk of this early research phase is spent diving into the current offering. But it’s also the perfect time to do some competitor analysis—especially if we want some answers to the “what’s missing?” question.

It’s not all about missing features though. Execution is equally important. Our clients want to know how their users’ experience shapes up compared to the competition. And when it comes to user experience, performance is a huge factor. As Andy says, performance is a UX problem.

There’s no shortage of great tools out there for measuring (and monitoring) performance metrics, but they’re mostly aimed at developers. Quite rightly. Developers are the ones who can solve most performance issues. But that does make the tools somewhat impenetrable if you don’t speak the language of “time to first byte” and “first contentful paint”.

When we’re trying to show our clients the performance of their site—or their competitors—we need to tell a story.

Web Page Test is a terrific tool for measuring performance. It can also be used as a story-telling tool.

You can go to webpagetest.org/easy if you don’t need to tweak settings much beyond the typical site visit (slow 3G on mobile). Pop in your client’s URL and, when the test is done, you get a valuable but impenetrable waterfall chart. It’s not exactly the kind of thing I’d want to present to a client.

Fortunately there’s an attention-grabbing output from each test: video. Download the video of your client’s site loading. Then repeat the test with the URL of a competitor. Download that video too. Repeat for as many competitor URLs as you think appropriate.

Now take those videos and play them side by side. Presentation software like Keynote is perfect for showing multiple videos like this.

This is so much more effective than showing a table of numbers! Clients get to really feel the performance difference between their site and their competitors.

Running all those tests can take time though. But there are some other tools out there that can give a quick dose of performance information.

SpeedCurve recently unveiled Page Speed Benchmarks. You can compare the performance of sites within a particualar sector like travel, retail, or finance. By default, you’ll get a filmstrip view of all the sites loading side by side. Click through on each one and you can get the video too. It might take a little while to gather all those videos, but it’s quicker than using Web Page Test directly. And it might be that the filmstrip view is impactful enough for telling your performance story.

If, during your discovery phase, you find that performance is being badly affected by third-party scripts, you’ll need some way to communicate that. Request Map Generator is fantastic for telling that story in a striking visual way. Pop the URL in there and then take a screenshot of the resulting visualisation.

The beginning of a redesign project is also the time to take stock of current performance metrics so that you can compare the numbers after your redesign launches. Crux.run is really great for tracking performance over time. You won’t get any videos but you will get some very appealing charts and graphs.

Web Page Test, Page Speed Benchmarks, and Request Map Generator are great for telling the story of what’s happening with performance right nowCrux.run balances that with the story of performance over time.

Measuring performance is important. Communicating the story of performance is equally important.

Getting your priorities right | Clearleft

A ludicrously useful grab-bag of prioritisation techniques from Chris—so, so handy for workshops and sprint planning.

Selectors Explained

I can see this coming in very handy at Codebar—pop any CSS selector in here and get a plain English explanation of what it’s doing.

Visitors, Developers, or Machines

Garrett’s observation is spot-on here:

I’ve been trying to understand the appeal of these frameworks by giving them an objective chance. I’ve expanded my knowledge of JavaScript and tried to give them the benefit of the doubt. They do have their places, but the only explanation I can come up with is that developers are taking a similar approach as Ruby and focusing on developer convenience and productivity. Only, instead of Ruby’s performance being tied to the CPU level, JavaScript frameworks push the performance burden to the client.

In both cases, the tradeoff happens in the name of developer happiness and productivity, but the strategies have entirely different consequences. With Ruby, the CPU is still (mostly) the responsibility of the development team, and it can be upgraded. With JavaScript, the page weight becomes an externality pushed onto visitors.

HTML: The Inaccessible Parts - daverupert.com

Well, this is a grim collection from Dave:

There are some cases where even using plain ol’ HTML causes accessibility problems. I get frustrated and want to quit web development whenever I read about these types of issues. Because if browsers can’t get this right, what hope is there for the rest of us.

It’s worth clicking through each link he lists—the situation is often much more nuanced than simply “Don’t use X.”

Point, don’t point — I love Typography

A brief history of the manicule, illustrated with some extreme examples.

Monday, March 2nd, 2020

It was a comforting myth, and one I embraced because I had seen comfort, without realising it was only a myth.

— Abolish Silicon Valley

Picture 1 Picture 2
map

Checked in at The Winding Stair. Lunch in Dublin — with Jessica

Replying to a tweet from @keinegurke_

Julian Gough! He used to be the singer in a most excellent band called Toasted Heretic many years ago, when we both lived in Galway.

17th Century Death Roulette ☠️

Spin the wheel: you’ll get a week and a death in 1665.

(Realistically, you probably would’ve died of plague, which outnumbers other causes of death by orders of magnitude.)

Checked in at The Salt House. 🍺 — with Jessica map

Checked in at The Salt House. 🍺 — with Jessica

Checked in at Cava Bodega. Scallops with black pudding — with Jessica map

Checked in at Cava Bodega. Scallops with black pudding — with Jessica

Checked in at Tigh Cóilí. 🎶🎻 — with Jessica map

Checked in at Tigh Cóilí. 🎶🎻 — with Jessica

Checked in at The Crane Bar. 🎶🎻 — with Jessica map

Checked in at The Crane Bar. 🎶🎻 — with Jessica

Sunday, March 1st, 2020

Checked in at Hooked. with Jessica map

Checked in at Hooked. with Jessica

map

Checked in at Coffeewerk + Press. with Jessica

Picture 1 Picture 2 Picture 3 Picture 4

Galway bay.

Return the ring from whence it came!

Return the ring from whence it came!

Checked in at Tigh Cóilí. Afternoon session — with Jessica map

Checked in at Tigh Cóilí. Afternoon session — with Jessica

Picture 1 Picture 2
map

Checked in at wa cafe. Sushi — with Jessica

A surprisingly sunny day in Galway.

A surprisingly sunny day in Galway.

Checked in at Ard Bia at Nimmos. Black pudding hash and a pot of tea — with Jessica map

Checked in at Ard Bia at Nimmos. Black pudding hash and a pot of tea — with Jessica

map

Checked in at America Village Apothecary. with Jessica

Checked in at The Crane Bar. Great tunes! 🎻🎶 — with Jessica map

Checked in at The Crane Bar. Great tunes! 🎻🎶 — with Jessica