The Dyson Shower?

Well, I'm back home from Michigan, enjoying the more moderate temperatures of the UK, and some real marmalade, after a two-week absence from both.

I'm also back in the world of hard water, and was pondering this as I squeegeed our shower cubicle this morning, as I do every day, to reduce limescale build-up. I'm sure that that clever inventor Mr Dyson could come up with something to save me having to go through this rigmarole. Perhaps some kind of induced vortex which would pull all the water drops back towards the plughole so that they wouldn't hit the walls of the cubicle -- or perhaps even render those walls unnecessary.

Alternatively, maybe something like the Airblade technology could blast the water droplets off the walls before they had a chance to evaporate? And then also dry me as I stepped out of the door?

Over to you, Sir James...

If you're not a communist...

There's an old saying:

If you're not a communist at the age of 20, you haven't got a heart.
If you're still a communist at the age of 30, you haven't got a brain.

I've always liked this quote, and have wondered about its origin since I first heard it. Now, thanks to the web -- invented when I was about 25 -- I can find out. It turns out to pre-date communism by some time, at least as a rhetorical device.

It was said about republicanism by François Guizot, the French Prime Minister in the mid 19th century, whose childhood had been during the Reign of Terror.

Not to be a republican at 20 is proof of want of heart; to be one at 30 is proof of want of head.

It was later adopted by Georges Clemenceau, who substituted socialiste for republicain.

But, Fred Shapiro points out, one could argue that even Guizot was pipped to the post by John Adams, who said something similar, though not as elegantly, in 1799:

A boy of 15 who is not a democrat is good for nothing, and he is no better who is a democrat at 20.

Adams missed the heart and head distinction, though, which I think is important: it captures the sometimes misguided fervour of youth and the wisdom that comes from experience (or, others might say, the conservatism that comes from age).

Of course, I still prefer the 'communist' version, but that's because of when I grew up. I wonder what variations will be popular in 50 or 100 years' time?

Pick your own

Block's Farm Market, in Romulus, Michigan, is a great place.

I particularly liked the way they sell sweetcorn: a tractor drives in from the nearby field towing a couple of trailers, and you just help yourself. You pack as many as you can fit in two large bags, for $5. It's also, I have to say, perhaps the best sweetcorn I've ever tasted.

20150828-13265699-900

Replace wildcard imports in Python code

From our just-in-case-you're-Googling-for-it department...

In Python code, wildcard import statements, such as:

from foo import *

can be very convenient, but are now usually considered bad practice.

I've written a really simple tool called dewildcard to help replace them with full expansions, which can then be trimmed down using a tool like pylint or pyflakes.

Just in case it's useful...

Goodbye, Android

I meant to post this when it came out a month ago...but better late than never...

Lorenzo Franceschi-Bicchierai, a computer security journalist, wrote about why he's ditching his Android phone for an Apple one, in an article entitled Goodbye, Android. He's not a particular fan of the Apple ecosystem but feels he must make the change for security reasons, and that's not Google's fault -- they're quite prompt about issuing security patches -- it's a feature of the Android ecosystem.

Google still has very little control over software updates, and Android users are basically at the mercy of their carriers and phone manufacturers when it comes to getting updates or new operating system versions. For example, it took Sony more than six months to push Android 5.0 Lollipop to its new line of Xperia Z phones, despite the fact that it had promised for a much shorter turnaround after Lollipop was released by Google. Just for comparison's sake, when Apple released iOS 8 in September of last year, it immediately became available for all iPhone users, even those with an 2011 iPhone 4S.

As security expert Cem Paya put it, that was a conscious decision Google made when it created Android. Paya called it a Faustian deal: ""cede control over Android, get market-share against iPhone."" Basically, Google was happy to let carriers put their bloatware on their Android phones in exchange to having a chance to fight Apple in the mobile market. The tradeoff was giving carriers and manufacturers control over their Android releases, leaving Google unable to centrally push out operating system updates.