Carry Fire

I’ve just listened to Robert Plant’s new album, Carry Fire. It’s pretty good.

A long while after my dad’s death five years ago, I’d meant to write a blog post about the experience of grief in a digital age. As I’ve clearly become increasingly terrible at ever getting draft posts complete, the short of it was this: my dad’s mobile phone was never recovered and soon after its battery went flat any calls to his number would go straight to voicemail. He’d recently switched to a pay-as-you-go phone for his personal mobile, and so the number (and its voicemail) outlived him for many months. I know I’m not the only one that, in those months, called it a few times, just to hear his voice in the outgoing message. I’m fully aware that there are recordings of his voice elsewhere, but I guess there was something ritualistic about “trying to call him”, just as I would have before his accident.

The blog post would have started with this anecdote, perhaps spun out a little better, and then gone on to muse about how we “live on” in our abandoned Inboxes, social media accounts, and other digital footprints in a way we never did before, and what that might mean for the idea of grief in the modern world. (Getting too caught up in thinking about exactly what it does mean is probably why I never finished writing that particular article.) I remember that it took me a year or two until I was able to delete my dad from my phone/email address book, because it like prematurely letting go to do so. See what I mean? New aspects of grief for a new era.

Rob Plant's "Carry Fire"
Thanks, Rob.

Another thing that I used to get, early on, was that moment of forgetting. I’d read something and I’d think “Gotta tell my dad about that!” And then only a second later remember why I couldn’t! I think that’s a pretty common experience of bereavement: certainly for me at least – I remember distinctly experiencing the same thing after my gran’s death, about 11 years ago. I’m pretty sure it’s been almost a year since I last had such a forgetting moment for my father… until today! Half way into the opening track of Carry Fire, a mellow folk-rocky-sounding piece called The May Queen (clearly a nod to Stairway there), I found myself thinking “my dad’d love this…” and took almost a quarter-second before my brain kicked in and added “…damn; shame he missed out on it, then.”

If you came here for a music review, you’re not going to get one. But if you like some Robert Plant and haven’t heard Carry Fire yet, you might like to. It’s like he set out to make a prog rock album but accidentally smoked too much pot and then tripped over his sitar. And if you knew my dad well enough to agree (or disagree) that he would have dug it, let me know.

×

Jokes That Aged Badly

I’ve lately taken an interest in collecting jokes that haven’t aged well. By which I mean: jokes that no longer work, or require explanation, because they’re conceptually ‘dated’. Typically, these jokes aren’t funny any more, or are only funny to people who were around at the time that they were first conceived, and I imagine that we, as a civilisation, are necessarily relegating more and more jokes into this particular category as time goes on.

A man used to make his wife go to bed first in the winter-time, caller her his warming-pan; which she not well relishing, one night left something smoaking in his place. Finding himself in a stinking pickle: Wife, said he, I am beshit: No, husband, said she, it is only coal dropt out of your warming-pan!
I don’t mean outdated like this joke, published in 1803, but ones that require explanation because a listener is no longer likely to recognise the concepts or people referenced. For example, if it were the case that warming pans were now such an alien concept that nobody knew what they were any more, then the above would certainly qualify (that’s not true yet… right?).

My favourite joke of this category is the following classic student joke, which was relevant when I first heard it in the 1990s:

What’s pink and takes an hour to drink?

Grant cheque

By way of explanation: the grant cheque was how British students used to receive their government aid to support them during their studies. It had become gradually smaller (relative to the value of the pound) over time by failing to rise in value in line with inflation, and was printed on pink paper, hence the joke. There was an effort to revive it in the late 1990s/early 2000s as follows:

What’s green and takes an hour to drink?

Loan cheque

By this point, the grant had been replaced by the student loan, whose payments came printed on green paper instead. This is, of course, simply an example of adapting an old joke for a new audience, as we’ve all seen time and again with the inevitable string of recycled gags that get rolled-out every time a celebrity is accused of a sex crime. Incidentally, the revised form of the grant cheque/loan cheque joke has itself become dated as students now typically receive all of their loan payments directly to their bank accounts for convenient immediate spending rather than what my generation had to do which was to make the beans-and-rice stretch another few days until the cheque cleared.

An idiot asks a silversmith to make him a lamp. 'How big do you want me to make it?' the silversmith asks. 'Big enough for eight people to see by.'
This 4th/5th century joke (presented with a contemporary translation) doesn’t count, because it’s still flipping hilarious.

Here’s another example:

Bill and Ben the flower pot men are in the garden.

“Flobalobalobalob,” says Bill

Ben replies: “You’re drunk, Bill.”

Now those of you who are about my age, or older, are unlikely to see why this joke has dated badly. But it is dated, because the 2001 reboot of The Flower Pot Men (now called simply Bill and Ben) features the titular characters speaking in reasonably-normal English! The idea that they were only speaking Oddle Poddle because they were too pissed to speak English is no longer a point of humour, and increasingly the population won’t remember the original stilted dialect of the flower pot men. If we assume that anybody under the age of 24 is more-likely to have come across the newer incarnation then that’s a third of the population!

Let’s try another, which became dated at about the same time:

Why are hurricanes names after women?

Because when they come they’re wet and wild and when they go they take your house and your car.

The history of how we’ve named hurricanes over the centuries is really quite interesting, and its certainly true that for the majority of the period during which both meteorologists and the general public have shared the same names for tropical storms they’ve been named after women. Depending on where you are in the world, though, it’s not been true for some time: Australia began using a mixture of masculine and feminine names during the 1970s, but other regions took until the millennium before they followed suit. However, the point still remains that this joke has been dated for a long while.

Eye of a storm as seen from the ISS.
Why is a topical joke like a hurricane? When it comes, you’ve never seen anything like it. By the time it goes, you’re sick of it.

Here’s a very highly-charged joke from the 1960s which I think we can all be glad doesn’t make much sense any more:

What’s all black and comes in an all white box?

Sammy Davis Jr.

For those needing the context: Sammy Davis Jr. was a black American singer, comedian, and variety show host who triggered significant controversy when he married white Swedish actress May Britt. Interracial marriage was at the time still illegal across much of the United States (such prohibition wouldn’t be ruled unconstitutional until the amazingly-named “Loving Day” in 1967) and relationships between whites and “coloureds” were highly taboo even where they weren’t forbidden by law.

Topical jokes like that are often too easy, like this one – even shorter-lived – from the summer of 1995, presented here with no further interpretation:

Q: What’s the difference between O. J. Simpson and Christopher Reeve?

A: O. J.’s gonna walk!

Perhaps my favourite strictly-topical joke of this variety, though, comes from 1989:

Q: Why is Margaret Thatcher like a pound coin?

A: She’s thick, brassy, and she thinks she’s a sovereign.

It’s at least two-thirds funny even if you don’t have the full context, and that’s what’s most-interesting about it: it’ll take until the new £1 becomes ubiquitous and the old one mostly-forgotten before it will lose all of its meaning. But as you’ve probably forgotten why the third part of the punchline – “…and she thinks she’s a sovereign” – comes from, I’ll illuminate you. The joke is wordplay: there are two meanings to “sovereign” in this sentence. The first, of course, is that a sovereign is the bullion coin representing the same value as a conventional pound coin.

To understand the second, we must first remind ourselves of the majestic plural, better known as the “royal ‘we'”. In 1989, following the birth of her grandson Michael, Thatcher made a statement saying “we have become a grandmother”, resulting in much disdain and mockery by the press at the time. The Prime Minister’s relationship with the Queen had always been a frosty one, and Thatcher’s (mis)use of a manner of speech that was typically reserved for the use of royalty did nothing to make her look any more-respectful of the monarch.

1952 advertisement for Prince Albert pipe tobacco.
And you thought it was just something to put in your penis. Turns out it’s something to put in your lungs, too.

The final example I’ve got died out as a joke as a result of changing brand identities, more cost-effective packaging materials, and the gradual decline of tobacco smoking. But for a long while, while Prince Albert Pipe Tobacco was still sold in larger quantities as it always had been, in a can, a popular prank perpetrated by radio stations that went in for such things was to call a tobacconist and ask, “Have you got Prince Albert in a can?”. The tobacconist would invariably answer in the affirmative, at which point the prankster would response “Well let him out then!” This joke may well predate the “Is your refrigerator running?” prank call that might be more-familiar to today’s audiences.

If you’ve got any jokes that have aged badly, I’d love to hear them. And then, I suppose, have them explained to me.

× × × ×

GMail Tip: Use A Plus Sign To Avoid Spam

This technique’s about a decade old, but a lot of people still aren’t using it, and I can’t help but suspect that can only be because they didn’t know about it yet, so let’s revisit:

You have a GMail account, right? Or else Google for Domains? Suppose your email address is dan@gmail.com… did you know that also means that you own:

  • dan+smith@gmail.com
  • dan+something@gmail.com
  • dan+anything-really@gmail.com
  • d.an@gmail.com
  • d..a..n@gmail.com

You have a practically infinite number of GMail addresses. Just put a plus sign (+) after your name but before the @-sign and then type anything you like there, and the email will still reach you. You can also insert as many full stops (.) as you like, anywhere in the first half of your email address, and they’ll still reach you, too. And that’s really, really useful.

Filling in an Equifax registration form.
Often, you end up having to give your email address to companies that you don’t necessarily trust…

When you’re asked to give your email address to a company, don’t give them your email address. Instead, give them a mutated form of your email address that will still work, but that identifies exactly who you gave it to. So for example you might give the email address dan+amazon@gmail.com to Amazon, the email address dan+twitter@gmail.com to Twitter, and the email address dan+pornhub@gmail.com to… that other website you have an account on.

Why is this a clever idea? Well, there are a few reasons:

  • If the company sells your email address to spammers, or hackers steal their database, you’ll know who to blame by the email address they’re sending to. I’ve actually caught out an organisation in this way who were illegally reselling their mailing lists to third parties.
  • If you start getting unwanted mail from somebody (whether because spammers got the email or because you don’t like what the company is sending to you), you can easily block them. Even if you can’t unsubscribe or just because they make it hard to do so, you can just set up a filter to automatically discard anything that comes to that email address in future.
  • If you feel like organising your life better, you can set up filters for that, too: it doesn’t matter what address a company sends from, so long as you know what address they’re sending to, so you can easily have filters that e.g. automatically forward copies of the mortgage statement that come to dan+yourbank@gmail.com to your spouse, or automatically label anything coming to
    dan+someshop@gmail.com with the label “Shopping”.
  • If you’re signing up just to get a freebie and you don’t trust them not to spam you afterwards, you don’t need to use a throwaway: just receive the goodies from them and them block them at the source.
The email address dan+equifax@gmail.com being entered into a form.
Certainly, you can have… THIS email address.

I know that some people get some of these benefits by maintaining a ‘throwaway’ email address. But it’s far more-convenient to use the email address you already have (you’re already logged-in to it and you use it every day)! And if you ever do want a true ‘throwaway’, you’re generally better using Mailinator: when you’re asked for your email address, just mash the keyboard and then put @mailinator.com on the end, to get e.g. dsif9tsnev4y8594es87n65y4@mailinator.com. Copy the first half of the email address to the clipboard, and then when you’re done signing up to whatever spammy service it is, just go to mailinator.com and paste into the box to see what they emailed you.

A handful of badly-configured websites won’t accept email addresses with plus signs in them, claiming that they’re invalid (they’re not). Personally, when I come across these I generally just inform the owner of the site of the bug and then take my business elsewhere; that’s how important it is to me to be able to filter my email properly! But another option is to exploit the fact that you can put as many dots in (the first part of) your GMail address as you like. So you could put d…an@gmail.com in and the email will still reach you, and you can later filter-out emails to that address. I’ll leave it as an exercise for the reader to decide how to encode information about the service you’re signing up to into the pattern and number of dots that you use.

Go forth and avoid spam.

× ×

Fnorders

I’ve not posted much recently: I’ve had a lot of Complicated Life Stuff going on, sorry.

But I did make a thing: fnorders.com. You’re welcome.

Fnord.

Stones Under Yetzin

For the last few months, I’ve been GMing a GURPS campaign (that was originally a Warhammer Fantasy Roleplay 1st-edition campaign, in turn built upon a mixture of commercially published and homegrown modules, including, in turn, an AD&D module…) for a few friends.

So far, it’s included such gems as a player-written poem in a fictional language, another player’s drawing of the most-cinematic action sequence they’ve experienced so far… and the opportunity, during a play session that coincided with a player’s birthday, to explain the layout of a ruined tower by presenting them with a cake baked into the shape of the terrain.

Cake shaped sort-of like The Lone Tower.
“So we’re… here?” asked a player, jabbing with his finger at the cream-filled section of the tower at which he was standing.

If you’re interested in what we’ve been up to, the campaign has it’s own blog where you can read about the adventures of Newman, Bret, Lythil, Keru, and (the late) Sir Bea.

But mostly I wanted to make this post so that I had a point of context in case I ever get around to open-sourcing some of the digital tools I’ve been developing to help streamline our play sessions. For example, most of our battle maps and exploration are presented on a ‘board’ comprised of a flat screen monitor stripped of its stand and laid on its back, connected via the web to a tool that allows me to show, hide, or adapt parts of it from my laptop or mobile phone. Player stats, health, and cash, as well as the date, time, position of the sun as well as the phases of the moons are similarly tracked and are available via any player’s mobile phone at any time.

Players fight a basilisk across a paper RPG map.
A rare instance of us using a paper-based battle map. Despite the fact that we play in-person, we’ve used digital tools to save table space!

These kinds of tools have been popular for ‘long-distance’/Internet roleplaying for years, but I think there’s a lot of potential in locally-linked, tabletop-enhancing (rather than replacing) tools that deliver some of the same benefit to the (superior, in my opinion) experience of ‘proper’ face-to-face adventure gaming. Now, at least, when I tell you for example about some software I wrote to help calculate the position of the sun in the sky of a fictional world, you’ll have a clue why I would do such a thing in the first place.

×

Playing Dead – Toddlers Gone Weird

No matter how prepared you think you are for the questions your toddler might ask (and the ways in which they might go on to interpret your answer), they’ll always find a way to catch you off guard. The following exchange with our little one began last weekend in the car:

Annabel sitting at a bar in a pub.
I’m sure we’ve all been asked “Why can’t I drink what you’re drinking?”

Her: “I read the Beano Annual at Grandtom’s house.” (Grandtom is what she calls Ruth‘s father – her maternal grandfather.)

Me: “Oh? Did you like it?”

Her: “Yes. Did you have the Beano Annual when you were a little boy?”

Me: “Yes: I would sometimes get one for Christmas when I was little.”

Her: “Who gave it to you?”

Me: My mummy and daddy did.”

Her: “Your mummy is Nanna Doreen.”

Me: “That’s right.”

Her: “Why haven’t I met your daddy?”

Dan sits on his father's knee. 1980s.
Dan and daddy.

That’s a question that I somehow hadn’t expected to come up so soon. I probably ought to have guessed that it was on its way, given her interest in her extended family lately and how they’re all connected to one another, but I’d somehow assumed that it’d have come up organically at some point or another before her curiosity had made the connection that there was somebody clearly missing: somebody whom she’d heard mentioned but, inexplicably, never met.

Me: “My daddy died, a couple of years before you were born. He was climbing a mountain one day when he had a nasty accident and fell off, and he died.”

Her: “…” (a thoughtful pause)

Me: “Are you okay?”

Her: “How many birthdays did he have?”

Me: “Fifty-four. That’s a bigger number than you can count to, I think!”

Her: “How many birthdays will I have?”

Wow, this went further than I expected, very quickly. Obviously, I want to be open about this: the last thing I want is to introduce a taboo, and I’m a big believer in the idea that on I’m suddenly conscious of the fact that she’s clearly close to a minor existential crisis, having for possibly the first time connected the concepts of age and death. And, of course, I’m trying to translate my thoughts into ideas that a toddler can follow every step of the way. While simultaneously trying to focus on driving a car: she knows how to pick her timing! Okay…

Me: “Nobody knows for sure, but you’ll probably get lots and lots: seventy, eighty, ninety… maybe even a hundred birthdays!”

Her: “Then I’ll have a hundred candles.”

Me: “That’s right. Do you think you could blow out a hundred candles?”

Annabel's third birthday party.
Three candles was well within her grasp.

So far, so good. Knowing that, like most toddlers, ours has a tendency to make some new discovery and then sit on it for a day or two before asking a follow-up question, I briefed Ruth and JTA so that they wouldn’t be caught too off-guard when she started telling them, for example, what she’d like for her hundredth birthday or something.

And all was well until yesterday, when we were laying in the garden under the recent glorious sunshine, playing a game that involved rolling along the lawn and back and bumping into one another in the middle, when she stood up and announced that she’d like to play something different.

Her: “Now we’re playing the die game.”

Me: “Oh…kay. How do we play that?”

Her: “We’re going to go up a mountain and then fall off.”

Me: (following her in a stomp around the garden) “Then what do we do?”

Her: “We die.” (mimes falling and then lies very still)

Annabel plays-dead after "falling off a mountain".
A ‘dead’ body at the bottom of a ‘mountain’. Erk!

And so that’s how I came to spend an afternoon repeatedly re-enacting the circumstances of my father’s death, complete – later on, after Ruth mentioned the air ambulance that carried his body down from the mountain – with a helicopter recovery portion of the game. I’ve role-played some unusual games over the years, but this one was perhaps the oddest, made stranger by the fact that it was invented by a three year-old.

Toddlers process new information in strange (to adults) ways, sometimes.

× × × ×

AMP Is Poisonous

If you’re a web developer and you haven’t come across the Google AMP project yet… then what stone have you been living under? But just in case you have been living under such a stone – or you’re not a web developer – I’ll fill you in. If you believe Google’s elevator pitch, AMP is “…an open-source initiative aiming to make the web better for all… consistently fast, beautiful and high-performing across devices and distribution platforms.”

I believe that AMP is fucking poisonous and that the people who’ve come out against it by saying it’s “controversial” so far don’t go remotely far enough. Let me tell you about why.

AMP logo in handcuffs

When you configure your website for AMP – like the BBC, The Guardian, Reddit, and Medium already have – you deliver copies of your pages written using AMP HTML and AMP JS rather than the HTML and Javascript that you’re normally would. This provides a subset of the functionality you’re used to, but it’s quite a rich subset and gives you a lot of power with minimal effort, whether you’re trying to make carousels, video players, social sharing features, or whatever. Then when your site is found via Google Search on a mobile device, then instead of delivering the user to your AMP HTML page or its regular-HTML alternative… Google delivers your site for you via an ultra-fast precached copy via their own network. So far, a mixed bag, right? Wrong.

What’s poisonous about Google AMP

Ignoring the facts that you can get locked-in if you try it once, it makes the fake news problem worse than ever, and it breaks the core concepts of a linkable web, the thing that worries me the most is that AMP represents the most-subtle threat to Net Neutrality I’ve ever seen… and it’s from an organisation that is nominally in favour of a free and open Internet but that stands to benefit from a more-closed Internet so long as it’s one that they control.

Google’s stated plan to favour pages that use AMP creates a publisher’s arms race in which content creators are incentivised to produce content in the (open-source but) Google-controlled AMP format to rank higher in the search results, or at least regain parity, versus their competitors. Ultimately, if everybody supported AMP then – ignoring the speed benefits for mobile users (more on that in a moment) – the only winner is Google. Google, who would then have a walled garden of Facebook-beating proportions around the web. Once Google delivers all of your content, there’s no such thing as a free and open Internet any more.

So what about those speed increases? Yes, the mobile web is slower than we’d like and AMP improves that. But with the exception of the precaching – which is something that could be achieved by other means – everything that AMP provides can be done using existing technologies. AMP makes it easy for lazy developers to make their pages faster, quickly, but if speed on mobile devices is the metric for your success: let’s just start making more mobile-friendly pages! We can make the mobile web better and still let it be our Web: we don’t need to give control of it to Google in order to shave a few milliseconds off the load time.

We need to reject AMP, and we need to reject it hard. Right now, it might be sufficient to stand up to your boss and say “no, implementing AMP on our sites is a bad idea.” But one day, it might mean avoiding the use of AMP entirely (there’ll be browser plugins to help you, don’t worry). And if it means putting up with a slightly-slower mobile web while web developers remain lazy, so be it: that’s a sacrifice I’m willing to make to help keep our web free and open. And I hope you will be, too.

Like others, I’m just hoping that Sir Tim will feel the urge to say something about this development soon.

Science! (for toddlers)

I’m not sure that there’s any age that’s too-young at which to try to cultivate an interest in science. Once a child’s old enough to ask why something is the case, every question poses an opportunity for an experiment! Sometimes a thought experiment is sufficient (“Uncle Dan: why do dogs not wear clothes?”) but other times provide the opportunity for some genuine hands-on experimentation (“Why do we put flowers in water?”). All you have to do is take every question and work out what you’d do if you didn’t know the answer either! A willingness to take any problem with a “let’s find out” mentality teaches children two important things: (a) that while grown-ups will generally know more than them, that nobody has all the answers, and (b) that you can use experiments to help find the answers to questions – even ones that have never been asked before!

Annabel sorts jewellery at the Pitt River Museum of Anthropology.
“Why do we make jewellery out of different things?” Thanks to the Pitt Rivers Museum for inspiring this question… and helping us to find an answer.

Sometimes it takes a little more effort. Kids – like all of us, a lot of the time – can often be quite happy to simply accept the world as-it-is and not ask “why”. But because a fun and educational science activity is a good way to occupy a little one (and remember: all it needs to be science is to ask a question and then try to use evidence to answer it!), I’ve been keeping a list of possible future activities so that we’ve got a nice rainy-day list of things to try. And because we are, these days, in an increasingly-large circle of breeders, I thought I’d share some with you.

Annabel observes the filling of a paddling pool with custard.
You don’t strictly need a cement mixer full of custard to demonstrate dilatant (non-Newtonian) fluids, but messiness is engaging all by itself.

Here’s some of the activities we’ve been doing so far (or that I’ve got lined-up for future activities as and when they become appropriate):

  • Measuring and graphing rainfall
    We’ve spent a lot of time lately taking about calendars, weather, and seasons, so I’m thinking this one’s coming soon. All we need is a container you can leave in the garden, a measuring jug, and some graph paper.
  • Experimenting with non-Newtonian fluids
    You can make a dilatant fluid with cornflower and water: it acts like a liquid, but you can slap it and grab it like a solid. Fine, very wet sand (quicksand!) demonstrates pseudoplasticity which also explains how paint ‘blobs’ on your brush but is easy to spread thin on the paper.
  • Magnets
    I’m really looking forward to the opportunity to play with magnets: we’ve started already with thanks to Brio wooden railway and talking about the fact that the rolling stock will attach one way around (and seem to jump together when they get close) but repel the other way around, and we’ve also begun looking at the fact that if you remove a carriage from the middle of a train the remaining segments are already correctly-aligned in order to be re-attached.
  • Different kinds of bouncy balls
    We’ve had fun before measuring how high different kinds of balls (air-filled rubber football, large solid rubber ball, skeletal rubber ball, small solid rubber ball) bounce when dropped from a stepladder onto a patio and talking about how ‘squishy’ they are relative to one another, and speculating as to the relationship between the two.
Red-spotted black ladybird.
Spotting different subspecies of ladybirds is a great springboard to talking about heritable characteristics and phenotypic variation. Snails are another good candidate.
  • Demonstrating capillary action/siphoning
    Two containers – one with a fluid in and one without – joined over the rim by a piece of paper towel will eventually reach an equilibrium of volume, first as a result of capillary action causing the fluid to climb the paper and then using a siphon effect to continually draw more over the edge.
  • Illustrating the solar system (to scale)
    It helps adults and children alike to comprehend the scale of the solar system if you draw it to scale. If you’ve got a long street nearby you can chalk it onto the pavement. If not, you’ll need a very small scale, but doing the Earth and Moon might suffice.
  • Electricity
    Batteries, wires, and LEDs are a moderately safe and simple start to understanding electricity. Taking a ‘dead’ battery from a drained toy and putting it into the circuit shows the eventual state of batteries. Connecting lights in series or parallel demonstrates in very simple terms resistance. Breaking or joining a circuit illustrates that switches function identically wherever they’re placed on the circuit.
  • Vortices
    I’m interested in trying to replicate this experiment into making different kinds of standing vortices in water, but I might have to wait until our little scientist has slightly more patience (and fine motor control!).
A demonstration of capillary action using water and tissue paper.
Water, tissue paper, and patience is all you need to demonstrate capillary action and siphoning. Food colouring’s an optional bonus.
  • Centripetal force
    We’ve been lucky enough to get to talk about this after using a whirlpool-shaped piece of marble run, but if we hadn’t then I was thinking we’d wait until the next time it was sunny enough for outdoor water play and use the fact that a full bucket can be spun around without spilling any in a similar way.
  • Bug counting
    Take a quadrant of garden and count the different kinds of things living in it. Multiply up to estimate the population across the garden, or measure different parts (lawn versus bedding plants versus patio, direct sunlight versus shade, exposed versus covered, etc.) to see which plants or animals prefer different conditions.
  • Growing plants
    Caring for different kinds of plants provides an introduction to botany, and there’s a lot to observe, from the way that plants grow and turn to face the light to the different stages of their growth and reproduction. Flowers give an attractive result at the end, but herbs and vegetables can be eaten! (Our little scientist is an enormous fan of grazing home-grown chives.)
  • Mechanics and force
    We’ve taken to occasionally getting bikes out of the shed, flipping them upside-down, and observing how changing the cogs that the chain runs over affects how hard you need to push the pedals to get movement… but also how much the movement input is multiplied into the movement of the wheel. We’re not quite at a point where we can reliably make predictions based on this observation, but we’re getting there! I’m thinking that we can follow-up this experiment by building simple catapults to see how levers act as a force multiplier.
Annabel and Ruth cooking.
Cooking provides opportunities for exploration, too. Bake some bread and you’ve got an excuse to talk about yeast!
  • Chromotography of inks
    I’ve been waiting to do this until I get the chance to work out which felt tip pens are going to give us the most-exciting results… but maybe that’s an experiment we should do together, too! Colouring-in coffee filter papers and then letting them stand in a cup of water (assuming a water-soluable ink) should produce pretty results… and show the composition of the inks, too!
  • Colour mixing
    Mixing paint or play-doh is an easy way to demonstrate subtractive colour mixing. We got the chance to do some additive colour mixing using a colour disk spinner at a recent science fair event, but if we hadn’t I’d always had plans to build our own, like this one.
  • Structure and form of life
    Looking at the way that different plants and animals’ physical structure supports their activities makes for good hands-on or thought-driven experimentation. A day at the zoo gets a few steps more-educational for a preschooler when you start talking about what penguins are able to do as a result of the shape of their unusual wings and a walk in the park can be science’d-up by collecting the leaves of different trees and thinking about why they’re different to one another.
  • Stabbing balloons
    The classic magic trick of poking a skewer through a balloon… with petroleum jelly on the skewer… lends itself to some science, so it’s on my to-do list.
Paining a colour wheel.
Subtractive colour mixing can be demonstrated by mixing paint. Colour and spin a wheel to demonstrate additive mixing.
  • Surface tension
    Water’s such a brilliant chemical because it’s commonplace, safe, and exhibits so many interesting phenomena. Surface tension can be demonstrated by ‘floating’ things like paperclips on top of the surface, and can be broken by the addition of soap.
  • Astronomy
    In the winter months when the sun sets before bedtime are a great time to show off stars, planets, satellites and the moon. Eyes or binoculars are plenty sufficient to get started.
  • Life cycles
    I was especially pleased when our nursery kept an incubator full of chicken eggs so that the children could watch them hatch and the chicks emerge. We’d looked at this process before at a farm, but it clearly had a big impact to see it again. Helping to collect eggs laid by my mother’s chickens helps to join-up the circle. Frogspawn and caterpillars provide a way to look at a very different kind of animal life.
  • Putting baking soda into things
    Different everyday kitchen liquids (water, vinegar, oil…) react differently to the addition of baking soda. This provides a very gentle introduction to chemistry and provides an excuse to talk about making and testing predictions: now that we’ve seen what cold water does, do you think that hot water will be the same or different?
Annabel is awed by the size of a tyrannosaurus rex skeleton.
“Why do some animals have sharp teeth and some have flat teeth?” was a question I posed. We found the answer together (and were wowed by the size of the T-rex skeleton behind the camera) at the Natural History Museum.
  • Bubbles and foams
    Blowing bubbles through different types of mesh (we just used different kinds of tea towels elastic-banded to the cut-off end of a plastic bottle) demonstrates how you can produce foams of different consistencies – from millions of tiny bubbles to fewer larger bubbles – because of the permeability of the fabric. And then we wrecked the last tea towel by adding food colouring to it so we could make coloured foams (“bubble snakes”).
  • Phase transition
    Start with ice and work out what makes it melt: does it melt faster in your hand or in a dish? Does it melt faster or slower if we break it up into smaller parts? If we ‘paint’ pictures on the patio with them, where does the water go? I’m also thinking about ways in which we can safely condense the steam (and capture the vapour) from the kettle onto e.g. a chilled surface. Once we’re at a point where a thermometer makes sense I was also considering replicating the experiment of measuring the temperature of melting snow: or perhaps even at that point trying to manipulate the triple point of water using e.g. salt.
  • Dissection
    Take apart the bits of a flower, or look in detail at the parts of a bone-in cut of meat, and try to understand what they’re all for and why they are the way they are.
  • What floats?
    Next time the paddling pool is out, I’d like to start a more-serious look at which things float and which things don’t any try to work out why. What might initially seem intuitive – dense (heavy-for-their-size) things sink – can be expanded by using plasticine to make a mixture of ‘sinking’ and ‘floating’ vessels and lead to further discovery. I’m also thinking we need to do the classic ‘raisins in a fizzy drink’ thing (raisins sink, but their rough surfaces trap the bubbles escaping from the now-unpressurised liquid, causing them to float back up to shed their bubbles).
Annabel hugs a goat.
Get some hands-on biology at your nearest petting zoo. No science in this picture, but plenty of hugging.

So there’s my “now and next” list of science activities that we’ll be playing at over the coming months. I’m always open to more suggestions, though, so if you’re similarly trying to help shape an enquiring and analytical mind, let me know what you’ve been up to!

 

× × × × × × × ×

The Long Tail of an Abusive Relationship

I am a survivor of an abusive relationship, and parts of that experience affect the way that I engage in romantic relationships… but I have difficulty quantifying exactly how much. Insert obvious (minor) trigger warning here, and scroll past the kitten if you want to read more.

An adorable long-haired calico kitten. Instant eyebleach.
Mew.

I’m fine, by the way. It took… a long, long time, like in the region of a decade, to be completely fine about it, and I appreciate that compared to many people, I got lucky. Like many victims (and especially among men), my recovery was hampered by the fact that I found it difficult to see the relationship as having been abusive in the first place: that first step took many years all by itself. I’m not kidding when I say I’m fine, by the way: no, I don’t need to talk about it (with many of my circles of friends made up of current and former helpline volunteers of various types, I feel the need to make that doubly-clear: sometimes, one just can’t escape from people who care about you so much that they’ll offer you a cup of tea even if they’ve only got saltwater to make it with, if you catch the drift of my needless in-joke).

But I wanted to share with you something that I’ve gradually realised about how I was changed as a result of that relationship. Something that still affects me today and, for all I know, probably always will: a facet of my personality whose origins I eventually traced back to that dreadful relationship.

A man investigating the inside of his own (mechanical) brain.
Earlier this year, I finally got around to reading the (brilliant) Stories of Your Life and Others by Ted Chiang. As somebody who loves to take apart his own brain to see how it works, I loved the story of an automaton who more-literally does exactly that.

A major factor in my attraction to people, for the last decade and a half, has been whether or not they demonstrate being attracted to me. I’m sure that’s the case for everybody, at least to some extent – there’s a necessary reciprocity for a relationship to work, of course – but in my case there’ve been times in my past when the entirety of my attraction to somebody could be described in terms of their attraction to me… and that’s a level that definitely isn’t healthy! It stems from a lack of belief in my own worth as relationship material, which had grown to such an extent that feeling as if I were even-remotely attractive in somebody else’s eyes has, regardless of whether or not I’d be interested in them under other circumstances, made me feel as though I ought to “give them a shot”. Again: not healthy.

This, in turn, comes from a desperation of considering myself fundamentally unattractive, undateable, and generally unworthy of the attention of anybody else in any relationship capacity… which is highly tied-up in the fact that I had a relationship in which my partner repeatedly and methodically taught me exactly that: that I was lucky to be in a relationship with them or indeed with anybody, etc.

Given enough time, persuasion, and coercive tactics, this is the kind of shit that sinks in and, apparently, sticks.

Dalmatian wrapped in barbed wire.
If this picture makes you sad… then you shouldn’t have scrolled past the kitten, should you?

I don’t mind that I’m a product of my environment. But it bugs me a little that I’m still, to a small (and easily managable, nowadays) extent the product of somebody else’s deliberate and manipulative efforts to control me, a decade and a half after the fact.

Now I’ll stress once again that I’m fine now: I’ve recovered by as much as I need (or at least expect) to. Some years ago, I finally got to the point that if you let me know that you’re attracted to me then that isn’t by itself something that makes me completely infatuated with you. Nowadays, I’m capable of actually engaging my brain and thinking “Hmm: would I be interested in this person if it weren’t for the fact that they’d just validated my worth in some way?” But I’m still aware of the sensation – that nagging feeling that I’m acting according to a manipulative bit of programming – even though I’m pretty confident that it doesn’t influence how I behave any more.

It’s funny how our brains work. At the end of the relationship, I made a reasonably-rapid bounceback/recovery in terms of my general self-worth, but it took far, far longer to get control over this one specific thing. I guess we all react to particular stresses in different ways. For me, somebody who’d spent his childhood and teen years with perhaps, if anything, a little much self-worth, it might have been inevitable that I’d be unable to rebuild the part of that self-image that was most-effectively demolished by somebody else: the bit that is dependent upon somebody else’s validation.

But who knows… as I said, I have difficulty quantifying how much that abusive relationship impacted me. Because it is, of course, true to say that every single thing I’ve ever experienced will have affected me in some way or another – made me the person I subsequently became. How can I justify blaming a single relationship? I know that I wasn’t “like this” back when I first started my dating life, but I can’t conclusively prove that it was the result of any one particular relationship: for all I can claim, perhaps it was something else? Maybe this was always who I’d become? Or maybe, of course, this entire paragraph is simply the result of the fact that my brain still has difficulty with the term “abusive relationship” and is more-than-happy to keep trying to reach for whatever alternative explanations it can find.

Once again though, I’ll stress that I’m okay now and I have been for many years. I just wanted to share with you an observation I’d made about my own psychology… and the long tail that even the “tamest” of abusive relationships can leave.

× ×

Steer! An Experimental Canvas/Websocket Game

As you may know, I’ve lately found an excuse to play with some new web technologies, and I’ve also taken the opportunity to try to gain a deeper understanding of some less bleeding-edge technologies that I think have some interesting potential. And so it was that, while I was staffing the Three Rings stall at last week’s NCVO conference, I made use of the time that the conference delegates were all off listening to a presentation to throw together a tech demo I call Steer!

Animated GIF from a video, showing a player using their mobile phone to steer a car on a desktop computer screen, all using the web browsers on both devices.
A player uses their mobile phone to steer a car on a desktop computer, using nothing more than a web browser.

As you can see from the GIF above, Steer! is a driving game. The track and your car are displayed in a web browser on a large screen, for example a desktop or laptop computer, television, or tablet, and your mobile phone is used to steer the car by tilting it to swerve around a gradually-narrowing weaving road. It’s pretty fun, but what really makes it interesting to me is the combination of moderately-new technologies I’ve woven together to make it possible, specifically:

  • The Device Orientation API, which enables a web application to detect the angle at which you’re holding your mobile phone
  • Websockets as a mechanism to send that data in near-real-time from the phone to the browser, via a web server: for the fastest, laziest possible development, I used Firebase for this, but I’m aware that I could probably get better performance by running a local server on the LAN shared by both devices
  • The Canvas API to draw the output to the screen

Infographic showing how Steer! works. Phone accelerometer determines orientation, pushes to Firebase (up to 60 times/sec), which pushes to browser (via Websocket), which updates screen.

The desktop browser does all of the real work: it takes the orientation of the device and uses that, and the car’s current speed, to determine how it’s position changes over the time that’s elapsed since the screen was last refreshed: we’re aiming for 60 frames a second, of course, but we don’t want the car to travel slower when the game is played on a slower computer, so we use requestAnimationFrame to get the fastest rate possible and calculate the time between renderings to work out how much of a change has occurred this ‘tick’. We leave the car’s sprite close to the bottom of the screen at all times but change how much it rotates from side to side, and we use it’s rotated to decide how much of its motion is lateral versus the amount that’s “along the track”. The latter value determines how much track we move down the screen “behind” it.

The track is generated very simply by the addition of three sine waves of different offset and frequency – a form of very basic procedural generation. Despite the predictability of mathematical curves, this results in a moderately organic-feeling road because the player only sees a fraction of the resulting curve at any given time: the illustration below shows how these three curves combine to make the resulting road. The difficulty is ramped up the further the player has travelled by increasing the amplitude of the resulting wave (i.e. making the curves gradually more-agressive) and by making the road itself gradually narrower. The same mathematics are used to determine whether the car is mostly on the tarmac or mostly on the grass and adjust its maximum speed accordingly.

Sum of sine waves as used to generate the track for Steer!

In order to help provide a visual sense of the player’s speed, I added dashed lines down the road (dividing it into three lanes to begin with and two later on) which zip past the car and provide a sense of acceleration, deceleration, overall speed, and the impact of turning ‘sideways’ (which of course reduces the forward momentum to nothing).

This isn’t meant to be a finished game: it’s an experimental prototype to help explore some technologies that I’d not had time to look seriously at before now. However, you’re welcome to take a copy – it’s all open source – and adapt or expand it. Particular ways in which it’d be fun to improve it might include:

  • Allowing the player more control, e.g. over their accelerator and brakes
  • Adding hazards (trees, lamp posts, and others cars) which must be avoided
  • Adding bonuses like speed boosts
  • Making it challenging, e.g. giving time limits to get through checkpoints
  • Day and night cycles (with headlights!)
  • Multiplayer capability, like a real race?
  • Smarter handling of multiple simultaneous users: right now they’d share control of the car (which is the major reason I haven’t given you a live online version to play with and you have to download it yourself!), but it’d be better if they could “queue” until it was their turn, or else each play in their own split-screen view or something
  • Improving the graphics with textures
  • Increasing the entropy of the curves used to generate the road, and perhaps adding pre-scripted scenery or points of interest on a mathematically-different procedural generation algorithm
  • Switching to a local LAN websocket server, allowing better performance than the dog-leg via Firebase
  • Greater compatibility: I haven’t tried it on an iPhone, but I gather than iOS devices report their orientation differently from Android ones… and I’ve done nothing to try to make Steer! handle more-unusual screen sizes and shapes
  • Anything else? (Don’t expect me to have time to enhance it, though: but if you do so, I’d love to hear about it!)

Tomorrow’s Web, Today

Maybe it’s because I was at Render Conf at the end of last month or perhaps it’s because Three Rings DevCamp – which always gets me inspired – was earlier this month, but I’ve been particularly excited lately to get the chance to play with some of the more “cutting edge” (or at least, relatively-new) web technologies that are appearing on the horizon. It feels like the Web is having a bit of a renaissance of development, spearheaded by the fact that it’s no longer Microsoft that are holding development back (but increasingly Apple) and, perhaps for the first time, the fact that the W3C are churning out standards “ahead” of where the browser vendors are managing to implement technical features, rather than simply reflecting what’s already happening in the world.

Ben Foxall at Render Conf 2017 discusses the accompanying JSOxford Hackathon.
Ben Foxall at Render Conf 2017 discusses the accompanying JSOxford Hackathon. Hey, who’s that near the top-right?

It seems to me that HTML5 may well be the final version of HTML. Rather than making grand new releases to the core technology, we’re now – at last! – in a position where it’s possible to iteratively add new techniques in a resilient, progressive manner. We don’t need “HTML6” to deliver us any particular new feature, because the modern web is more-modular and is capable of having additional features bolted on. We’re in a world where browser detection has been replaced with feature detection, to the extent that you can even do non-hacky feature detection in pure CSS, now, and this (thanks to the nature of the Web as a loosely-coupled, resilient platform) means that it’s genuinely possible to progressively-enhance content and get on board with each hot new technology that comes along, if you want, while still delivering content to users on older browsers.

And that’s the dream! A web of progressive-enhancement stays true to Sir Tim’s dream of universal interoperability while still moving forward technologically. I’ve no doubt that there’ll always be people who want to break the Web – even Google do it, sometimes – with single-page Javascript-only web apps, “app shell” websites, mobile-only or desktop-only experiences and “apps” that really ought to have been websites (and perhaps PWAs) to begin with… but the fact that the tools to make a genuinely “progressively-enhanced” web, and those tools are mainstream, is a big deal. If you don’t think we’re at that point yet, I invite you to watch Rachel Andrews‘ fantastic presentation, “Start Using CSS Grid Layout Today”.

Three Rings' developers hard at work at this year's DevCamp.
Three Rings’ developers hard at work at this year’s DevCamp.

Some of the things I’ve been playing with recently include:

Intersection Observers

Only really supported in Chrome, but there’s a great polyfill, the Intersection Observer API is one of those technologies that make you say “why didn’t we have that already?” It’s very simple: all an Intersection Observer does is to provide event hooks for target objects entering or leaving the viewport, without resorting to polling or hacky code on scroll event captures.

Intersection Observer example (animated GIF)

What’s it for? Well the single most-obvious use case is lazy-loading images, a-la Medium or Google Image Search: delivering users a placeholder image or a low-resolution copy until they scroll far enough for the image to come into view (or almost into view) and then downloading the full-resolution version and dynamically replacing it. My first foray into Intersection Observers was to take Medium’s approach and then improve it with a Service Worker in order to make it behave nicely even if the user’s Internet connection was unreliable, but I’ve since applied it to my Reddit browser plugin MegaMegaMonitor: rather than hammering the browser with Javascript the plugin now waits until relevant content enters the viewport before performing resource-intensive tasks.

Web Workers

I’d briefly played with Service Workers before and indeed we’re adding a Service Worker to the next version of Three Rings, which, in conjunction with a manifest.json and the service’s (ongoing) delivery over HTTPS (over H2, where available, since last year), technically makes it a Progressive Web App… and I’ve been looking for opportunities to make use of Service Workers elsewhere in my work, too… but my first dive in to Web Workers was in introducing one to the next upcoming version of MegaMegaMonitor.

MegaMegaMonitor v155a Lists feature
MegaMegaMonitor’s processor-intensive “Lists” feature sees the most benefit from Web Workers

Web Workers add true multithreading to Javascript, and in the case of MegaMegaMonitor this means the possibility of pushing the more-intensive work that the plugin has to do out of the main thread and into the background, allowing the user to enjoy an uninterrupted browsing experience while the heavy-lifting goes on in the background. Because I don’t control the domain on which this Web Worker runs (it’s reddit.com, of course!), I’ve also had the opportunity to play with Blobs, which provided a convenient way for me to inject Worker code onto somebody else’s website from within a userscript. This has also lead me to the discovery that it ought to be possible to implement userscripts that inject Service Workers onto websites, which could be used to mashup additional functionality into websites far in advance of that which is typically possible with a userscript… more on that if I get around to implementing such a thing.

Fetch

The final of the new technologies I’ve been playing with this month is the Fetch API. I’m not pulling any punches when I say that the Fetch API is exactly what XMLHttpRequests should have been from the very beginning. Understanding them properly has finally given me the confidence to stop using jQuery for the one thing for which I always seemed to have had to depend on it for – that is, simplifying Ajax requests! I mean, look at this elegant code:

fetch('posts.json')
.then(function(response) {
  return response.json();
})
.then(function(json) {
  console.log(json.something.otherThing);
});

Whether or not you’re a fan of Javascript, you’ve got to admit that that’s infinitely more readable than XMLHttpRequest hackery (at least, without the help of a heavyweight library like jQuery).

Other things I've been up to include Laser Duck Hunt, but that's another story.
Other things I’ve been up to include Laser Duck Hunt, but that’s another story.

So that’s some of the stuff I’ve been playing with lately: Intersection Observers, Web Workers, Blobs, and the Fetch API. And I feel all full of optimism on behalf of the Web.

× × × ×

What Does Jack FM Sound Like?

Those who know me well know that I’m a bit of a data nerd. Even when I don’t yet know what I’m going to do with some data yet, it feels sensible to start collecting it in a nice machine-readable format from the word go. Because you never know, right? That’s how I’m able to tell you how much gas and electricity our house used on average on any day in the last two and a half years (and how much off that was offset by our solar panels).

Daily energy usage at Dan's house for the last few years. Look at the gas peaks in the winters, when the central heating ramps up!
The red lumps are winters, when the central heating comes on and starts burning a stack of gas.

So it should perhaps come as no huge surprise that for the last six months I’ve been recording the identity of every piece of music played by my favourite local radio station, Jack FM (don’t worry: I didn’t do this by hand – I wrote a program to do it). At the time, I wasn’t sure whether there was any point to the exercise… in fact, I’m still not sure. But hey: I’ve got a log of the last 45,000 songs that the radio station played: I might as well do something with it. The Discogs API proved invaluable in automating the discovery of metadata relating to each song, such as the year of its release (I wasn’t going to do that by hand either!), and that gave me enough data to, for example, do this (click on any image to see a bigger version):

Jack FM: Decade Frequency by Hour
Decade frequency by hour: you’ve got a good chance of 80s music at any time, but lunchtime’s your best bet (or perhaps just after midnight). Note that times are in UTC+2 in this graph.

I almost expected a bigger variance by hour-of-day, but I guess that Jack isn’t in the habit of pandering to its demographics too heavily. I spotted the post-midnight point at which you get almost a plurality of music from 1990 or later, though: perhaps that’s when the young ‘uns who can still stay up that late are mostly listening to the radio? What about by day-of-week, then:

Jack FM: Decade Frequency by Day of Week
Even less in it by day of week… although 70s music fans should consider tuning in on Fridays, apparently, and 80s fans will be happiest on Sundays.

The chunks of “bonus 80s” shouldn’t be surprising, I suppose, given that the radio station advertises that that’s exactly what it does at those times. But still: it’s reassuring to know that when a radio station claims to play 80s music, you don’t just have to take their word for it (so long as their listeners include somebody as geeky as me).

It feels to me like every time I tune in they’re playing an INXS song. That can’t be a coincidence, right? Let’s find out:

Jack FM: Artist Frequency
One in every ten songs are by just ten artists (including INXS). One in every four are by just 34 artists.

Yup, there’s a heavy bias towards Guns ‘n’ Roses, Michael Jackson, Prince, Oasis, Bryan Adams, Madonna, INXS, Bon Jovi, Queen, and U2 (who collectively are responsible for over a tenth of all music played on Jack FM), and – to a lesser extent – towards Robert Palmer, Meatloaf, Blondie, Green Day, Texas, Whitesnake, the Pet Shop Boys, Billy Idol, Madness, Rainbow, Elton John, Bruce Springsteen, Aerosmith, Fleetwood Mac, Phil Collins, ZZ Top, AC/DC, Duran Duran, the Police, Simple Minds, Blur, David Bowie, Def Leppard, and REM: taken together, one in every four songs played on Jack FM is by one of these 34 artists.

Jack FM: Top 20
Amazingly, the most-played song on Jack FM (Alice Cooper’s “Poison”) is not by one of the most-played 34 artists.

I was interested to see that the “top 20 songs” played on Jack FM these last six months include several songs by artists who otherwise aren’t represented at all on the station. The most-played song is Alice Cooper’s Poison, but I’ve never recorded them playing any other Alice Cooper songs (boo!). The fifth-most-played song is Fight For Your Right, by the Beastie Boys, but that’s the only Beastie Boys song I’ve caught them playing. And the seventh-most-played – Roachford’s Cuddly Toy – is similarly the only Roachford song they ever put on.

Next I tried a Markov chain analysis. Markov chains are a mathematical tool that examines a sequence (in this case, a sequence of songs) and builds a map of “chains” of sequential songs, recording the frequency with which they follow one another – here’s a great explanation and playground. The same technique is used by “predictive text” features on your smartphone: it knows what word to suggest you type next based on the patterns of words you most-often type in sequence. And running some Markov chain analysis helped me find some really… interesting patterns in the playlists. For example, look at the similarities between what was played early in the afternoon of Wednesday 19 October and what was played 12 hours later, early in the morning of Thursday 20 October:

19 October 2016 20 October 2016
12:06:33 Kool & The Gang – Fresh Kool & The Gang – Fresh 00:13:56
12:10:35 Bruce Springsteen – Dancing In The Dark Bruce Springsteen – Dancing In The Dark 00:17:57
12:14:36 Maxi Priest – Close To You Maxi Priest – Close To You 00:21:59
12:22:38 Van Halen – Why Can’t This Be Love Van Halen – Why Can’t This Be Love 00:25:00
12:25:39 Beats International / Lindy – Dub Be Good To Me Beats International / Lindy – Dub Be Good To Me 00:29:01
12:29:40 Kasabian – Fire Kasabian – Fire 00:33:02
12:33:42 Talk Talk – It’s My Life Talk Talk – It’s My Life 00:38:04
12:41:44 Lenny Kravitz – Are You Gonna Go My Way Lenny Kravitz – Are You Gonna Go My Way 00:42:05
12:45:45 Shalamar – I Can Make You Feel Good Shalamar – I Can Make You Feel Good 00:45:06
12:49:47 4 Non Blondes – What’s Up 4 Non Blondes – What’s Up 00:50:07
12:55:49 Madness – Baggy Trousers Madness – Baggy Trousers 00:54:09
Eagle Eye Cherry – Save Tonight 00:56:09
Feeling – Love It When You Call 01:04:12
13:02:51 Fine Young Cannibals – Good Thing Fine Young Cannibals – Good Thing 01:10:14
13:06:54 Blur – There’s No Other Way Blur – There’s No Other Way 01:14:15
13:09:55 Pet Shop Boys – It’s A Sin Pet Shop Boys – It’s A Sin 01:17:16
13:14:56 Zutons – Valerie Zutons – Valerie 01:22:18
13:22:59 Cure – The Love Cats Cure – The Love Cats 01:26:19
13:27:01 Bryan Adams / Mel C – When You’re Gone Bryan Adams / Mel C – When You’re Gone 01:30:20
13:30:02 Depeche Mode – Personal Jesus Depeche Mode – Personal Jesus 01:33:21
13:34:03 Queen – Another One Bites The Dust Queen – Another One Bites The Dust 01:38:22
13:42:06 Shania Twain – That Don’t Impress Me Much Shania Twain – That Don’t Impress Me Much 01:42:23
13:45:07 ZZ Top – Gimme All Your Lovin’ ZZ Top – Gimme All Your Lovin’ 01:46:25
13:49:09 Abba – Mamma Mia Abba – Mamma Mia 01:50:26
13:53:10 Survivor – Eye Of The Tiger Survivor – Eye Of The Tiger 01:53:27
Scouting For Girls – Elvis Aint Dead 01:57:28
Verve – Lucky Man 02:00:29
Fleetwood Mac – Say You Love Me 02:05:30
14:03:13 Kiss – Crazy Crazy Nights Kiss – Crazy Crazy Nights 02:10:31
14:07:15 Lightning Seeds – Sense Lightning Seeds – Sense 02:14:33
14:11:16 Pretenders – Brass In Pocket Pretenders – Brass In Pocket 02:18:34
14:14:17 Elvis Presley / JXL – A Little Less Conversation Elvis Presley / JXL – A Little Less Conversation 02:21:35
14:22:19 U2 – Angel Of Harlem U2 – Angel Of Harlem 02:24:36
14:25:20 Trammps – Disco Inferno Trammps – Disco Inferno 02:28:37
14:29:22 Cast – Guiding Star Cast – Guiding Star 02:31:38
14:33:23 New Order – Blue Monday New Order – Blue Monday 02:36:39
14:41:26 Def Leppard – Let’s Get Rocked Def Leppard – Let’s Get Rocked 02:40:41
14:46:28 Phil Collins – Sussudio Phil Collins – Sussudio 02:45:42
14:50:30 Shawn Mullins – Lullaby Shawn Mullins – Lullaby 02:49:43
14:55:31 Stars On 45 – Stars On 45 Stars On 45 – Stars On 45 02:53:45
16:06:35 Dead Or Alive – You Spin Me Round Like A Record Dead Or Alive – You Spin Me Round Like A Record 03:00:47
16:09:36 Dire Straits – Walk Of Life Dire Straits – Walk Of Life 03:03:48
16:13:37 Keane – Everybody’s Changing Keane – Everybody’s Changing 03:07:49
16:17:39 Billy Idol – Rebel Yell Billy Idol – Rebel Yell 03:10:50
16:25:41 Stealers Wheel – Stuck In The Middle Stealers Wheel – Stuck In The Middle 03:14:51
16:28:42 Green Day – American Idiot Green Day – American Idiot 03:18:52
16:33:44 A-Ha – Take On Me A-Ha – Take On Me 03:21:53
16:36:45 Cranberries – Dreams Cranberries – Dreams 03:26:54
Elton John – Philadelphia Freedom 03:30:56
Inxs – Disappear 03:36:57
Kim Wilde – You Keep Me Hanging On 03:40:59
16:44:47 Living In A Box – Living In A Box
16:47:48 Status Quo – Rockin’ All Over The World Status Quo – Rockin’ All Over The World 03:45:00

The similarities between those playlists (which include a 20-songs-in-a-row streak!) surely can’t be coincidence… but they do go some way to explaining why listening to Jack FM sometimes gives me a feeling of déjà vu (along with, perhaps, the no-talk, all-jukebox format). Looking elsewhere in the data I found dozens of other similar occurances, though none that were both such long chains and in such close proximity to one another. What does it mean?

There are several possible explanations, including:

  • The exotic, e.g. they’re using Markov chains to control an auto-DJ, and so just sometimes it randomly chooses to follow a long chain that it “learned” from a real DJ.
  • The silly, e.g. Jack FM somehow knew that I was monitoring them in this way and are trying to troll me.
  • My favourite: these two are actually the same playlist, but with breaks interspersed differently. During the daytime, the breaks in the list are more-frequent and longer, which suggests: ad breaks! Advertisers are far more-likely to pay for spots during the mid-afternoon than they are in the middle of the night (the gap in the overnight playlist could well be a short ad or a jingle), which would explain why the two are different from one another!

But the question remains: why reuse playlists in close proximity at all? Even when the station operates autonomously, as it clearly does most of the time, it’d surely be easy enough to set up an auto-DJ using “smart random” (because truly random shuffles don’t sound random to humans) to get the same or a better effect.

Jack FM Style Guide
One of the things I love about Jack FM is how little they take seriously. Like their style guide.

Which leads to another interesting observation: Jack FM’s sister stations in Surrey and Hampshire also maintain a similar playlist most of the time… which means that they’re either synchronising their ad breaks (including their duration – I suspect this is the case) or else using filler jingles to line-up content with the beginnings and ends of songs. It’s a clever operation, clearly, but it’s not beyond black-box comprehension. More research is clearly needed. (And yes, I’m sure I could just call up and ask – they call me “Newcastle Dan” on the breakfast show – but that wouldn’t be even half as fun as the data mining is…)

× × × × × ×

A Suitable Blog

At a little over 590 thousand words and spanning 1,349 pages, Vikram Seth’s A Suitable Boy is almost-certainly among the top ten longest single-volume English-language novels. It’s pretty fucking huge.

A Suitable Boy, seen from the edge
I’ll stick with the Kindle edition: I fear that merely holding the paperback would be exhausting.

I only discovered A Suitable Boy this week (and haven’t read it – although there are some good reviews that give me an inclination to) when, on a whim, I decided to try to get a scale of how much I’d ever written on this blog and then decided I needed something tangible to use as a comparison. Because – give or take – that’s how much I’ve written here, too:

Graph showing cumulative words written on this blog, peaking at 593,457.
At 593,457 words, this blog wouldn’t fit into that book unless we printed it on the covers as well.

Of course, there’s some caveats that might make you feel that the total count should be lower:

  • It might include a few pieces of non-content code, here and there. I tried to strip them out for the calculation, but I wasn’t entirely successful.
  • It included some things which might be considered metadata, like image alt-text (on the other hand, sometimes I like to hide fun messages in my image alt-text, so perhaps they should be considered content).

On the other hand, there are a few reasons that it perhaps ought to be higher:

  • It doesn’t include any of the content “lost” during the July 2004 server failure, some of which (like this post about Orange) were later recovered but many of which (like this post about Christmas plans and upcoming exams) remain damaged. It also doesn’t include any of the lost content from the original 1998/1999 version of this blog, only the weird angsty-teen out-of-context surviving bits.
  • Post titles (which sometimes contain part of the content) and pages outside of blog posts are not included in the word count.
  • I’ve removed all pictures for the purpose of the word count. Tempting though it was to make each worth a thousand words, that’d amount to about another one and a half million words, which seemed a little excessive.
A delicious-looking BLT. Mmm, bacon.
Another reason for not counting images was that it was harder than you’d think to detect repeat use of images that I’ve used too many times. Like this one.

Of course, my blog doesn’t really have a plot like A Suitable Boy (might compare well to the even wordier Atlas Shrugged, though…): it’s a mixture of mostly autobiographical wittering interspersed with musings on technology and geekery and board games and magic and VR and stuff. I’m pretty sure that if I knew where my life would be now, 18 years ago (which is approximately when I first started blogging), I’d have, y’know, tried to tie it all together with an overarching theme and some character development or something.

Or perhaps throw in the odd plot twist or surprise: something with some drama to keep the reader occupied, rather than just using the web as a stream-of-conciousness diary of whatever it is I’m thinking about that week. I could mention, for example, that there’ll be another addition to our house later this year. You heard it here first (unless you already heard it from somewhere else first, in which case you heard it there first.)

Annabel sitting on her daddy's knee and looking at sonograph pictures of her future baby brother.
Brought up in a world of tiny, bright, UHD colour touchscreens, Annabel seemed slightly underwhelmed by the magic of a sonograph picture of her future baby brother.

Still: by the end of this post I’ll have hit a nice, easy-to-remember 594,000 words.

× × ×

Anatomy of Cookie XSS

A cross-site scripting vulnerability (shortened to XSS, because CSS already means other things) occurs when a website can be tricked into showing a visitor unsafe content that came from another site visitor. Typically when we talk about an XSS attack, we’re talking about tricking a website into sending Javascript code to the user: that Javascript code can then be used to steal cookies and credentials, vandalise content, and more.

Good web developers know to sanitise input – making anything given to their pages by a user safe before ever displaying it on a page – but even the best can forget quite how many things really are “user input”.

"Who Am I?" page provided by University of Oxford IT Services.
This page outputs a variety of your inputs right back at you.

Recently, I reported a vulnerability in a the University of Oxford’s IT Services‘ web pages that’s a great example of this.  The page (which isn’t accessible from the public Internet, and now fixed) is designed to help network users diagnose problems. When you connect to it, it tells you a lot of information about your connection: what browser you’re using, your reverse DNS lookup and IP address, etc.. The developer clearly understood that XSS was a risk, because if you pass a query string to the page, it’s escaped before it’s returned back to you. But unfortunately, the developer didn’t consider the fact that virtually anything given to you by the browser can’t be trusted.

My Perl program, injecting XSS code into the user's cookie and then redirecting them.
To demonstrate this vulnerability, I had the option of writing Perl or Javascript. For some reason, I chose Perl.

In this case, I noticed that the page would output any cookies that you had from the .ox.ac.uk domain, without escaping them. .ox.ac.uk cookies can be manipulated by anybody who has access to write pages on the domain, which – thanks to the users.ox.ac.uk webspace – means any staff or students at the University (or, in an escalation attack, anybody’s who’s already compromised the account of any staff member or student). The attacker can then set up a web page that sets up such a “poisoned” cookie and then redirects the user to the affected page and from there, do whatever they want. In my case, I experimented with showing a fake single sign-on login page, almost indistinguishable from the real thing (it even has a legitimate-looking .ox.ac.uk domain name served over a HTTPS connection, padlock and all). At this stage, a real attacker could use a spear phishing scam to trick users into clicking a link to their page and start stealing credentials.

A fake SSO login page, delivered from a legitimate-looking https URL.
The padlock, the HTTPS url, and the convincing form make this page look legitimate. But it’s actually spoofed.

I’m sure that I didn’t need to explain why XSS vulnerabilities are dangerous. But I wanted to remind you all that truly anything that comes from the user’s web browser, even if you think that you probably put it there yourself, can’t be trusted. When you’re defending against XSS attacks, your aim isn’t just to sanitise obvious user input like GET and POST parameters but also anything that comes from a browser header including cookies and referer headers, especially if your domain name carries websites managed by many different people. In an ideal world, Content Security Policy would mitigate all these kinds of attacks: but in our real world – sanitise those inputs!

× × ×

Underground and Overground in the City of London

Despite being only a short journey away (made even shorter by the new railway station that appeared near by house last year), I rarely find myself in London. But once in a while a week comes along when I feel like I’m there all the time.

British Rail branded poster from an abandoned tunnel under Euston Station, circa 1960s.
TODO: funny caption

On Friday of last week, Ruth, JTA and I took one of the London Transport Museum‘s Hidden London tours. Back in 2011 we took a tour of Aldwych Tube Station, probably the most well-known of the London Underground’s disused stations, and it was fantastic, so we were very excited to be returning for another of their events. This time around, we were visiting Euston Station.

Our tour group gathers around the corner from Euston Station.
Stylish hi-vis jackets for everybody!

But wait, you might-well say: Euston station isn’t hidden nor disused! And you’d be right. But Euston’s got a long and convoluted history, and it used to consist of not one but three stations: the mainline station and two independent underground stations run by competing operators. The stations all gradually got connected with tunnels, and then with a whole different set of tunnels as part of the redevelopment in advance of the station’s reopening in 1968. But to this day, there’s still a whole network of tunnels underneath Euston station, inaccessible to the public, that are either disused or else used only as storage, air vents, or cable runs.

Disused lift shaft under Euston Station.
This lift shaft used to transport passengers between what are now the Northern and Victoria lines. Now it’s just a big hole.

A particular highlight was getting to walk through the ventilation shaft that draws all of the hot air out of the Victoria Line platforms. When you stand and wait for your train you don’t tend to think about the network of tunnels that snake around the one you’re in, hidden just beyond the grills in the ceiling or through the doors at the end of the platforms. I shot a video (below) from the shaft, periodically looking down on the trains pulling in and out below us.

No sooner were we back than I was away again. Last Saturday, I made my way back to London to visit Twitter’s UK headquarters in Soho to help the fantastic Code First: Girls team to make some improvements to the way they organise and deliver their Javascript, Python and Ruby curricula. I first came across Code First: Girls through Beverley, one of Three Rings‘ volunteers who happens to work for them, and I’ve become a fan of their work. Unfortunatley my calendar’s too packed to be able to volunteer as one of their instructors (which I totally would if it weren’t for work, and study, and existing volunteering, and things), but I thought this would be a good opportunity to be helpful while I had a nominally-“spare” day.

The coffee lounge on the administration/marketing floor of Twitter's offices in Soho.
Twitter’s offices, by the way, are exactly as beautiful as you’d hope that they might be.

Our host tried to win me over on the merits of working for Twitter (they’re recruiting heavily in the UK, right now), and you know what – if I were inclined towards a commute as far as London (and I didn’t love the work I do so much) – I’d totally give that a go. And not just because I enjoyed telling an iPad what I wanted to drink and then having it dispensed minutes later by a magical automated hot-and-cold-running-drinks tap nearby.

Twitter's reception with its "tweet wall" sculpture.
I’m not sure I ‘get’ the idea of a sculpture of tweets, though. Wouldn’t a “live display” have been more-thematic?

And that’s not even all of it. This coming Thursday, I’m back in London again, this time to meet representatives from a couple of charities who’re looking at rolling out Three Rings. In short: having a direct line to London on my doorstep turns out to be pretty useful.

× × × × ×