Blog

Why the GOV.UK Design System team changed the input type for numbers

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Android number pad

Using <input type="text" inputmode="numeric" pattern="[0-9]*"> allows for a degree of separation between how the user enters data (“input mode”), what the browser expects the user input to contain (type equals number), and potentially how it tries to validate it.

I’ve sung the praises of the GDS research team before, and it’s for things like this that I respect them the most: they’re knowing for taking a deep-dive user-centric approach to understanding usability issues, and they deliver valuable actionable answers off the back of it.

If you’ve got Web forms that ask people for numbers, this is how you should be doing it. If you’re doing so specifically for 2FA purposes, see that post I shared last month on a similar topic.

Bypassing AppProtocol Prompts

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Starting in Edge 82.0.425.0 Canary, a new flag is available.

Edge Canary showing an "Always allow [this website] to open links of this type..." checkbox

This is a good move; a relatively simple innovation that’s sure to help end-user security. If you can’t see what’s different above without following the link through to the original article, here’s the short version: an upcoming version of Edge will allow you to authorise a specific site to open a particular application to handle a link… without having to compromise by choosing either to (a) see the security dialog every single time (which teaches users to “just click OK”) or (b) allow the dialog to be suppressed for links that open a particular application (which makes it easier for bad guys to make poisonous links).

So you’ll be able to, for example, say “slack.com can open Slack for me, but other websites have to ask”. Nice.

I hope that other browser manufacturers follow suit, especially on mobile where the web/web-launched-native-app boundary has never been fuzzier.

Dutch PM Mark Rutte Tells Public Not to Shake Hands Over Coronavirus and Then Shakes With Colleague

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Love this video: the Dutch PM reminds everybody not to shake hands with one another… then turns and shakes somebody’s hand. Then realises his mistake and initiates even more bodily contact by way of apology.

There’s Really No Easy Way to Say ‘I Was Stabbed’

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

The first thing people usually want to know is what getting stabbed feels like. The answer is that it feels like getting punched really hard. Or at least, I assume it’s what getting hit feels like. I’ve never been punched. I have been stabbed six times.

I’ll back up. And I’ll try not to make this too writerly, but I’m fighting my instincts. I wanted to add a quote from an Auden poem about suffering, but I desisted. Please admire my restraint.

You have to understand, this kind of thing doesn’t happen in Wellington. It doesn’t happen in most places, but it especially doesn’t happen in a small city in New Zealand, in a park, at 11:30 a.m.

I go back and forth. It wasn’t that bad, I tell myself. It could have been much worse, people have survived much worse. And then I look at my scars, still red and new, and I think: But it was pretty bad, wasn’t it? It is possible I could have died. What if I hadn’t had my phone? If I hadn’t met someone on the path? I could have bled out somewhere between the trees. But of course, it’s useless to think about what-ifs. What if he had stabbed me in the heart? What if I hadn’t gone to the park at all? What if I died in a car crash tomorrow? It’s a pointless exercise.

Author Emma Berquist writes about her experience of the (extremely unusual) incident she was involved in, of being stabbed by a stranger in a park in Wellington. An inspiring personal story.

A Trip Through New York City in 1911

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

With help from a neural network, Denis takes original cinematography of New York City in 1911 and uploads it as an cleaned, upscaled, high-framerate, colourised YouTube video. It’s pretty remarkable: compare it to the source video to see how much of a difference it makes: side-by-side, the smoothness of the frame rate alone is remarkable. It’s a shame that nothing can be done about the underexposed bits of the film where contrast detail is lacking: I wonder if additional analysis of the original print itself might be able to extract some extra information from these areas and them improve them using the same kinds of techniques.

In any event, a really interesting window-to-history!

BingO Bakery

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Don’t understand why Web accessibility is important? Need a quick and easily-digestible guide to the top things you should be looking into in order to make your web applications screenreader ready? Try this fun, video-game-themed 5 minute video from Microsoft.

There’s a lot more to accessibility than is covered here, and it’s perhaps a little over-focussed on screenreaders, but it’s still a pretty awesome introduction.

There is a car

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

There is a car, in the hospital parking lot.

It is a faded red, covered with dust.

Other cars have parked and left on either side of it, every day, but this car remains.

I pass by it, as I find parking, on my way in to work.

I know what it means.

Short story by a nephrologist (kidney specialist). I haven’t a clue why people try to use Twitter to write long-form content – by the time you’re bending the medium so far out of shape, perhaps you chose the wrong medium? – but I still enjoyed this piece.

An app can be a home-cooked meal

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Have you heard about this new app called BoopSnoop?

It launched in the first week of 2020, and almost immediately, it was downloaded by four people in three different time zones. In the months since, it has remained steady at four daily active users, with zero churn: a resounding success, exceeding every one of its creator’s expectations.

:)

I made a messaging app for, and with, my family. It is ruthlessly simple; we love it; no one else will ever use it. I wanted to jot down some notes about how and why I made it, both to (a) offer a nudge to anyone else out there considering a similar project and (b) suggest something a little larger about software.

Robin Sloan (yes, this one) talks about an app that he wrote exclusively for his family. He likens the experience to a making a home-cooked meal. And I totally get it.

I do this kind of thing all the time. Our new home NAS device, Fox, performs a handful of functions (and I plan to expand it to many more) based on a mixture of open-source and homegrown code, just for my immediate family. Our “family wiki” does the same thing. And the spreadsheet we use for our finances. I’ve written apps for small groups of friends before, too (e.g. 1, 2, 3, 4, 5, 6, 7, 8…). And that’s not to mention the countless “meals for one” I’ve cooked: small applications written entirely for my own benefit – I’m using one right now to pull this article from the list of “things I’ve read and enjoyed recently” into my blog.

A home-cooked meal benefits from being tailored to its audience (if the recipe calls for mustard, I might use less or omit it because it makes my nose feel funny). It benefits from being tailored to its purpose. And it benefits from the love that goes into it. My only superstition – that I’m aware of – is that I believe that food tastes better if the chef smiled during its production… I’m beginning to think that the same might be true for software, too.

First among the reasons I think that learning the basics of programming should be in the school curriculum is that it teaches people how computers work and so, by proxy, what they are (and are not) capable of. The most digitally-literate non-programmers I know are people who have the strongest understanding about how and why computers do what they do. But a close second among my reasons is that those with an inclination can go a step further and, without even necessarily pushing their skills to a level at which they could or would want to work as software developers, build their own tools to “scratch their own itches”. Solving a problem for yourself is enormously empowering, and the versatility of software lends itself to solving a huge array of relatively-tiny problems: problems that affect individuals, families, or small communities but that aren’t big enough to warrant commercial attention.

(Sometimes these projects explode into something bigger, but usually they remain just as they are: a tool for the benefit of oneself and one’s immediate tribe. And that’s just great.)

Jokes I’ve Told That My Male Colleagues Didn’t Like

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

A guy walks into a bar. It’s a low one, so he gets a raise within his first six months on the job.

Did you hear the one about the woman who reported sexual harassment? Of course you didn’t; she was forced to sign an NDA.

Louise Bernikow once wrote: Humour tells you where the trouble is.

It’s okay to laugh at these jokes. But only so long as you do so with an awareness that their comedy comes from the nuggets of truth within each and every one of them. Our society’s come a long way this last century, but we’ve still got a long way to go.

Where Do New Viruses Come From?

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

A fun and lightweight 10-minute (very basic, but highly-accessible) primer into the mechanisms by which new viruses appear to emerge via spillover infection and viral evolution. I was pleased by the accuracy of the animations including efforts to show relative scale of microorganisms and the (correct) illustration of RNA as the genetic material of a coronavirus (many illustrators draw all viruses as carrying a double-stranded DNA payload).

The Neighbors’ Window

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

This beautifully-shot short film won Best Live Action Short Film at the Oscars last month, and if you haven’t seen it you owe it to yourself to do so. Over the course of 20 artfully-crafted minutes it tells two distinct stories, and before long you realise that what you’re really watching is the third story that emerges, Rubin vase-style, from the mind of the watcher and in the gaps between the two. Official website. Probably NSFW.

Identifying Post Kinds in WordPress RSS Feeds

I use the Post Kinds plugin to streamline the management of the different types of posts I make on my blog, based on the IndieWeb post types list: articles, like this one, are “conventional” blog posts, but I also publish notes (which are analogous to “tweets”), reposts (“shares” of things I’ve found online, sometimes with commentary), checkins (mostly chronicling my geocaching/geohashing), and others: I’ve extended Post Kinds to facilitate comics and reviews, for example.

But for people who subscribe (either directly or indirectly) to everything I post, I imagine it must be a little frustrating to sometimes be unable to identify the type of a post before clicking-through. So I’ve added the following code, which I’m sharing here and on GitHub in case it’s of any use to anybody else, to my theme’s functions.php:

// Make titles in RSS feed be prefixed by the Kind of the post.
function add_kind_to_rss_post_title(){
	$kinds = wp_get_post_terms( get_the_ID(), 'kind' );
	if( ! isset( $kinds ) || empty( $kinds ) ) return get_the_title(); // sanity-check.
	$kind = $kinds[0]->name;
	$title = get_the_title();
	return trim( "[{$kind}] {$title}" );
}
add_filter( 'the_title_rss', 'add_kind_to_rss_post_title', 4 ); // priority 4 to ensure it happens BEFORE default escaping filters.

This decorates the titles of my posts, but only in my feeds, so it’s easier for people to tell at-a-glance what’s going on:

Rendered RSS feed showing Post Kinds prefixes

Down the line I might expand this so that it doesn’t show if the subscriber is, for example, asking only for articles (e.g. via this feed); I’m coming up with a huge list of things I’d like to do at IndieWebCamp London! But for now, this feels like a nice simple improvement to a plugin I love that helps it to fit my specific needs.