Should have been labelled...

The aftermath of the recent IT fiasco at British Airways reminds me of a funny story which should be filed under the "should have labelled it" category.

In my early 20's I took a trip to Edinburgh and stayed in a cheap guesthouse. I also took my "games console" (a Philips CDi, if anyone remembers those!).

The room was a bit sparse on sockets, especially near the TV, but there was one with a 12 volt adaptor already in it... I looked to see where is was going and what it was powering, but it didn't seem to be anything in the room. So, i turned it off, and nothing seemed to change, so I unplugged it, plugged in my CDi, fired up the TV and thought nothing more of it.

Next morning, I was rudely awakened by a knock on the door and a TV engineer asking if my TV was working. I'd played my video games with no problem, so "yes" was the answer. There was some confusion, as every other guest in the guesthouse had reported their TV not working.

It transpires they meant there was no signal - and the TV company had been out since dawn clambering all over the roof to trace the fault, starting from the aerial backwards.

Well, you know where this is heading.

It turns out that adaptor powered the TV booster box in some cupboard somewhere - so I had killed everyone's terrestrial signal by unplugging it. 

The proprietor was fuming and wanted to charge me the whole call out fee. Despite being a nervous 20-something-year-old, I refused. He said we were not entitled to use the electricity in the room. I said there was a TV, kettle in the room, so he was talking nonsense. And if he had critical infrastructure powered from a guest room, it should be labelled.

(In the end I gave him everything I had in my wallet as a gesture of goodwill, which was about 28 quid; I think the call out fee was 60 something)

So - a 10p label would have saved a £60 cost to the business...

BA, take note.... 

How to set up iMessage sharing across multiple devices (especially after 2 factor authentication)

I recently set up 2-factor authentication on my apple account to provide stronger protection of my account. 

Around about the same time I noticed that iMessages and calls were not being shared across my multiple apple devices as they had been. I went into settings -> icloud -> <your apple id> -> where there are settings for:

  • contact information
  • password & security
  • devices
  • payment

I made sure that in "devices" all my devices were showing up (they are listed automatically if signed in against your apple id) - which they were

In password and security I made sure that both my mobile phones were "trusted phone numbers"

I figured that should now do the trick.. 

It didn't

After googling a bit, turns out you also have to go into settings -> messages -> Send & Receive and in there make sure that all your devices and email addresses are listed. You can also define which number/email messages appear to come from when you compose them; which means each device can initiate from its own number, or if you like, they can all initiate from the same ID. 
 

After I'd done that it all worked :) 

by the way, you can also go into facetime settings and do the same.. 

Maybe this is why some kids can read long complicated words and trip up on short easy ones

A study of word confusability and similarity for whole-word readers

This article doesn't claim to be a valid scientific study, none-the-less it was interesting to do, and, essentially, perform as a thought experiment. 

One of the things I have noticed with my own son and lots of comments from other parents of early readers, gifted and potentially hyperlexic children, is that such children astonishingly read (recognise) long complex words (such as "galaxy" and "knowledge") with ease, yet sometimes (perhaps even often) get tripped up on short "simple" words, such as "one" and "many". The question is, what is the explanation for this, as it seems to defy logic?

I happen to have a background in the field of speech recognition (in computers) and there are factors of that field which boil down to the problem of recognising and distinguishing words from each other. So, I was eventually moved to perform some kind of analysis investigating this. I don't know if this is original or even valid research, but it was fun to do. 

How do early readers, read?

The first thing to be aware of is two broad types of reading (and reading-teaching) methods: phonics and "whole word" (or whole language). Phonics concerns the systematic pronunciation of the component sounds of a word to reach the whole. Whole-word does what is says on the tin: the reader either memorises or deduces the whole word in one step. (As adults we tend to read like this). 

My anecdotal conversations suggest that early readers are one or the other: some early readers display/develop/self-teach a phonic approach, and the remainder, it's the whole world. (In the case of my own son, it's "whole word"). In my anecdotal evidence, the most startling early readers are "whole word" because even at age 3 or 4, obscure words of 8, 10, 12 or more letters can be decoded instantly. 

Since whole-word readers essentially memorise and recognise entire words, it begs the question: given that they handle complex words with ease, why do they sometimes get tripped up on short words?

It's possible to come up with lots of theories involving visual processing disorders, dyslexic conditions, motivation (laziness) and so on. However, I theorised about a more empirical factor: if children appear to recognise short words less-well, is it simply because short words are less memorable/more confusable?  

(Confusability, in various forms, is a factor we have to deal with on a regular basis in speech recognition, which prompted my thinking.) 

Mr. Levenshtein, meet Dr. Fry.

Before we get to the analysis, I need to introduce two things. The first is the Fry Sight Word list. I don't seem to be able to find out much about Dr. Fry directly on the internet, but many educational websites cite the fact he created a list of the most popular and common English words in literature, originally in the 50's but since updated. 

If these are the most common words that a child is going to see, then it seemed to make sense to evaluate what levels of "confusability" exists among them. 

Top 50 Fry Sight words

Top 50 Fry Sight words

Next we meet Mr. Levenshtein; or at least his algorithm, which provides a way to calculate the number of single character edits to transform one word into another. To put that another way, it gives a measure of word similarity - small Levenshtein distances between words means they are more textually similar than those with large distances.  

We should note that Levenshtein distance only tells us about textual character difference (structure), which is certainly useful when computers are comparing words. It doesn't necessarily tell us how similar words are through the eyes of a child (e.g. geometry), but it's a good starting point. 

Analysis

Analysis Summary

Analysis Summary

To perform the analysis, I took a set of "sample words"  and calculated the Levenshtein distance against between each of those words and every word in the "Fry Sight List".
I compared the sample words against the full Fry list (1000 words) and also against the top 150, and plotted the distribution of Levenshtein distances obtained. 

What this effectively tells us is "how similar is the target word to the most common words in the language". We might postulate that the more similar a word is to others, the more likely it could be confused - i.e. the less likely to stand out as unique. Or conversely, a greater cognitive load required to uniquely recognise it.

I plotted the results for "one" "many" "who" (all identified as "trip up" words), plus "galaxy" and "knowledge" (indentfied as easily-recalled words). 

To interpret the chart, the height of each bar tells you by what amount the target word differed from how much of the Fry's list. So, for example, a 50% at marker 3 means the word differed by 3 single-character transformations against 50% of the Fry list. 

Compared against 1000 top words, we see that "one" "many" and "who" are clustered around the 3,4 and 5 mark for Levenshtein distance. Indeed, this level of "similarity" captures up to 80% of the top 1000 words. In contrast, "galaxy" is typically different by around 6 - 7 letters, and "knowledge" even more different around 8 - 9 mark.

The effect is even more pronounced when comparing the sample words against the top 150 Fry words. (Again, many websites reference the claim that just 100 words make up almost half of all written material).  Indeed it's likely a child doesn't compare the word they are reading against their whole vocabulary, but will prune their recognition against a vocabulary that's filtered down to a smaller, similar set. Or to put it another way, they will most consciously compare a four letter words against the 3, 4 and 5 letter words in their vocabulary, and not the 8, 9, 10 letter words, which will be discarded subconsciously. 

In this case the profile of the sample words is more pronounced - the short words compare against the top 150 mainly in the 2,3,4 range (anything in 1 and 2 is certainly highly confusable). And the long, complex words now stand out as being significantly different - and thus, we presume easier to recognise uniquely within the given vocabulary.

Summary

There are of course weaknesses to this analysis:

1) it doesn't consider word geometry or font, which may make some words look more similar than others irrespective of Levenshtein distance, which considers the text only

2) The Fry Sight list is really only a arbitrary representation of the vocabulary an early reader might know. To some extent, by definition, this list is insufficient, because the words that early readers surprise their parents, carers and observers by knowing, are the long irregular words.

3) It would be useful to perform the analysis against a bigger vocabulary but of words the same length as the sample word - this might better match the process a child follows when recognising the word (pruning out the obviously non-similar words)

Notwithstanding, the comparison of sample words against the Fry Sight Word list shows statistically significant disparity in similarity between the shorter words than the longer words. At 1000 words long, the Fry Sight list offers statistical significance to the comparison.  

The result is not really surprising. As we might expect, there are more short words in the vocabulary, therefore more possibility of similarity and confusion. 

 

 

A Scientific Study of the distribution of Halloween Monkey Nuts within their shells

Some things are too important not to research. This year I saw numerous pictures in my Facebook feed of Halloween hauls (unanimously sweets) organised by type. That got me thinking, because I'd bought a whole bag of 'monkey nuts' to hand out on Halloween-  that we never used. Seems like they've gone out of fashion since I was a kid. 

I decided to go one better and measure the distribution of nuts within their shells. Typically a shell has one or two nuts, occasionally a prize of even more! The chart shows my results.  

Distribution frequency of monkey nuts within their shells.  

Distribution frequency of monkey nuts within their shells.  

At this time I have no way of knowing if this distribution applies to nuts growing in the wild or whether different supermarkets specify their own particular 'mix' :)  Perhaps that's for next year :) 

Make of it what you will.  

Controlling room temperature with Netatmo "occupancy detection" and IFTTT

Thanks to the addition of Heatmiser range to the online automation service IF (formerly IFTTT - "if this then that") it's now possible to control room temperature using inputs from your other IFTTT-friendly IOT devices. In my case, Netatmo weather station. 

In my house, heating for every room is individually controlled by a Heatmiser Neo thermostat, each running an individualised programme of temperature gradients throughout the day, tailored to each room. During the summer most of these are just on standby, meaning in practice unless the room drops below 12 degrees C, the heating will never come on.  

My child's room is the exception, because we don't want him to ever get too cold, and some days he naps in the afternoon; so his thermostat is always active. So far so good. Except when you open the windows, perhaps for fresh air during the day, and it turns cloudy, the temperature drops and the heating comes on and heats the great outdoors. 

Finally, I have a solution which does not involve adding sensors to the Windows.  

The first step is to use Netatmo indoor station as an occupancy detector. Over the last year I've charted the correlation between occupancy and CO2 levels and in general found that an occupied room tends to read >500ppm CO2 and unoccupied room is below that. Of course if you open the window the CO2 level drops to almost zero very rapidly. So, this basic threshold measure can be used as a simple detection of empty room and/or wIndows open.  

IFTTT recipes to control Heatmiser thermostats based on occupancy (CO2)&nbsp;

IFTTT recipes to control Heatmiser thermostats based on occupancy (CO2) 

 

Of course, you might ask what happens if the windows are open while the room is occupied. Good question - but in our case it never happens; our child is young, so for safety when he is using the room we always have the widows locked shut. 

This simple trigger forms the basis of the input to an IFTTT recipe which controls the Heatmiser thermostat in the same room. If the CO2 levels drop (room empty or Windows open) then the thermostat is set to 'standby' (this stops it following its daily program) and if CO2 rises again ( = occupied) the standby mode is deactivated and the normal program continues to run. 

This way we hope to avoid those costly mistakes where we have opened the windows and forgotten to adjust the thermostat; or unnecessarily heated an unoccupied room.  

For the future we can explore whether outdoor temperature, wind speed and rainfall can be used to optimise performance of the indoor heating.   

Make your own wake-up clock lamp with lifx

One of the first things I did with the lifx lamp in my bedroom was create a 'wake up lamp'. You know - a lamp that increases in brightness in the morning to help you wake gently.  

It was fine. Then one morning I had a flash of inspiration. 'Wouldn't it be great if it was also a clock?' 

it occurred to me, that since the lamp can change colour as well as brightness, the colour could be used to indicate the time, while the brightness helps to wake me up. And so the lifx wake up clock was born.  

Below is a screenshot of the scenes I have used to create this. My wake up period is divided into 15 minute Windows and each window is brighter than the last and a different colour and uses a slow ramp to smooth the change. The numbers in the theme titles indicate the target intensity, just for easy identification.  

A set of lifx scheduled to create a wake-up clock/lamp

A set of lifx scheduled to create a wake-up clock/lamp

My choice of colours follows more-or-less the rainbow, so that I can remember it in a hazy stupor. Of course, you could do anything. The idea being, then, that as I drift awake, the colour of the light tells me which 15 minute time window we are in. 

Simples. Now just waiting for the dark winter mornings to really test it out.  

 

More Sugru projects

I use Sugru around the home and car a lot, both indoors and outdoors.  

So here's a few more simple improvements made around the house. 

First up, the classic charging cable strengthening (iPad 2) - no mystery here. 

With a 2 year old about, the iPad cable needs a bit of strengthening  

With a 2 year old about, the iPad cable needs a bit of strengthening  

Next up, finger grips for a small remote control to help stop it sliding out of the hand. 

Sugru finger grips  

Sugru finger grips  

Finally, the ultimate tool you can never find: a pointy sticky sharpish thing to perform resets and extract SIM cards. This wee metal pin came as the on/off control with my solar lights - but a paper clip would do the same job. ​

Device reset tool

Device reset tool

Add a Sugru handle - voila! ​

Two new Sugru projects

Sugru has become my go-to DIY material. First I consider if the job can be done with Sugru, and if it can, I will.  

Magnets add a an extra dimension of usefulness - and although you can buy Sugru branded magnet packs, it is in fact cheaper to buy alternatives in bulk.  

The first part of this project is a magnetic mount for a solar step light on our back path. Not much point wiring up a light when this location faces South west and gets oodles of sunlight.  

The magnetic mounts mean no drilling, some adjustment possible in the exact position of the light, and of course completely undoable without damage. The solar light is metallic and will stick without modification. Quick, clean, simple, no tools! 

Sugru used to create magnetic mounts.  

Sugru used to create magnetic mounts.  

Part 2 of the project is to position the mount for my new netatmo outdoor sensor. It's just a plastic clip with a lug on it.  As it has no screw holes, Sugru is perfect to mount it.  The ideal position is under the front porch canopy.  

Netatmo internet connected weather station.  

Netatmo internet connected weather station.  

I used white Sugru and once afixed stuck some of the render chips back on top of it, so you can hardly see it. Very pleased with the result. The netatmo sensor just slides onto the lug. Again, quick, clean, simple, no drilling, no damage! I love Sugru! 

Netatmo mount on render/chippings.  

Netatmo mount on render/chippings.  

Coming home...

​Well, at the time of writing there are two weeks to go, all being well. Two weeks until we relocate from the South East of England, to the country I call home: Scotland.

It's not something I've written about much - at all even - even though it's been in the works a good while. And the back story is long and winding. So, for now, I'll spare all that. This is a project, and it will unfold, and there will be plenty time for all that.

So, the grand plan is to build our own house, for which the wheels are in motion; and while that happens we are moving to temporary rental accommodation. We secured that earlier this month after looking for a suitable property for almost 6 months. I can tell you, I jumped on it! It's only about 5 miles from where we plan to build, so it will be handy as our build unfolds. ​

temporary home while our new one is built&nbsp;

temporary home while our new one is built 

Our chosen destination is just inside the border of Scotland, a few miles from Gretna Green. This is Dumfries and Galloway, near the Solway firth.  Those that know me might wonder why we didn't venture as far as my childhood homeland in the Highlands; but in the end, practicalities around transport, access to my work etc. had to be part of the balance.  

Nonetheless,  it's a quiet rural spot with good access to transport links, Glasgow, Edinburgh and the North of England. (Carlisle, The Lake District, Newcastle, Manchester even). In fact Dumfries and Galloway is a bit of an unsung gem of Scotland - the countryside is unspoilt and rolling, the Solway coast edges the region with some decent beaches, and life is fairly rural. This is just what we want  for baba as he grows up. 

I'm certain we'll adapt to this way of life very easily - we are not really city folk :) and we both love Scotland. And we'll certainly relish being in striking distance of Edinburgh - our favourite city - as well as within striking distance of our relatives. The clean air and soft water, the wide open spaces and quiet surroundings, the cooler weather! All part of what we consider an improvement in quality of life. 

Let the adventure begin!  

 

What's Daddy doing with that Big Orange Thing

A poem to celebrate the fascination of a toddler, before it disappears...

I want to know what's happening!

I want to know what's happening!

So there was I, cutting the grass.
And there was he, slapping the glass.
He was slightly forlorn as I paced the lawn,
Following me close with each pass

He wanted to see the machine 
Making grass look so short and so green.
Delighted to see the big bin
Where dad chucked the grass cuttings in.

On the window he slapped,
Applauded and clapped,
With a very wide grin 
He couldn't keep in.

I've never felt quite so adored 
Doing jobs where I'm usually bored.
Feelings of great fascination;
A young boy's complete admiration.

I'll enjoy this, it won't last forever;
One day daddy won't seem so clever.
So I'll take all I possibly can
Of the innocent love of wee man