Human Tapestry – Episode 1

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

For the first episode of the Human Tapestry, I talked to Dan, a bisexual man who lives in Oxford, England, with his partner and her husband in what he describes as a “polyamorous V-shaped thingy”. Listen as we talk about relationships, identities, the “bi-cycle”, and various forms of vegetarianism.

Fellow Automattician Mike has just launched his new podcast, exploring the diversity of human experience of relationships, sexuality, attraction, identity, gender, and all that jazz. Earlier this year, I volunteered myself as an interviewee, but I had no idea that I’d feature in the opening episode! If hearing people in your ears is something you like to do, and you’re interested in my journey so-far of polyamory and bisexuality, have a listen. And if you’re not: it might still be worth bookmarking the show for a listen later on – it could be an interesting ride.

Possibly SFW, depending on your work. Specific warnings:

  • Some swearing, including use of a homophobic slur (while describing the experience of being a victim of homophobia)
  • Frank discussion of my relationship history (although with greater anonymity than appears elsewhere on this blog)
  • Annoying squeaky chair sounds in the background (I’ve replaced that chair, now)
  • Skimming-over-the-details of specific events, resulting in an incomplete picture (with apologies to anybody misrepresented as a result)

Caveats aside, I think it came out moderately well; Mike’s an experienced interviewer with a good focus on potentially interesting details. He’s also looking for more guests, if you’d like to join him. He says it best, perhaps, with his very broad description of what the show’s about:

If you have a gender, have attractions (or non-attractions) to certain humans (or all humans), or have certain practices (or non-practices) in the bedroom (or elsewhere), we’d love to talk to you!

Go listen over there or right here.

Break Into . Us (lock puzzle game)

I’ve made a puzzle game about breaking open padlocks. If you just want to play the game, go play the game. Or read on for the how-and-why of its creation.

About three months ago, my friend Claire, in a WhatsApp group we both frequent, shared a brainteaser:

WhatsApp message from Claire, challenging people to solve her puzzle.
Was this way back at the beginning of April? Thank heavens for WhatsApp scrollback.

The puzzle was to be interpreted as follows: you have a three-digit combination lock with numbers 0-9; so 1,000 possible combinations in total. Bulls and Cows-style, a series of clues indicate how “close” each of several pre-established “guesses” are. In “bulls and cows” nomenclature, a “bull” is a correctly-guessed digit in the correct location and a “cow” is a correctly-guessed digit in the wrong location, so the puzzle’s clues are:

  • 682 – one bull
  • 614 – one cow
  • 206 – two cows
  • 738 – no bulls, no cows
  • 380 – one cow
"Can you open the lock using these clues?" puzzle
Feel free to stop scrolling at this point and solve it for yourself. Or carry on; there are no spoilers in this post.

By the time I’d solved her puzzle the conventional way I was already interested in the possibility of implementing a general-case computerised solver for this kind of puzzle, so I did. My solver uses a simple “brute force” technique, as follows:

  1. Put all possible combinations into a search space.
  2. For each clue, remove from the search space all invalid combinations.
  3. Whatever combination is left is the correct answer.
Animation showing how the first three clues alone are sufficient to derive a unique answer from the search space of Claire's puzzle.
The first three clues of Claire’s puzzle are sufficient alone to reduce the search space to a single answer, although a human is likely to need more.

Visualising the solver as a series of bisections of a search space got me thinking about something else: wouldn’t this be a perfectly reasonable way to programatically generate puzzles of this type, too? Something like this:

  1. Put all possible combinations into a search space.
  2. Randomly generate a clue such that the search space is bisected (within given parameters to ensure that neither too many nor too few clues are needed)
  3. Repeat until only one combination is left

Interestingly, this approach is almost the opposite of what a human would probably do. A human, tasked with creating a puzzle of this sort, would probably choose the answer first and then come up with clues that describe it. Instead, though, my solution would come up with clues, apply them, and then see what’s left-over at the end.

Sample output of the puzzle generator for an alphabet of 0-9 and a combination length of 3.
Sometimes it comes up with inelegant or unchallenging suggestions, but for the most part my generator produces adequate puzzles.

I expanded my generator to go beyond simple bulls-or-cows clues: it’s also capable of generating clues that make reference to the balance of odd and even digits (in a numeric lock), the number of different digits used in the combination, the sum of the digits of the combination, and whether or not the correct combination “ascends” or “descends”. I’ve ideas for other possible clue types too, which could be valuable to make even tougher combination locks: e.g. specifying how many numbers in the combination are adjacent to a consecutive number, specifying the types of number that the sum of the digits adds to (e.g. “the sum of the digits is a prime number”) and so on.

A single solution in a search space derived in multiple ways.
Like the original puzzle, puzzles produced by my generator might have redundancies. In the picture above, the black square can be defined by the light blue, dark blue, and green bisections only: the yellow bisection is rendered redundant by the light blue one. I’ve left this as a deliberate feature.

Next up, I wanted to make a based interface so that people could have a go at the puzzles in their web browser, track their progress through the levels, get a “score” based on the number and difficulty of the locks that they’d cracked (so they can compare it to their friends), and save their progress to carry on next time.

I implemented in pure vanilla HTML, CSS, SVG and JS, with no dependencies. Compressed, it delivers to your browser and is ready-to-play in a little under 10kB, most of which is the puzzles themselves (which are pregenerated and stored in a JSON file). Naturally, it lends itself well to running offline, so it’s PWA-enhanced with a service worker so it can be “installed” onto your device, too, and it’ll check for bonus puzzles and other updates periodically.

The original puzzle shown via BreakInto.Us.
Naturally, the original puzzle appears in the web-based game, too.

Honestly, the hardest bit of implementing the frontend was the “spinnable” digits: depending on your browser, these are an endless-scrolling <ul> implemented mostly in CSS and with snap points set, and then some JS to work out “what you meant” based on where you span to. Which feels like the right way to implement such a thing, but was a lot more work than putting together my own control, not least because of browser inconsistencies in the implementation of snap points.

Anyway: you should go and play the game, now, and let me know what you think. Is it worth expanding and improving? Should I leave it as it is? I’m open to ideas (and if you don’t like that I’m not implementing your suggestions, you can always fork a copy of the code and change it yourself)!

Or if you’d like to see some of the other JavaScript experiments I’ve done, you might enjoy my “cheating” hangman game, my recreation of the lunar lander game I wrote in college, or rediscover that time I was ill and came up the worst conceivable tool to calculate Pi.

× × × × ×

Dan Q found GC8VMXW Spooky container

This checkin to GC8VMXW Spooky container reflects a geocaching.com log entry. See more of Dan's cache logs.

FTF! (Been a while since I got one of those!)
A quick park-and-grab while on the way back from the school run which, following my house move the other week, goes right past the end of this road. Not a bad first hide, and certainly a cool spot. SL, TNLN, TFTC!

Tour of our old house

We’ve only got a couple of days left before we move to our new house. In order that she and her little brother might better remember our old house, I encouraged our 6 year-old to record a video tour.

Also available via:

Buying Another House

Seven years ago, I wrote a six-part blog series (1, 2, 3, 4, 5, 6) about our Ruth, JTA and I’s experience of buying our first house. Now, though, we’re moving again, and it’s brought up all the same kinds of challenges and stresses as last time, plus a whole lot of bonus ones to boot.

Our house in Kidlington
Our old house – seen here in 2013 – has served its purpose. It’s time for us to move on.

In particular, new challenges this time around have included:

  • As owners, rather than renters, we’ve had both directions on the ladder to deal with. Not only did we have to find somewhere to move to that we can afford but we needed to find somebody who’d buy our current house (for enough money that we can afford the new place).
  • The first letting agents we appointed were pretty useless, somehow managing to get us no viewings whatsoever. Incidentally their local branch got closed soon after we ditched them and the last time I checked, the building was still up for sale: it doesn’t bode well for them that they can’t even sell their own building, does it?
  • The replacement letting agents (who sold us this house in the first place) were much better, but it still took a long time before we started getting offers we could act on.
  • We finally selected some buyers, accepting a lower offer because they were cash buyers and it would allow us to act quickly on the property we wanted to buy, only for the coronavirus lockdown to completely scupper our plans of a speedy move. And make any move a logistical nightmare.
  • Plus: we’re now doing this with lots more stuff (this won’t be a “rally some friends and rent a van” job like last time!), with two kids (who’re under our feet a lot on account of the lockdown), and so on.
Dan with his solar panels.
We added significant value to our old house during the time we owned it, for example by installing solar panels which continue to generate income as well as “free” energy. As well as being now conveniently close to a train line to London which I suppose would be good for commuters even though we’ve mostly used it for fun.

But it’s finally all coming together. We’ve got a house full of boxes, mind, and we can’t find anything, and somehow it still doesn’t feel like we’re prepared for when the removals lorry comes later this week. But we’re getting there. After a half-hour period between handing over the keys to the old place and picking up the keys to the new place (during which I guess we’ll technically be very-briefly homeless) we’ll this weekend be resident in our new home.

The Green, our new home
Our new home’s pretty delightful. I’ll vlog you a tour or something once we’re moved in, under the assumption that a housewarming party is still likely to be rendered impossible by coronavirus.

Our new house will:

  • Be out in the fabulous West Oxfordshire countryside.
  • Have sufficient rooms to retain an office and a “spare” bedroom while still giving the kids each their own bedroom.
  • Boast a fabulously-sized garden (we might have already promised the kids a climbing frame).
  • Have an incredible amount of storage space plus the potential for further expansion/conversion should the need ever arise. (On our second-to-last visit to the place with discovered an entire room, albeit an unfinished one, that we hadn’t known about before!)
  • Get ludicrously fast Internet access.

We lose some convenient public transport links, but you can’t have everything. And with me working from home all the time, Ruth – like many software geeks – likely working from home for the foreseeable future (except when she cycles into work), and JTA working from home for now but probably returning to what was always a driving commute “down the line”, those links aren’t as essential to us as they once were.

Sure: we’re going to be paying for it for the rest of our lives. But right now, at least, it feels like what we’re buying is a house we could well live in for the rest of our lives, too.

I certainly hope so. Moving house is hard.

× × ×

Intent

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

I am almost certainly racist.

I don’t intend to be racist, but like I said, intentions aren’t really what matter. Outcomes are.

Note, for example, the cliché of the gormless close-minded goon who begins a sentence with “I’m not racist, but…” before going on to say something clearly racist. It’s as though the racism could be defanged by disavowing bad intent.

Yes indeed.

To claim you’re free of prejudice almost certainly means that you’re not looking hard enough. The aim of the exercise is, as always, to keep improving yourself: find where you have (or are) a problem, get better, repeat. We’re not one of us perfect, but we can all strive to be better tomorrow than we are today.

Stethoscope

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

My partner @scatmandan just completed his Masters degree. His sister @bornvulcan sent him a stethoscope as a congratulations gift which is one of the funniest things to happen in these parts for a while.

I’m not sure my sister understands that a masters degree is not a doctorate. I don’t feel like I’m qualified to use this.

Dan with a pink stethoscope

×

Note #17243

With #lockdown guidance as it stands, only six of the seven dwarfs can meet together in the park?
The seventh dwarf won’t be Happy.

In fact, he’ll be Grumpy.

Which is a problem, because that means one of the six is Sneezy.

Sour Grapes… a Murder Mystery in Lockdown

It had been a long while since our last murder mystery party: we’ve only done one or two “kit” ones since we moved in to our current house in 2013, and we’re long-overdue a homegrown one (who can forget the joy of Murder at the Magic College?), but in the meantime – and until I have the time and energy to write another one of my own – we thought we’d host another.

But how? Courtesy of the COVID-19 crisis and its lockdown, none of our friends could come to visit. Technology to the rescue!

Jen, Dan, Suz, Alec, Matt, JTA and Ruth at Sour Grapes
Not being in the same room doesn’t protect you from finger-pointing.

I took a copy of Michael Akers‘ murder mystery party plan, Sour Grapes of Wrath, and used it as the basis for Sour Grapes, a digitally-enhanced (and generally-tweaked) version of the same story, and recruited Ruth, JTA, Jen, Matt R, Alec and Suz to perform the parts. Given that I’d had to adapt the materials to make them suitable for our use I had to assign myself a non-suspect part and so I created police officer (investigating the murder) whose narration provided a framing device for the scenes.

Sour Grapes clue showing on an iPhone screen.
Actually, the interface didn’t work as well on an iPhone as I’d have expected, but I ran short on testing time.

I threw together a quick Firebase backend to allow data to be synchronised across a web application, then wrote a couple of dozen lines of Javascript to tie it together. The idea was that I’d “push” documents to each participants’ phone as they needed them, in a digital analogue of the “open envelope #3” or “turn to the next page in your book” mechanism common in most murder mystery kits. I also reimplemented all of Akers’ artefacts, which were pretty-much text-only, as graphics, and set up a system whereby I could give the “finder” of each clue a copy in-advance and then share it with the rest of the participants when it was appropriate, e.g. when they said, out loud “I’ve found this newspaper clipping that seems to say…”

The party itself took place over Discord video chat, with which I’d recently had a good experience in an experimental/offshoot Abnib group (separate from our normal WhatsApp space) and my semi-associated Dungeons & Dragons group. There were a few technical hiccups, but only what you’d expect.

Sour Grapes' command centre: the Host Panel
Meanwhile, I had a web page with all kinds of buttons and things to press.

The party itself rapidly descended into the usual level of chaos. Lots of blame thrown, lots of getting completely off-topic and getting distracted solving the wrong puzzles, lots of discussion about the legitimacy of one of several red herrings, and so on. Michael Akers makes several choices in his writing that don’t appear in mine – such as not revealing the identity of the murderer even to the murderer until the final statements – which I’m not a fan of but retained for the sake of honouring the original text, but if I were to run a similar party again I’d adapt this, as I had a few other aspects of the setting and characters. I think it leads to a more fun game if, in the final act, the murderer knows that they committed the crime, that all of the lies they’ve already told are part of their alibi-building, and they’re given carte blanche to lie as much as they like in an effort to “get away with it” from then on.

Sour Grapes: participants share "hearts" with Ruth
Much love was shown for the “catering”.

Of course, Ruth felt the need to cater for the event – as she’s always done with spectacular effect at every previous murder mystery she’s hosted or we’ve collectively hosted – despite the distributed partygoers. And so she’d arranged for a “care package” of wine and cheese to be sent to each household. The former was, as always, an excellent source of social lubrication among people expected to start roleplaying a random character on short notice; the latter a delightful source of snacking as we all enjoyed the closest thing we’ll get to a “night out” in many months.

This was highly experimental, and there are lessons-for-myself I’d take away from it:

  • If you’re expecting people to use their mobiles, remember to test thoroughly on mobiles. You’d think I’d know this, by now. It’s only, like, my job.
  • When delivering clues and things digitally, keep everything in one place. Switching back and forth between the timeline that supports your alibi and the new information you’ve just learned is immersion-breaking. Better yet, look into ways to deliver physical “feelies” to people if it’s things that don’t need sharing, and consider ways to put shared clues up on everybody’s “big screen”.
  • Find time to write more murder mysteries. They’re much better than kit-style ones; I’ve got a system and it works. I really shout get around to writing up how I make them, some day; I think there’s lessons there for other people who want to make their own, too.
Planning a murdery mystery
Those who know me may be surprised to hear that the majority of my work planning an original murder mystery plot, even a highly-digital one like Murder… on the Social Network, happens on paper.

Meanwhile: if you want to see some moments from Sour Grapes, there’s a mini YouTube playlist I might get around to adding to at some point. Here’s a starter if you’re interested in what we got up to (with apologies for the audio echo, which was caused by a problem with the recording software):

× × × × ×

Dan Q temporarily disabled GC827X6 2019-01-08 51 -1, 09:19

This checkin to GC827X6 2019-01-08 51 -1, 09:19 reflects a geocaching.com log entry. See more of Dan's cache logs.

Thanks for the report, Team Hippo. Given the lack of activity and the usual thoroughness of the previous cacher, I’m going to choose to assume that this cache is inaccessible until I can get out there in person to check on it/perform maintenance.

Unreal Engine 5 is meant to ridicule web developers

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

Our sources report that the underlying reason behind the impressive tech demo for Unreal Engine 5 by Epic Games is to ridicule web developers.

According to the Washington Post, the tech demo includes a new dynamic lighting system and a rendering approach with a much higher geometric detail for both shapes and textures. For example, a single statue in the demo can be rendered with 33 million triangles, giving it a truly unprecedented level of detail and visual density.

Turns out that the level of computational optimization and sheer power of this incredible technology is meant to make fun of web developers, who struggle to maintain 15fps while scrolling a single-page application on a $2000 MacBook Pro, while enjoying 800ms delays typing the corresponding code into their Electron-based text editors.

Funny but sadly true. However, the Web can be fast. What makes it slow is bloated, kitchen-sink-and-all frontend frameworks, pushing computational effort to the browser with overcomplicated DOM trees and unnecessarily rich CSS rules, developer privilege, and blindness to the lower-powered devices that make up most of the browsing world. Oh, and of course embedding a million third-party scripts to get you all the analytics, advertising, etc. you think you need doesn’t help, either.

The Web will never be as fast as native, for obvious reasons. But it can be fast; blazingly so. It just requires a little thought and consideration. I’ve talked about this recently.

Celebrate Seventeen

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

May 27th, 17 years ago, the first release of WordPress was put into the world by Mike Little and myself. It did not have an installer, upgrades, WYSIWYG editor (or hardly any Javascript), comment spam protection, clean permalinks, caching, widgets, themes, plugins, business model, or any funding.

Seventeen years ago, WordPress was first released.

Sixteen years, eleven months ago, I relaunched I relaunched my then-dormant blog. I considered WordPress/b2/cafelog, but went with a now-dead engine called Flip instead.

Fifteen years, ten months ago, in response to a technical failure on the server I was using, I lost it all and had to recover my posts from backups. Immediately afterwards, I took the opportunity to redesign my blog and switch to WordPress. On the same day, I attended the graduation ceremony for my first degree (but somehow didn’t think this was worth blogging about).

Fifteen years, nine months ago, Automattic Inc. was founded to provide managed WordPress hosting services. Some time later, I thought to myself: hey, they seem like a cool company, and I like everything Matt’s done so far. I should perhaps work there someday.

Lots of time passed.

Seven months ago, I got around to doing that.

Happy birthday, WordPress!