Bugs General Scripting

Apple MapKit JS JWT Woes

I’m just making a quick note of these two things here, as I wasted time over them this afternoon and I can come back to remind myself next time:

  • When specifying the “origin” value in a JSON Web Token (JWT), omit the trailing slash: use http://localhost:8000 not http://localhost:8000/ or you’ll get the warning “[MapKit] Authorization token origin restriction (‘http://localhost:8000/’) may not match the page origin (‘http://localhost:8000’)” and become very confused if you don’t spot that / at the end;
  • Check the warnings console, as that’s where MapKit JS sends these useful bits of advice. If you just look at errors and logs, you’ll miss them.

That’s all, folks.


Fox Escort Duties

Around 1995, I was walking home late at night. I mean late: it would have been about four in the morning. The road I was walking up was lined on the side I was on by decaying post-industrial wasteland.

As I passed a gap in a fence, a fox nipped out and started walking alongside me. I don’t know much about foxes, but I reckon it was fairly young. It walked to heel, like a well-trained dog.

I was somewhat taken aback by having this companion join me on my journey, but it wasn’t doing me any harm. So I carried on, and it carried on walking with me. I kept glancing down at it, and it seemed to be ignoring me. But it kept pace with me.

A few hundred yards up the road, there was another gap in the fence. As we came to it, the fox paused, looked up at me, and turned off, vanishing into the darkness.

I could swear it nodded as if thanking me and bidding me adieu, but maybe I imagined that.

On reflection, I think what probably happened was that this young fox had made its way over to the territory of an older fox, that being where the foxy lady foxes were. And maybe it had stayed a bit too long, and now had to get back, but knew that the older fox was lurking, intending to punish the interloper in whatever manner cuckolded foxes do: probably with lots of biting and scratching, maybe to the death.

So it waited until a human came along, knowing that the older fox would steer clear of them; and the human that came along was me, and I gave the philanderer safe passage back to its own little patch of derelict land where a factory once had been.

And maybe it did nod at me, as it glanced up at me before diving through that hole in the fence, to thank me for seeing it safely home.

Or maybe I imagined that.


Facebook Wasn’t Hacked

Much kerfuffle because some Facebook employees’ laptops picked up a virus. Facebook have posted about it and it’s a pretty straightforward tale of some laptops picking up a virus, and the company’s IT infrastructure detecting it, and making sure it didn’t do any harm. The only real news here is that, with the in-house expertise Facebook has, they could do a much more thorough analysis of the problem than most people’s employers could ever manage, and share that knowledge with the world.

But of course this is Facebook, and Facebook-the-company exists to operate Facebook-the-website, so suddenly journalists’ eyes light up with the thought of the headline: “Facebook Hacked!”

As this rather boring incident happened last month, the journalists also see the opportunity to suggest that Facebook is somehow deceiving its users by this delay in disclosure, and that all the Important Private Data of those users (which they posted on Facebook, but whatever) is somehow at risk.

This story is about as interesting as a bank employee’s laptop getting a virus, which doesn’t cause any risk to the bank’s customers’ money; or a journalist’s computer getting a virus, which doesn’t cause any risk to the people who read his stories on the newspaper’s website.

Facebook wasn’t hacked. Any reports you read saying “Facebook Hacked!” are bullshit. Somebody’s laptop got a virus. A few other people’s laptops in the same company got the virus. That’s what viruses do, and it happens every day at thousands of companies.

The fact that the company happened to be called “Facebook” doesn’t mean “Facebook got hacked”; it means you get to hear about it. You don’t get to hear about it when it happens at your bank, or the Wall Street Journal, or the Guardian, or the New York Times. It happens at those places more often than it does at Facebook, but you’re never told about that. You’re told about it when it happens at Facebook because the journalists know that putting the words “Facebook” and “Hacked” in the same headline has a Pavlovian effect on the public which sells newspapers, or at least page views, and makes their employers money.

I say again: Facebook wasn’t hacked. Some people who work there got a virus on their laptops. That’s all. It’s not news.

If it is news, we should be told every time it happens to somebody who works for a news organisation. After all, we rely on these people for accurate information much more than we do on Facebook. (Well, I do. YMMV.)

Apple General iPad

Weird iPad Bug: Audio from Certain Apps Only Played Via Headphones

This rather obscure iPad issue has been occasionally annoying me for ages, and I finally worked it out tonight.

The problem I had was that some, but not all, apps would only play audio through the headphones, not through the internal speaker. For example, BBC iPlayer would play through either the speaker or the headphones, as would Safari and the YouTube app; but some media player apps could only be heard via the headphone socket.

Perhaps the strangest was the 4oD app, which is the TV on demand app from the British station Channel 4 (C4). This usually plays a short C4 ident, then a sponsor message, then the programme. Bizarrely, with this app, the ident could only be heard via headphones, the sponsor message could be heard via either headphones or speaker, and the programme only via headphones.

This was rather annoying, as I often prefer to watch and listen to media without putting headphones on: my hearing is already sufficiently damaged from too many years of live pub bands that I only pipe sound directly onto my eardrums when I really want to.

It turns out the problem relates to the side switch on the iPad, which can be used as either an external speaker mute button or a rotation lock.

A couple of months ago I accidentally changed the settings to make this be the mute button; I normally use it for rotation lock. It turns out that, when I changed the settings back to make it act as rotation lock, I had the physical switch itself in the mute position. It seems that, when the setting was changed back, some part of the system remembered the mute setting and was using it – but only for certain apps or even, as in the case of 4oD, for parts of certain apps.

The solution? Go to Settings, General, and in the “Use side switch to:” section, change to “Mute”. Then ensure the switch itself isn’t in the mute position: you don’t have to put it there then switch it back or anything silly like that, just be sure it’s in the right place, with the protruding part towards the top of your iPad and with no orange dot visible. Then leave the settings app and switch to one of the misbehaving media players, and you should find it now plays through the internal speaker again. Finally, return to Settings, General and switch back to Rotation Lock, assuming that’s what you want.

It may be that you can just change to Mute then back to Rotation Lock without leaving the Settings app and get the same effect, but I haven’t checked. I’m just happy to have my internal speaker working again for all apps.

And now I’ve written that up, I’m going to watch a programme about a man whose home is even more messy than mine. I may even use the headphones for this one…


A minor point concerning the Norwegian tragedy

Words are too small to express one’s feelings about the hideous slaughter in Norway. Rather than trying to address tragedy on such a scale, I shall focus on a minor point.

Anders Behring Breivik has, as I understand things at the time of writing, freely admitted responsibility for this appalling event. His lawyer has, I further understand, confirmed that he is the author of the work 2083 – A European Declaration of Independence, published online under the Anglicised name of Andrew Berwick. It seems that he has perpetrated this dreadful crime for the purpose of promoting this work.

There are certain obfuscations about the presentation of the work, which was initially circulated by email to his Facebook friends, and friends-of-friends. The most obvious are the Anglicised name and the assertion that the book was published in London, when it is actually the work of a Norwegian publishing from Oslo. I assume that these obfuscations were inserted as a way of ensuring that his identity remained secret until he chose to reveal it in the way he did.

But there is one little detail revealed by its absence. It is said that somebody who wishes to avoid drawing attention to something may reveal that wish by failing to mention that something when it would be perfectly natural to do so. Breivik seems to have succumbed to this simple psychological trap in his attempt to conceal the place of origin of his work behind the veil of England.

In his introduction he signs off (as Andrew Berwick) with the words:

With the assistance from brothers and sisters in England, France, Germany, Sweden, Austria, Italy, Spain, Finland, Belgium, the Netherlands, Denmark, the US etc.

Do you notice anything about that list of countries? With the exception of “the US” they are all European. In fact, they cover Europe from the Atlantic to the Baltic. Yet one in particular is missing; one that might be expected to appear, given that Sweden, Denmark, and Finland are all mentioned.

The only Scandinavian country not mentioned is Norway. Exactly the one you’d miss out if you were lying about where you were, and where you were was Norway.

I’m not trying to suggest anything about this other than the fact that, with hindsight, we can see a classic signal of somebody trying to conceal a truth. Breivik claims to have spent three years, at a personal cost of €317 000, in writing his work; yet for all his obvious intelligence, dedication, and cunning he was unable to avoid one of the most basic traps our own psychology lays for us: compulsively avoiding saying something that could get him into trouble, even though he would be more likely to deflect attention if he said it openly.

This is one of the ways our mothers can tell that we are lying when we are four years old, and juries can tell that we are lying when we are forty years old.

Of course, even if one of the few early recipients of Breivik’s work had noticed this anomaly, they could not have predicted the enormity of his intentions. It might have provided a momentary intellectual frisson similar to solving a crossword clue: “Ah, he’s probably Norwegian really!” But it’s not as if this knowledge would have made it possible to prevent the tragedy; we can never conceive of such enormity until after it has been perpetrated.

I only mention this as a psychological curiosity: a man so fanatically dedicated to his cause that he will plot to murder, not just by the indiscriminate method of bombing but by personally shooting children by the dozen, and can intellectually justify this to himself as necessary for promoting said cause, is nonetheless unable to lie in a document to which he has devoted three years of effort without betraying the truth by omitting the one name he knows others must not know.


What the Web is For: “Why I Am Not Worried About Japan’s Nuclear Reactors”

This is the best explanation I’ve seen so far of the circumstances surrounding the problems Japan has been experiencing at its nuclear power plants: Why I Am Not Worried About Japan’s Nuclear Reactors.

Not linking to it would be a crime in a world ruled by PageRank. If you see this and you are able to post links on the Web (hint: you are, even if it’s just via Twitter), then do so. Ignorance may be bliss, but knowledge is better.


New From Microsoft Bing: Conditional Charity

Microsoft Bing’s twitter account today posted the following bizarre message:

How you can #SupportJapan – For every retweet, @bing will give $1 to Japan quake victims, up to $100K.

So, basically, they’re saying that they can afford to give away $100,000 to help the people of Japan in the face of the appalling tragedy that has struck them – but it’s conditional upon people retweeting Bing’s message.

Presumably, if not enough people retweet, they’ll just put the rest of the money back in the office party fund.

I assume they’re paying some “Social Media Marketing Guru” to come up with stuff like this. The mind boggles.

UPDATE, 22:50: Bing have sort-of-apologised (although it sounds a bit like “We’re sorry some of you were too dumb to grasp what we meant”) and made the donation in full.

Apple Facebook General Ping Social Networking

iTunes Ping and Facebook: The Smoking Screenshot

Since Apple announced its new social networking service for iTunes, Ping, there has been speculation as to why it doesn’t integrate with Facebook.

Kara Swisher of All Things Digital asked Steve Jobs about this after the event:

…he said Apple had indeed held talks with Facebook about a variety of unspecified partnerships related to Ping, but the discussions went nowhere.

The reason, according to Jobs: Facebook wanted “onerous terms that we could not agree to.”

The plot thickened when Cult of Mac’s Giles Turnbull spotted a mention of “Connecting to your Facebook account” on the Ping page at (which is still there at the time of writing). Then Dan Frommer of Silicon Alley Insider pointed out that a mention of connecting through Facebook appeared in Steve Jobs’ demo of the Ping UI, although it doesn’t appear in the same place on the release version.

As I was having a play this evening after setting up a Ping account, I went to the “People” screen… and look what I found:

Oops! 'Connect with Facebook' message on iTunes Ping's 'People' screen
View on flickr

So it looks very much as if Apple planned Facebook integration right until the last minute, and when it was pulled they didn’t do a very good job of removing mentions of it from either the web site or the application itself.

I was astonished myself at the lack of Facebook integration: I assumed it would be a given for something like this. Presumably one of two things will happen. Either Apple and Facebook will come to a rapprochement, at which point Apple can flick a switch and enable integration of the two networks; or Steve Jobs will treat Facebook the way he’s treated Adobe over Flash. Given his track record of standing firm on such matters, those who want Ping and Facebook integration had better hope that Facebook cracks first.


Twitter 1 Daily Mail 0

Journalists copy stories from other sources all the time. In theory, they should provide attribution, but this doesn’t always happen. When they copy a story from elsewhere without checking the date of publication, this can end up making them look pretty dumb.

On BBC News’s “Most Popular” feature, it’s not uncommon for older stories to pop up from time to time. This evening, the number two spot is occupied by the “Pornographic videos flood YouTube” story from May 2009. It seems that somebody in the Daily Mail newsroom, being unable to go out and dig up some news for themselves, decided that a quick harvesting of BBC News would help while away the afternoon, for at around 16:00 BST the same story, rewritten to fit in with the Mail’s house style, appeared on their web site.

BBC web developer Jake Archibald, aka @jaffathecake, noticed this and tweeted about it. Co-incidentally, I had just seen the BBC story linked to by a user on a forum I frequent who had also failed to notice the dateline, so I immediately realised what had happened.

Being a helpful sort of chap, I went to the trouble of registering with the Daily Mail’s site and posted the comment “You do realise that the BBC News story you copied comes from May 2009?” My comment was held in a moderation queue, so I left the story open in a tab while I wasted time elsewhere.

Returning about fifteen minutes later I reloaded the tab to see if my comment had made it through moderation, only to be greeted by the message: “Sorry… The page you have requested does not exist or is no longer available.” 🙂

It’s nice to see that the Mail’s newsroom staff are sufficiently on the ball to remove the story so rapidly late on a Sunday evening. Without wishing to nitpick in the face of such efficiency, wouldn’t it be even better if they learned to check the dates on other people’s stories before re-writing them and publishing them under the byline “Daily Mail Reporter.” They could save themselves a lot of wasted effort.

UPDATE: After posting this, I had a conversation with a journalist friend who pointed out that, on a Sunday afternoon, the newsroom of a national paper is probably staffed by young people seeking a break into journalism and working for a trivial wage, as newsrooms were some years ago, when he himself was such a person. (I strongly suspect that nowadays the newsroom is staffed on a weekend by young people working as unpaid interns in the hope of getting such a break, though I may be wrong.) If such a person was responsible for this #mailfail then I hope that they will not be punished but rather be given guidance on how to avoid such errors in future; for the person truly responsible was not them, but the editor who approved its online publication without further checks.

Further update: via Martin Robbins, here’s a mirror of the Daily Mail article.

P.S. Mail developers: you should really be returning 301 Moved Permanently rather than 302 Found to redirect to your 404 error page. Even better, don’t use a client-side redirect for 404 Not Found at all.

Common sense Elsewhere... General Twitter

More Antisocial Networking

Following on from the recent brouhaha surrounding Gillian McKeith and Twitter, this weekend brings another example of how not to respond to Twitter comments in the shape of a threat of legal action against blogger Luke Bozier.

Luke tweeted his unflattering opinion of ex-Prime Minister Gordon Brown’s new web site, and also posted more detailed criticism of Tangent One, who are apparently responsible for the site, on his blog.

Shortly afterwards, he received the following message from somebody describing themselves as executive director of Tangent Communications plc, parent company of Tangent One:

I respectfully suggest you delete that tweet, issue no more similar ones and generally try to sell your products in a more professional way. I really don’t like the prospect of either a public slanting match or legal action, but if I need to protect my company’s business and reputation, I will.

This has resulted in Jack of Kent (aka legal eagle David Allen Green) repeatedly re-tweeting the original tweet and promoting the hashtag #OffTangent, which is now trending nicely in the UK.

Assuming the threat received by Luke Bozier is real, one has to wonder at a digital agency whose response to online criticism is to immediately reach for the threat of legal action.

If they had chosen to ignore Luke’s tweet, it would have been seen by those of his 1,000-plus followers who regularly check Twitter, and perhaps passed along by some of them. The overall effect would almost certainly have been negligible.

Instead they came out blustering and, just as happened with the @gillianmckeith account the other week, have whipped up a storm of virtual criticism.

I’m not sure these people really get how this “social web” thing works 😉