Monthly Archives: October, 2014

To Siri, with love

Judith Newman’s delightful article in the NYT describes how Apple’s speech-recognition software is helping her autistic son to communicate.

If only gay sex caused global warming…

I’ve often quoted the statistic that, on 11 Sept 2001, about 3,000 people died in terrorist attacks, and, on the same day, about ten times that many died of starvation. Our brains find it hard to respond appropriately to such data.

There’s a very nice LA Times article by Daniel Gilbert, a Harvard psychology professor, talking about the same issue with respect to climate change. It was published… ahem… 8 years ago, but was just brought to my attention by Ian Yorston.

Extract:

That’s why we worry more about anthrax (with an annual death toll of roughly zero) than influenza (with an annual death toll of a quarter-million to a half-million people). Influenza is a natural accident, anthrax is an intentional action, and the smallest action captures our attention in a way that the largest accident doesn’t. If two airplanes had been hit by lightning and crashed into a New York skyscraper, few of us would be able to name the date on which it happened.

Global warming isn’t trying to kill us, and that’s a shame. If climate change had been visited on us by a brutal dictator or an evil empire, the war on warming would be this nation’s top priority.

An enjoyable read.

Experimenting with Bower and Flask

This is another of those “just in case you’re Googling for it” posts…

Background:

  • Flask is a nice lightweight Python web framework – a handy way to create small web apps when you don’t need the power of something like Django.
  • Bower is a package manager for web components – a really easy way to get the latest versions of jQuery, bootstrap and anything else you might want.

Bower will put the packages into a folder called bower_components, with the idea that your deployment process will use something like Grunt to move the static bits from there into their final location. This is all well and good, but it seems like overkill if you’re just experimenting on your own machine.

Wouldn’t it be nice if Bower could just put the packages somewhere that they could be served directly as static files by Flask?

Well, it turns out that it can. If you create a file in the top level of your app called .bowerrc containing the following:

{
   "directory" : "static/bower_components"
}

then Bower will put its components in a subdirectory of the static folder and Flask then knows how to serve them up. You might do:

bower install jquery
bower install bootstrap

and then in your HTML you could use something like the following:

<link rel="stylesheet"
    href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css" />

and for the Javascript:

<script src="/static/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>

You could leave out the bower_components bit at each stage and make your URLs even tidier, but I felt it was still useful to separate those bits that were being managed by Bower from those that weren’t.

Hope that helps someone!

The march of progress

progress

One of the things that has always been a challenge for developers is the ‘progress bar’. It can be very difficult to predict in advance just how long something is going to take: you work it out for, say, a typical operating system update on the typical machine and then you find that some users have 100,000 things in their Trash, or are in the midst of a backup to a slow external drive, or whatever…

Installing Mac OS X Yosemite this morning, the progress bar sat at ‘About one minute remaining’ for well over half an hour, so I went and did some Googling and found that I was not alone – many people waited much longer than that, but it always completed in the end. Of course, like a watched pot, it will never get there if you’re sitting waiting for it, so you have to go and do something else. Usually, it is just a mild annoyance for impatient enthusiasts like me, but occasionally it can be a more serious problem if you’re told something will take 30 mins, for example, and you therefore assume you can do it before your appointment in an hour’s time.

Anyway, watching the slowly-progressing pixels gave me an idea…

There are tens of millions of people who will be going through this process over the next few months: surely you could improve the accuracy of their progress bars by uploading the timing information at the end of each installation, along with basic information about the system and then using that to give more accurate estimates to those with similar machines, similar disk usage, etc?

Why Privacy Matters

By nature, I’m somebody who probably errs on the side of openness rather than paranoia when it comes to privacy. I’m also very aware of how fortunate I am, though, to live in a country and under a government and legal system where I can afford to take this view.

Glenn Greenwald’s excellent TED talk gives some other reasons for caring about privacy.

http://www.ted.com/talks/view/lang/eng/id/2106

Direct link

There is, though, I think, a balance to be struck here; it’s also worth mentioning that complete privacy and anonymity doesn’t always bring out the best in human nature. There’s a reason why people wear hoodies, and there’s a reason why newsgroups that allow anonymous posting are often filled with trolls (at best), and vicious bullies (at worst). It is important that many of our activities are subject to some peer review, at least, if not legal or governmental review. Also, investigative journalists, of course, tend to assume that they and their commercial backers are somehow entitled to monitor people’s private activities, where other commercial interests or democratically-elected governments are not. Overall, though, I think he’s on the right track.

He also hints at something I hadn’t previously considered: that my religious upbringing might make me more accepting of constant invisible surveillance than I might otherwise be! Now, getting some real statistics on that would be an interesting sociological study…

Social Commentary

I hadn’t come across Kate Reddy before, but they interviewed Allison Pearson, her creator, on Radio 4 this morning, about her return to the Telegraph. The piece is, I think, quite splendid.

Now I know what I’ve been missing by not being a parent.

Tilly! Tilly! Put that camera down! Drop it! DROP IT!

Crystal showers from Matki

Update: I’ve had a phone call from one of the directors of Matki – see the end of the post.

In the small hours of yesterday morning, one of the curved panels of our expensive and otherwise perfectly-adequate Matki shower enclosure exploded.

20141009-06430607-600

Most of the glass ended up on the floor; in fact, I first knew something was amiss when I couldn’t open the bathroom door because of the glass fragments jammed underneath it. My first thought was ‘Who broke a windscreen in my bathroom?’

20141009-06433909-600

But I use the word ‘exploded’ advisedly, because it clearly didn’t just collapse. Some of the glass was flung further afield.

20141009-07033215-600

There were even some pieces in the toilet pan, which has no direct line-of-sight from the original panel, so I guess they must have been thrown against the opposite wall with sufficient force to have bounced off and back across the (admittedly small) room into the loo.

All of which makes me wonder what this would have been like had anyone been in the room, or in the shower, at the time.

The shower was installed just under a year ago by a careful and seasoned professional, according to the included instructions, and has had nothing but normal use since then. So I called Matki, assuming that it would be replaced immediately under guarantee with profound apologies and that they’d send someone round to sort it out promptly. After all, they might have had a rather nasty law suit on their hands if someone had been blinded by flying glass.

However, I forgot two things – firstly that we’re in Britain, where such gestures are not common, but secondly, I suppose, that any such action might be taken as an admission of culpability. Is the law enough of an ass that a gesture to make an otherwise disappointed customer into a happy customer is likely to backfire? Anyway, this customer stayed disappointed, though they did give me a modest discount on the replacement panel.

I get to spend a couple of hours in my pyjamas clearing up glass. I get to pay my plumber to fit the new unit. I get to pay Matki 140 quid for the new panel. I get a shower I can’t use for two weeks. Ah, well. Matki, in exchange, get this blog post. 🙂

Update, Mon 13th Oct

I thought it only fair to inform Matki of this post, and give them the chance to respond. This morning I received a call from one of the directors, Des Rocks, who struck me as a very fine and very rational fellow. He was most apologetic, and we had a good discussion about both glass manufacture and social media!

I mentioned to him that the customer service person I had spoken to seemed polite, efficient and businesslike, but that his hands had clearly been tied by the company’s policy. I was informed that they were changing some of their policies now to allow a little more flexibility. They’re also sending someone to fit a replacement panel, and will not be charging me for it.

All of which means that I’m now once again a happy Matki customer, and remain impressed with the company and its products. It’s sad that I had to resort to a blog post to get to this point, but I’m willing to give them the benefit of the doubt and assume that these events are very rare, and that getting them fixed is less likely to be a problem for customers in the future. All’s well that ends well.

Over-quantified self?

According to the Tesco website, the Samsung Galaxy S4:

detects your face and motions

I think the latter may be taking personal computing a bit too far.

I told Rose, and she asked, "Can it detect them from the expression on your face?"

The Great Beyond

The Great Beyond

Tilly, captured on her afternoon walk by my iPhone 6. It’s a pretty good camera in the right conditions, given the size of the lens. Click to see more detail.

If this shot looks vaguely familiar, you might have seen this one a couple of years ago.

© Copyright Quentin Stafford-Fraser