Most folk aren't nerds!

Consent is sexy

Published on: 12 Mar 21:46

I've found that around 99% of the general population regard the nitty-gritty details of my web development day job to be witchcraft, and sorcery, and hideous soothsaying. It puts them off. It repels them. I've lost count of the number of times that people have taken one glance at the crap I write and say "oh dear god, your techno-wizardry terrifies and perplexes me, no way man, that looks ever so complicated and grotesque and unconscionable, how do you do it?"

Thing is, I've also lost count of the number of times I've sat various neighbours down and talked them through a program or script I'd built, and had them reply "... Wait - what, really? That's all? It's as simple as that? Wow! I could learn that!"

With anything technical, sure, a Thing's underlying implementation can often be apocalyptically complex, but its core concepts are often really really easy and straightforward and learning the basics sometimes takes about two minutes. I love watching peoples' faces light up when they discover this. It's awesome.

Though web-dev, and programming as a whole, more than other fields, seem to possess this hideous psionic aura of suffering and anguish and cerebral intimidation. Over the years I've discovered various neat ways to puncture it. One is to write really really informal and chatty error messages. I've been working for covidcomply.org for the last several weeks. The other day I was writing a script that performs a database query to retrieve all Covid samples created more recently than X days ago. It takes a single digit as its input. If you attempt to submit a non-numeric input, it spits back the error We're querying X-days-ago, numbers only please.

So far, so good, so boring. However! The language I'm writing this in, Ruby, has many types of "numeric" data, including complex numbers. (If you're unfamiliar with complex numbers, do read https://brilliant.org/wiki/complex-numbers/). Never in a million years would your typical web-dev programmer user sincerely and accidentally input a complex number to my script in mistaken good faith. They'd only ever do this if they were being a smartass and a brat and trying to mess with me. Fair play to 'em, naturally, I'd happily do the same, but should the user attempt to input a complex number anyway, my script does this:

raise BeingASmartassAboutArgumentErrorsError, "Yes I realise complex numbers are technically numeric, but ever tried shoving complex numbers into an SQL query?"

I find this works wonders to put newbies at their ease.

Source: https://www.facebook.com/pi.neutrino/posts/1015894...