big brother Is watching … but doing it so, so badly

I followed a link to an article on Forbes’ web site1.  After a few moments the computer fan started to spin like a merry-go-round and the page, and the browser in general became virtually unresponsive.

I copied the url, closed the browser tab (Firefox) and pasted the link into Chrome, as Chrome is often billed for its stability and resilience to badly behaving web pages.  After a  few moments the same thing happened, roaring fan, and, when I peeked at the Activity Monitor, Chrome was eating more than a core worth of the machine’s CPU.

I dug a little deeper and peeked at the web inspector.  Network activity was haywire hundreds and hundreds of downloads, most were small, some just a  few hundred bytes, others a few Kb, but loads of them.  I watched mesmerised.  Eventually it began to level off after about 10 minutes when the total number of downloads was nearing 1700 and 8Mb total download.


It is clear that the majority of these are ‘beacons’, ‘web bugs’, ‘trackers’, tiny single pixel images used by various advertising, trend analysis and web analytics companies.  The early beacons were simple gifs, so would download once and simply tell the company what page you were on, and hence using this to tune future advertising, etc.

However, rather than simply images that download once, clearly many of the current beacons are small scripts that then go on to download larger scripts.  The scripts they download then periodically poll back to the server.  Not only can they tell their originating server that you visited the page, but also how long you stayed there.  The last url on the screenshot above is one of these report backs rather than the initial download; notice it telling the server what the url of the current page is.

Some years ago I recall seeing a graphic showing how many of these beacons common ‘quality’ sites contained – note this is Forbes.  I recall several had between one and two hundred on a single page.  I’m not sure the actual count here as each beacon seems to create very many hits, but certainly enough to create 1700 downloads in 10 minutes.  The chief culprits, in terms of volume, seemed to be two companies I’d not heard of before SimpleReach2 and Realtime3, but I also saw Google, Doubleclick and others.

While I was not surprised that these existed, the sheer volume of activity did shock me, consuming more bandwidth than the original web page – no wonder your data allowance disappears so fast on a mobile!

In addition the size of the JavaScript downloads suggests that there are doing more than merely report “page active”, I’m guessing tracking scroll location, mouse movement, hover time … enough to eat a whole core of CPU.

I left the browser window and when I returned, around an hour later, the activity had slowed down, and only a couple of the sites were still actively polling.  The total bandwidth had climbed another 700Kb, so around 10Kb/minute – again think about mobile data allowance, this is a web page that is just sitting there.

When I peeked at the activity monitor Chrome had three highly active processes, between them consuming 2 cores worth of CPU!  Again all on a web page that is just sitting there.  Not only are these web beacons spying on your every move, but they are badly written to boot, costuming vast amounts of CPU when there is nothing happening.

I tried to scroll the page and then, surprise, surprise:

So, I will avoid links to Forbes in future, not because I respect my privacy; I already know I am tracked and tracked; who needed Snowdon to tell you that?  I won’t go because the beacons make the site unusable.

I’m guessing this is partly because the network here on Tiree is slow.  It does not take 10 minutes to download 8Mb, but the vast numbers of small requests interact badly with the network characteristics.  However, this is merely exposing what would otherwise be hidden: the vast ratio between useful web page and tracking software, and just how badly written the latter is.

Come on Forbes, if you are going to allow spies to pay to use your web site, at least ask them to employ some competent coders.

  1. The page I was after was this one, but I’d guess any news page would be the same.[back]

A sleepless night; do you have a b**ping mobile phone?

There are many reasons to swear at your mobile phone.  I’ll talk about just one.

I have just had a sleepless night.

I was staying in an Oban hotel and needed to get up at 5:45am for the Tiree ferry.  I went to bed early, but not too early, intending to get a good night’s sleep before the early start.  But I seemed to spend the entre night tossing and turning.  In fact there will have been moments of sleep in between, but it felt like I was always wide awake, not even drowsy.

It was only in the morning that i realised the reason, one I should have thought of the night before.

My phone is a beeper.

Maybe you have never had one, but if you have you know exactly what I mean.

I have two phones, an iPhone (which I will return to later) and a Samsung ACE Android.  I usually use the alarm on the iPhone, but last night, knowing it was important I did not oversleep, I set the alarm on both.  Maybe it was just late and after a three week trip away from home, simply tired, but I forgot …

… my Android phone is a beeper.

Maybe all Androids are, or maybe all Androids with a particular version of the operating system, or maybe just the Samsung ACE, but certainly mine is.  It is why I normally have it switched off at night.

Is your phone?

At random moments, without rhyme or reason it just beeps: little chirrups, very jolly sounding, but often utterly incomprehensible.  Some I understand: a message has arrived, the power has been connected, it is fully charged and wants to be disconnected.  But other times, I hear the beep, look at the phone, and there is no apparent explanation.

Of course in the night the beeps wake you up, but as they are short, you don’t realise why yo are awoken.  I should have remembered, It is not the first time I have had a beeping phone.

My first awareness of beepers was nearly ten years ago.  For a period of nearly two years I had continuous insomnia.  I would go to sleep, but I would wake nearly (in retrospect probably exactly) every hour.  One day I was at a hotel and something else must have woken me and before I fell back to sleep I heard a beep.

I think I had a Sony-Erikson phone at the time, and when it was fully charged it beeped.  If you ignored the beep it would wait an hour and then beep again, and again, and again. In the daytime I had hardly noticed the habit, but in the night it woke me, but of course I had never realised what had woken me, until that moment. The next night I turned off the phone and used a separate alarm clock.  For the first time in two years I slept through the night.

Walk around your house at night: it is now rarely dark, every device has an LED some, continuous, some flashing; indoor light pollution.  Have you, like me, sometimes had to cover a laptop with a T-shirt to stop its flashing keeping you awake?  Less obvious are the various beeps, buzzes, and chirrups.  Some are loud, long and insistent, the ring of a phone, or loud ding of a microwave when ready.  Others are short and sharp, deliberately low-key so as to remind, but not annoy.  In our house the tumble drier gives a small periodic beep to remind you that the programme has finished.

During the day time these are just part of the backdrop of life, indeed if you live in town they may well be drowned by the background drum of distant traffic.

However, if you find yourself unaccountable waking at night, seek out the audio polluters of your home.

Because these reminder sounds are short, you never know what woke you, but like any unexpected sound in the night, they hit your deepest startle responses and leave you suddenly, unaccountably, wide awake.

Of course, the phone knows the time of day – that is why I used it as an alarm – so why not mute the less critical sounds during the night.  And yes, I have tried lots of settings to quieten it, but some, particularly power-related beeps, seem insensitive to my attempts to silence them.  And of course I do not want to silence the potential emergency phone call in the night, just the inconsequential reminders.

Of course, if the phone does insist on beeping at least it could have some sort of notice to say why!

It is not just these notification beeps that can cause problems.  IT systems, and phones in particular, seem remarkably time insensitive.

My first mobile phone was on Orange, supplied by my university when I was an Associate Dean and part of ‘management’.  Orange specially modify their phones, so that, even on early phones, you got visible indications of phone messages.  Furthermore, if someone rang you and left a message while you were on the phone or temporarily out of signal, you would get a call back from the answering service as soon as you were available.

Later, when I had a phone of my own, it was Vodafone.  Vodafone’s answering service on their mobile network appears to be completely separated from the actual phone system.  There is some sort of ‘redirect on busy’ that takes you through to the separate system, but, unlike Orange, it has no way of knowing when you are next available.

Now-a-days it seems to only text you, but, maybe because the service started before text messaging was common, the early versions worked by ringing you back.  However, being unaware of your availability, it simply rang you back at increasing intervals: first of all immediately the message had been left, then a few minutes later, then a slightly longer gap, until eventually it would give up for several hours before trying again.

You can probably already imagine the story.  It was quite common to have long phone conversations with family members late at night, maybe at 10:30 or 11pm for an hour.  During that time someone else would try to ring and leave a message.  The answering service would try to ring, but of course we would still be on the phone, then a minute later, five minutes, ten, twenty minutes, but we were still on the phone.  Eventually it would give up and wait two or three hours.  At 2am when we were fast asleep the phone would ring.  Thinking it was a dire emergency, we would leap out of bed, only to find a short message saying, “sorry to miss you, will try again tomorrow”.

How difficult would it have been to alter these timings at night?

I said I used the iPhone as my normal alarm.  It does make the occasional incomprehensible beep, but usually only just after you have been using it.  I assume these are due to some operation started by your interactions completing, maybe mail arriving, but I can never tell.  Just as on the Android, would it be too much to ask, even if only as a UI guideline, that every audible notification has  a clear visible explanation as well?

However, on the whole it is a silent sleeping partner.

Well, with an exception.

I have iCal connected between phone and laptop and also to my Google mail.  The default import seemed to set both the Google events and events received by email as ICS attachments to have a 10 minute notification.  Although I didn’t necessarily always want this, it was not a big problem.  Except for all-day events.  These are recorded specially on both platforms and iCal certainly knew they were day events.  An example might be that a conference was on.

We now come to what the telecoms industry calls a ‘feature interaction‘ problem.

Although iCal knew it was an ‘all-day’ event, for notification purposes it treated the event as if it was a timed event from midnight to midnight.  So at 11:50pm, the night before the start of an event, a notification (with associated beep!) would sound on the phone.  I rarely go to bed before midnight, so this was not usually a big problem, except when travelling abroad.  In Italy this is at 12:50am, in Greece 1:50am.

When I first noticed the problem, I was back to turning off the phone and using an alarm clock.

I tried to simply turn off the notifications, but here I hit another feature interaction problem …. except here the ‘feature’ that caused it was equally incomprehensible.

When an event comes in via email, iCal regards it as in some way ‘not your own’ and (on the laptop version) you cannot edit it, only delete it.  The event is not live linked, it is merely a copy, so I can understand in some way marking it as edited, but why prevent you from editing it?  For example, if I have had an email notification of a meeting and then a call to say the meeting has moved, I can only delete the original (with its associated notes, distribution list, etc.), and create a new one.

Some years ago a colleague sent an invite to a regular Thursday meeting.  When the meetings stopped, he sent a cancellation.  iCal associated the two, and so the meeting stayed in my diary, but ‘crossed out’.  Years later my diary still had this regular meeting, but I was worried about deleting it (the only action available), for fear of loosing the old meetings that had actually happened and might have important information attached.

Enough time has passed and I just tried.  Sure enough it did delete all copies of the meeting past and future, with no dialogue to ask or confirm.  Furthermore, (a) the action was not undoable and (b) a few moments later, I got the following error message.

Oh dear!

So far, so bad, but, on the iPhone, iCal not only does not allow you to edit these ‘foreign’ events, but you cannot even delete them.  So, even when I can see that an event will wake me in the middle of the night I cannot get rid of it except from my laptop.

While I still cannot delete these events from the phone, at some stage I have managed to find the right setting so that the notifications do not come in the early morning, so now the iPhone is usable at night.

So let’s summarise design lessons from this:

  1. do treat all notifications with care, are they necessary, when are they likely to be useful
  2. if you deliver an ephemeral sound notification, do make sure there is some visible indicator of what it was about
  3. whether and when you produce notifications, or any behaviour, they should be sensitive to time of day
  4. try to be aware of feature interactions – but I know this is hard
  5. do not create Fascist systems (Apple that includes you) – it is my device and my data.  Surely retain some marker or indication that I have edited things that originated elsewhere, but if it is on my machine I decide what can and cannot be edited or deleted.

That’s all for now; I need to catch up on some sleep …

India and APCHI

I am sitting in the Crowne Plaza hotel in Bangelore looking down over the city spreading seemingly endlessly as far as I can see.  Here, out in the suburbs and in the heart of Electronics City, the Hi-Tech enclave, the view is a mix of green trees, concrete offices and small apartment blocks in a pastel palette of lime greens, mauve tinted blues and burnt umber.  There is an absence of yellow and red apart from the girder work of a partly constructed building and airline-warning red and white mobile antennae tower; maybe these are inauspicious colours.  A major highway and the raised highway cut across the view and the airport is presumably far out of site in the afternoon heat haze, it was a near two hour ride away on Wednesday when I arrived in the midst of rush hour, but hoping it is a shorter journey tomorrow morning when I need to catch 6am flight.

I’ve had a wonderful time here seeing many old faces from previous visits to India a few years ago, and also meeting new people.  It was especially great to see Fariza as I hadn’t realised she was going to be here from Malaysia.  It was also wonderful seeing Dhaval and spending time with his family after the end of the conference yesterday, and today reading some of his recent work at ABB on bug reproduction in software maintenance.

Seeing Dhaval’s work and talking to him about it reminded me of the debugging lectures I did some years ago as part of a first year software engineering module.  For many years I have been meaning to extend these to make a small book on debugging.  It is one of those areas, like creativity, where people often feel you either have it or not, or at bets can pick up the skills one time.  However, I feel there is a lot you can explicitly teach about each.

Yesterday was my closing keynote at APCHI 2013.  I’ve put the slides and abstract online and I am working on full notes of the talk.  It felt odd at times talking about some the the issues of rural connectivity and poverty raise by my walk around Wales given the far greater extremes here in India.  However, if anything, this makes the messages for both public policy and design more important.

As I talked both in the keynote and one-to-one with people during the conference, I was constantly returning to some of the ways that in the UK we seem to be throwing away many of the positive advances of the 20th century: the resurgence of rickets and scurvy amongst poor children, the planned privatisation of the Royal Mail, one of the key enablers of the 19th century commercial revolution, and most sad of all the depraved demonisation of the poor that is rife in politics and the media.

There were many interesting papers and posters.  Two demos particularly caught my eye as they represented different aspects of the link between physical and digital worlds, issues that Steve, Devina, Jo and I have been exploring in TouchIT and the Physicality workshop series.  One was a system that augments paper textbooks with electronic resources using a combination of computer vision (to recognise pages in the book) and semantic extraction (for example getting historical timelines from Wikipedia). The other was  a physical ‘drop box’, where you put papers into a slot and then they were copied as images into your DropBox account.  It made me think of the major scan and bin exercise I did a few years ago drastically reducing my piles of old papers.

However, the high spot of the conference for me was Ravi Poovaiah‘s keynote “Designing for the next billion” on Thursday about design for the ‘middle of the pyramid’, those who are out of abject poverty and therefore have access to basic IT and so the design community can do most about.  This does not reduce the needs of those at the ‘bottom of the pyramid’, for whom basic education and healthcare are the most immediate needs.

In the UK not only are the extremes less, few except the homeless would qualify as ‘bottom of the pyramid’, but also they tend to be more segregated. Here a modern glass fronted international retail chain can sit next to a semi-derilict (to western eyes) motorbike repair shop, with used tyres piled on the pavement.  This said, to my mind, with my aesthetic of decay that is maybe the privilege of those who do not have to live it, the latter is far more engaging.  One of India’s challenges is whether it can move through its economic explosion without the attendant dissolution of local identity, culture and family that is the legacy of the industrial revolution in the UK.


CHI Academy … a Faustian bargain?

I am on a short excursion from walking Wales to CHI 2013 in Paris.

Last night I was inducted into the SIGCHI Academy. No great fanfares or anything, just a select dinner and a short ceremony. I thought Gerrit, who is current SIGCHI chair would look good with a sword dubbing each person, but instead just a plaque, a handshake and a photo or two by Ben Shniederman, amanuensis of CHI.

I feel in two minds. On the one hand there are many lovely people in CHI community, and I spent a great afternoon and evening chatting to folk including Phillipe Palanque, Mary Czerwinsky and Hiroshi Ishii over dinner. However, ACM and to some extent SIGCHI often appear like the Star Wars imperial forces, intent on global domination.

The CEO of ACM did little to dispel this at the opening ceremony this morning.  He spoke of ACM’s international aspirations and praised CHI for regularly having its conferences outside of the US.

Now ACM is the de facto international computing organisation and CHI is the de facto international conference in human–computer interaction, but by virtue of the fact that they are the US ones.  In principle, IFIP and Interact are the international computing organisation and HCI conference respectively, as IFIP is the UNESCO founded body of which ACM and other national computing bodies, such as the BCS in the UK, are members.  Interact, the HCI conference sponsored by IFIP is truly international being held in numerous countries over the years (but I think never yet the US!); in contrast having approximately two out of three conferences in the US is laudable, but hardly the sign of a truly international organisation.

So, is the ACM an originally US organisation that is in the process of slowly becoming truly international, or is it part of more general US cultural domination?  Although probably neither are completely accurate, at present there seems to be significant aspects of the latter under the guise of the former.  In a way this is, in microcosm, an image of the same difficult relationship between USA and UN in other areas of international affairs.

And by joining the SIGCI Academy am I increasing the European presence in CHI and thus part of the process to make it truly international, or selling my academic soul in a Faustian bargain?

more on disappearing scrollbars

I recently wrote about problems with a slightly too smart scroll bar, and Google periodically change something in Gmail which means you have to horizontally scroll the page to get hook of the vertical scroll bar.

I just came across another beautiful (read terrible) example today.

I was looking at the “Learning Curve“, a bogspot blog, so presumably using a blogspot theme option.  On the right hand side was funky pull-out navigation (below left), but unfortunately, look what it does to the scroll bar (below right)!


This is an example of the ‘inaccessible scrollbar’ that I mention in “CSS considered harmful“, and I explain there the reason it arises.

The amazing thing is that this fails equally across all (MacOS) browsers: Safari, Firefox, Chrome, yet must be a standard blogspot feature.

One last vignette: as I looked at the above screen shots I realised that in fact there is a 1 pixel part of the scroll handle still visible to the left of the pull-out navigation.  I went back to the web page and tried to select it … unfortunately, I guess to make a larger and easier to select the ‘hot area’, as you move your mouse towards the scroll bar, the pull-out pops out … so that the one pixel of scrollbar tantalises, but is unselectable 🙁

Action Research in HCI

Recently Daniel Tetteroo asked if I knew about publications in HCI, prompted partly by the fact that I have described my Wales walk next year as a form of action research.

I realised that all my associations with the term were in information science rather than HCI, and other non-computer disciplines such as education and medicine. I also realised that the “don’t design for yourself” guidance, which was originally about taking a user-centred rather than technologist-centred approach, makes action research ideologically inimical to many.

I posted a question to Twitter, Facebook and the exec mailing list of Interaction yesterday and got a wonderful set of responses.

Here are some of the pointers in the replies (and no, I have not read them all overnight!):

Many thanks to the following for responses, suggestions and comments: Michael Massimi, Nathan Matias, Charlie DeTar, Gilbert Cockton, Russell Beale, David England, Dianne Murray, Jon Rogers, Ramesh Ramloll, Maria Wolters, Alan Chamberlain, Beki Grinter, Susan Dray, Daniel Cunliffe, and any others if I have missed you!

details matter: infinite scrolling and feature interaction

Many sites now dynamically add content to a page as you scroll down; this includes both Facebook and Twitter feeds, which add content as you get near the bottom.  In many ways this is a good thing, if users have to click to get to another page, they often never bother1.  However there can be unfortunate side effects … sometimes making sites un-navigable on certain devices.  There are particular problems on MacOS, due to the removal of scrollbar arrows, a usability disaster anyway, but confounded by feature interactions with other effects.

A recent example was when I visited the SimoleonSense blog in order to find an article corresponding to an image about human sensory illusions.  The image had been shared in Facebook, and I found, when I tried to search for it, also widely pinned in Pinterst, but the Facebook shares only linked back to the image url and Pinterst to the overall site (why some artists hate Pintrest).  However, I wanted to find the actual post on the site that mentioned the image.

Happily, the image url,, made it clear that it was a WordPress blog and the image had been uploaded in February 2009, so I edited the url to and started to browse.  The site is a basically a weekly digest and so the page returned was already long.  I must have missed it on my first scan down, so I hit the bottom of the page, it dynamically added more content, and I continued to scroll.  Before long the scrollbar handle looked very small, and the page very big and every time I tried to scroll up and down the page appeared to go crazy, randomly scrolling anywhere, but not where I wanted.

It took me a while to realise that the problem was that the scrollbar had been ‘enhanced’ by the website (using the WordPress infinite scroll plugin), which not only added infinite scrolling, but also ‘smart scrolling’, where a click on the scrollbar makes an animated jump to that location on the scrollbar.  Now many early scrollbars worked in this way, and the ‘smart scroll’ options is inspired by the fact that Apple rediscovered this in iOS for touch screen interaction.  The method gives rapid interaction, especially if the scrollbar is augmented by ‘tips’ on the scrollbar (see the jQuery smartscroll demo page).

Unfortunately, this is different from the Mac normal behaviour when you click above or below the handle on a scrollbar, which effectively does screen up/down.  So, I was trying to navigate up/down the web page a screen at a time to find the relevant post, and not caring where I clicked above the scroll handle, hence the apparently random movements.

This was compounded by two things.  The first is a slight bug in the scrolling extension which means that sometimes it doesn’t notice your mouse release and starts scrolling the page as you move your mouse around.  This is a bug I’ve seen in scrolling systems for many years, not taking into account all the combinations of mouse down/up, enter/leave region etc., and is present even in Google maps.

The second compounding factor is that since MacOS got rid of the scrollbar arrows (why? Why? WHY?!!), this is now the only way to reliably do small up/down movements if you don’t have a scroll wheel mouse or similar.

Now, in fact, my Air has a trackpad and I think Apple assumes you will use this for scrolling, but I have single-finger ‘Tap to click’ turned off to prevent accidental selections, and (I assume due to a persistent bug) this turns off the two finger scrolling gesture as well (even though it is shown as on in the preferences), so no scrolling from the touchpad.

Since near the beginning of my career I have been fascinated by these fine design decisions and have written previously about scrollbars, buttons, etc.  They are often overlooked as they form part of the backdrop to more significant applications and information.  However, the very fact that they are the persistent backdrop of interaction makes their fluid usability crucial, like the many mundane services, buses, rubbish collection, etc., that make cities work, but are often unseen and unnoticed until they fail.

Also note that this failure was not due to any single feature or bug, but the way these work together what the telephony industry originally named ‘feature interaction‘, but common across all technological systems  There is no easy fix, apart from (i) thinking of all possible scenarios (reach for your formal methods in HCI!) and (ii) testing across different devices.  And certainly (Apple please listen!) if it ain’t broke, don’t fix it.

Happily, I did manage to find the post in the end (I forget how, maybe random clicking) and it is “5 Ways To Hack Your Brain“.  The individual post page has no dynamic additions, so is only two screens big on my display (phew), but still scrolled all over the place as I tried to select the page title to paste above!

  1. To my mind, early web guidance, was always wrong about this as it usually suggested making pages fit a screen to improve download speed, whereas my feeling, when using a slow connection, was it was usually better to wait a little longer for one big screen (you were going to have to wait anyway!) and then be able to scroll up and down quickly.[back]

First version of Tiree Mobile Archive app goes live at Wave Classic

The first release version of the Tiree Mobile Archive app (see “Tiree Going Mobile“) is seeing real use this coming week at the Tiree Wave Classic. As well as historical information, and parts customised for the wind-surfers, it already embodies some interesting design features including the use of a local map  There’s a lot of work to do before the full launch next March, but it is an important step.

The mini-site for this Wave Classic version has a simulator, so you can see what it is like online, or download to your mobile … although GPS tracking only works when you are on Tiree 😉

Currently it still has only a small proportion of the archive material from An Iodhlann so still to come are some of the issues of volume that will surely emerge as more of the data comes into the app.

Of course those coming for the Wave Classic will be more interested in the sea than local history, so we have deliberately included features relevant to them, Twitter and news feeds from the Wave Classic site and also pertinent tourist info (beaches, campsites and places to eat … and drink!).  This will still be true for the final version of the app when it is released in the sprint — visitors come for a variety of reasons, so we need to offer a broad experience, without overlapping too much with a more tourism focused app that is due to be created for the island in another project.

One crucial feature of the app is the use of local maps.  The booklet for the wave classic (below left) uses the Discover Tiree tourist map, designed by Colin Woodcock and used on the island community website and various island information leaflets.  The online map (below right) uses the same base layer.  The map deliberately uses this rather than the OS or Google maps (although final version will swop to OS for most detailed views) as this wll be familiar as they move between paper leaflets and the interactive map.


In “from place to PLACE“, a collection developed as part of Common Ground‘s ‘Parish Maps‘ project in the 1990s, Barbara Bender writes about the way:

“Post-Renaissance maps cover the surface of the world with an homogeneous Cartesian grip”

Local maps have their own logic not driven by satellite imagery, or military cartography1; they emphasise certain features, de-emphasise others, and are driven spatially less by the compass and ruler and more by the way things feel ‘on the ground’.  These issues of space and mapping have been an interest for many years2, so both here and in my walk around Wales next year I will be aiming to ‘reclaim the local map within technological space’.

In fact, the Discover Tiree map, while stylised and deliberately not including roads that are not suitable for tourists, is very close to a ‘standard map’ in shape, albeit at a slightly different angle to OS maps as it is oriented3 to true North whereas OS maps are oriented to ‘Grid North’ (the problems of representing a round earth on flat sheets!).  In the future I’d like us to be able to deal with more interpretative maps, such as the mural map found on the outside of MacLeod’s shop. Or even the map of Cardigan knitted onto a Cardigan knitted as part of the 900 year anniversary of the town.


Technically this is put together as an HTML5 site to be cross-platform,, but … well let’s say some tweaks needed4.  Later on we’ll look to wrapping this in PhoneGap or one of the other HTML5-to-native frameworks, but for the time being once you have bookmarked to the home page on iOS looks pretty much like an app – on Android a little less so, but still easy access … and crucially works off-line — Tiree not known for high availability of mobile signal!

  1. The ‘ordnance‘ in ‘Ordnance Survey‘ was originally about things that go bang![back]
  2. For example, see “Welsh Mathematician walks in Cyberspace” and  “Paths and Patches – patterns of geognosy and gnosis”.[back]
  3. A lovely word, originally means to face East as early Mappa Mundi were all arranged with the East at the top.[back]
  4. There’s a story, going cross browser on mobile platform reminds me so much of desktop web design 10 years ago, on the whole iOS Safari behave pretty much like desktop ones, but Android is a law unto itself!.[back]

Death by design

Wonderful image and set of slides describing some of the reasons multitasking is a myth and how the interfaces we design may be literally killing people (during a mobile outage in Dubai cat accidents dropped by 20%).

Thanks to Ian Sommervile for sharing this on twitter.

Offline HTML5, Chrome, and infinite regress

I am using HTML5’s offline mode as part of the Tiree Mobile Archive project.

This is, in principle, a lovely way of creating web sites that behave pretty much like native apps on mobile devices.  However, things, as you can guess, do not always go as smoothly as the press releases and blogs suggest!

PhotobucketSome time I must write at length on various useful lessons, but, for now, just one – the potential for an endless cycle of caches, rather like Jörmungandr, the Norse world serpent, that wraps around the world swallowing its own tail.

My problem started when I had a file (which I will call ‘shared.prob’ below, but was actually ‘place_data.js’), which I had updated on the web server, but kept showing an old version on Chrome no matter how many times I hit refresh and even after I went to the history settings and asked chrome to empty its cache.

I eventually got to the bottom of this and it turned out to be this Jörmungandr, cache-eats-cache, problem (browser bug!), but I should start at the beginning …

To make a web site work off-line in HTML5 you simply include a link to an application cache manifest file in the main file’s <html> tag.  The browser then pre-loads all of the files mentioned in the manifest to create the application cache (appCache for short). The site is then viewable off-line.  If this is combined with off-line storage using the built-in SQLite database, you can have highly functional applications, which can sync to central services using AJAX when connected.

Of course sometimes you have updated files in the site and you would like browsers to pick up the new version.  To do this you simply update the files, but then also update the manifest file in some way (often updating a version number or date in a comment).  The browser periodically checks the manifest file when it is next connected (or at least some browsers check themselves, for some you need to add Javascript code to do it), and then when it notices the manifest has changed it invalidates the appCache and rechecks all the files mentioned in the manifest, downloading the new versions.

Great, your web site becomes an off-line app and gets automatically updated 🙂

Of course as you work on your site you are likely to end up with different versions of it.  Each version has its own main html file and manifest giving a different appCache for each.  This is fine, you can update the versions separately, and then invalidate just the one you updated – particularly useful if you want a frozen release version and a development version.

Of course there may be some files, for example icons and images, that are relatively static between versions, so you end up having both manifest files mentioning the same file.  This is fine so long as the file never changes, but, if you ever do update that shared file, things get very odd indeed!

I will describe Chrome’s behaviour as it seems particularly ‘aggressive’ at caching, maybe because Google are trying to make their own web apps more efficient.

First you update the shared file (let’s call it shared.prob), then invalidate the two manifest files by updating them.

Next time you visit the site for appCache_1 Chrome notices that manifest_1 has been invalidated, so decides to check whether the files in the manifest need updating. When it gets to shared.prob it is about to go to the web to check it, then notices it is in appCache_2 – so uses that (old version).

Now it has the old version in appCache_1, but thinks it is up-to-date.

Next you visit the site associated with appCache_2, it notices manifest_2 is invalidated, checks files … and, you guessed it, when it gets to shared.prob, it takes the same old version from appCacche_1 🙁 🙁

They seem to keep playing catch like that for ever!

The only way out is to navigate to the pseudo-url ‘chrome://appcache-internals/’, which lets you remove caches entirely … wonderful.

But don’t know if there is an equivalent to this on Android browser as it certainly seems to have odd caching behaviour, but does seem to ‘sort itself out’ after a time!  Other browsers seem to temporarily have problems like this, but a few forced refreshes seems to work!

For future versions I plan to use some Apache ‘Rewrite’ rules to make it look to the browser that the shared files are in fact to completely different files:

RewriteRule  ^version_3/shared/(.*)$   /shared_place/$1 [L]

To be fair the cache cycle more of a problem during development rather than deployment, but still … so confusing.

Useful sites:

These are some sites I found useful for the application cache, but none sorted everything … and none mentioned Chrome’s infinite cache cycle!

    The W3C specification – of course this tell you how appCache is supposed to work, not necessarily what it does on actual browsers!
    It is called “A Beginner’s Guide to using the Application Cache”, but is actually pretty complete.
    Really useful quick reference, but:  “FACT: Any changes made to the manifest file will cause the browser to update the application cache.” – don’t you believe it!  For some browsers (Chrome, Android) you have to add your own checks in the code (See “Updating the cache” section in “A Beginner’s Guide …”).).
    Wonderful on-line manifest file validator checks both syntax and also whether all the referenced files download OK.  Of course it cannot tell whether you have included all the files you need to.