Thursday, 28 February 2013

Spaced out

** Grumpy old man alert **

A genuine web form
There's a campaign in the US saying that every student should have the opportunity to learn to write computer code. And I agree - it is a great thing to be able to do. However I do warn people who take that step into coding that it may turn them into a grumpy person, when they know how easy it is to do something... yet discover that so many idiot coders have failed to do so.

My particular gripe today is web forms that ask for telephone numbers. The standard format for a phone number in the UK is something like '01793 765432' with a dialling code,  a space, and the local number. Of course you don't type the space into your phone, but it is the correct format. Yet increasingly web forms are rejecting phone numbers with spaces in. Use one and you will get an error message pointing out the folly of your ways.

But here's the thing, and the reason why I bring up coding skills in the same breath. Once upon a time I used to write code in C, the programming language (in various variants) most used to write software for personal computers. In C there is a standard, built-in function that does a pretty simple, but occasionally useful thing. It takes a string of characters and returns that same string with the spaces removed. That's all it does. Frankly it's easy enough to write yourself, but it usually comes in the library of functions. Plain and simple. So guess what? If you have a form and put the text in it through this routine, you will get a phone number without spaces. No need to wrap the user on the knuckles for getting it right - simply change the format to the one you want.

This is a fundamental of good user interface design. If you know what's wrong, don't complain, just fix it. If your programming can't cope with the input it's your fault, not the users.

Get your act together guys. This is pathetic.

Wednesday, 27 February 2013

Why green heretics are essential

You may recall a little while ago I rather revelled in being labelled a 'green heretic'. I've just come across a report that emphasises why it is so important to indulge in a little green heresy (hopefully dodging the green inquisition) and think beyond the knee-jerk reaction as I suggest we should in Ecologic.

According to this piece in the The Register (usually more a source of great IT information), climate change isn't high on ordinary people's priorities. Well, that's not surprising at the moment with worldwide recession and financial difficulties. When you are trying to keep your business afloat, or to keep your house from being repossessed and your children fed, it is difficult to pay too much attention to the finer points of improving the environment - important though they remain. But the interesting thing about the data discussed in that article is that people gave climate change a similarly low importance when times were good. It's not just politicians that have a short term view - so do the rest of us, apart from a vocal few.

This isn't, by the way, a matter of climate change denial - it is rather accepting that things are the way they are, but not being prepared to do anything much about it. There's a strong parallel with the overweight/obesity situation in the Western world. Most of us know perfectly well that eating too much fat and sugar is going to make us overweight. We don't deny it. But we can't resist the siren call of fish and chips or pizza, or hamburgers and a coke, or whatever our high fat, high sugar diet of choice is. Because each incremental meal doesn't really make much difference. The impact is from long term use, but the experience is short term, one meal at a time.

Those who call people like me green heretics argue that we put too much stock on engineering ourselves out of trouble. They say that we have too much faith in science and technology to counter our mistreatment of the environment. But this survey says to me that such people have got things back to front. Because short of draconian restrictions from government, something that isn't going to happen in a democracy if said government wants to be re-elected, we are not going to change our ways. Why would we, if we don't consider it a priority? We consume our energy in small chunks, just like those hamburgers. So the faith in science and technology solutions aren't based an overweening belief in the power of science, they are instead our only hope.

I'm not saying give up your recycling, or everyone should go out and buy a Hummer. Of course we can and should still do as much as we can as individuals to counter climate change. But it clearly isn't going to be anywhere enough. We aren't going to radically change the way we live our lives because it will help with climate change in the future. It is just not going to happen. And so we have to find science and engineering solutions to counter the way we live. And the sooner we put more effort into that, the better.

Tuesday, 26 February 2013

Communicate, communicate, communicate

Yesterday I had a phone call from the company that makes the accounting software I use. Apparently they want to expand their offering and wondered if I'd be interested in, for instance, a CRM system. I told them politely NTY.
You can do it if you communicate

(If you aren't au fait with TLAs (three letter acronyms), CRM is 'Customer Relationship Management' - in essence a database of your customers that enables you to give the impression of knowing them to some extent. I made up NTY - 'no thank you.')

I have two types of customer - big direct people like publishers and smaller (in terms of income, though obviously hugely important) indirect people like book readers. Neither of these really fit the CRM profile. I only interact with a handful of publishers - a 'to do' list (I use Apple's Reminders) is fine for that. As far as readers go it's a very ad-hoc relationship that doesn't need that kind of management.

However, the whole business made me think about customer service, something I used to major on in my airline days. I even wrote a (rather good) book about it. But in all honesty, and at risk of sounding like Tony Blair, there are just three things you first need to concentrate on to improve customer service/relations - communicate, communicate and communicate. It's ridiculously simple, and yet so many companies are really bad at it.

Absolutely the most important time for this is when things go wrong. This is why airlines/airports often have a terrible customer service reputation. Because when things go wrong they don't communicate quickly or frequently enough. I've had a really good example recently of a company not quite getting it right.

The company that hosts my websites/mail servers, Webfusion generally is very good. But for over 24 hours now, the server that hosts many of my websites and all my frequently used email addresses has been totally out of action. This is a long time to be offline - and the only way to come out of it smelling of roses is for Webfusion to communicate a lot. So how have they done?

First fail: they didn't let me know that the server was down, I had to find out the hard way. Of course they couldn't email me on my regular address - but they should have both a backup address and, crucially, a number they can text an alert to. Simple, easy to do, informative.

Second partial success: they have a support site with a status page. This has been giving updates of progress (or lack of it). That's good. But it has not been done well enough. The updates have been too infrequent and give no timescale for the next information. I'd suggest every two hours is a sensible period, and each update should tell you when the next one will be up. (And, of course, that next one mustn't be late.)

Third fail: they raised hopes then dashed them. Bad move. Last night at around 10pm they posted a message saying 'We are performing final checks on the system with a view to have the server back online as soon as possible.' This made it sound as if it was about to come back any minute, but it still wasn't working at 8am next morning. A supplementary message wasn't posted until 8.43am.

As of 8.46am when I write this, the server is still not back, so as well as continuing communication with more information content (the latest message is still very much a holding one with no idea of timescale/what's happening), I don't yet know what they will do when it's fixed. There is the biggest challenge of all. I suspect they will just issue a 'Sorry, but it's fixed now,' message. That really won't do. After a failure like this, the final communication should offer some kind of compensation too - and generous at that. This is the point you can turn a disaster into a triumph, but not if you are careless about communicating or stingy with your recompense.

So there we have it. Communicate, communicate, communicate. Simples.

Monday, 25 February 2013

Cloudy working

Have you managed to ignore the concept of 'the cloud' on your computer so far? If so, could I politely suggest that you are bonkers?

Let's think of a humble file on my computer - say an article I've spent hours writing. Let's think of the pre-cloud me working with it. What happens if my computer hard disc dies horribly? Well, I will have backed it up. Probably. Certainly within the last week. Shame I only wrote it yesterday. Or let's imagine I'm 50 miles from home and suddenly need to access it. Well, tough. I can't.

Now let's think of post-cloud me. My hard disc dies? No problem, the latest version of the article is in the cloud and I can access it from any other computer. Need to get it remotely? No problem again. I can get to it from my phone, my iPad or a computer.

But isn't it complicated/expensive? No! It isn't. It's simple and for the kind of space you need for documents (if not photos and music) it's free.

The main cloud storage facilities work by setting up a new folder on your computer. Put anything in that folder and it is automatically duplicated in the cloud. Any changes are synchronized. That's all there is to it. Of course you have to slightly change your way of working, in that your documents will sit in that folder rather than your computer's Documents or My Documents folder - but that's hardly a chore.

Personally I use three free cloud services - Dropbox, Google Drive and SkyDrive (Microsoft's version). They come with 2 Gb, 5 Gb and 7 Gb of free storage respectively - plenty for any document work. There's not a huge amount to choose between them in practice, though each offers subtly different features (you can see a useful comparison here). I would tend to recommend SkyDrive for Microsoft Office documents as the web version has built in Office editing tools, so you can tweak a document even if you don't have access to Office. There's no reason to use all three particularly, though I find it quite useful having different spaces for different types of documents.

If you want to go the whole hog and have all your photos and music up there, you can do that too, though typically you would go over these limits and need to pay an annual fee for extra space.

I come back to my original statement. If you aren't using one of these services, why not, short of inertia and folly? Rush out and do it today. Bear in mind that you are not tying yourself into only having access to your files when you have internet access. The folder is actually on your computer, it only synchronizes with a copy in the cloud. But why would you want to miss out on automated instant backup and the ability to access your files away from home?


Friday, 22 February 2013

Where's quantum Wally?

It's appropriate that the episode of The Big Bang Theory I watched last night featured as part of a kind of nerd Olympics a competitive game of Where's Wally (or to be precise, the US variant of the book Where's Waldo? - why did they change the name?) where contestants were handicapped by playing without their glasses. There's something very Where's Wally? like about my topic today, which is the puzzle of where a quantum particle like an electron or a photon is when you aren't looking at it.

Here's the thing. Unless you observe it and pin it down, a quantum particle's location is fuzzy. The position is described by Schrödinger equation, which tells you the probability of it being in any location, but this isn't like saying I can give a probability for where I am in the house, because in practice I actually will be in one, specific place at any one time. In the case of the quantum particle the probability is all there is. The best we can say is the particle literally doesn't have a fixed location, we can only say that there are various probabilities of where we would find it if we looked.

Young's slits
So far so good. This fuzziness of location is important, because it explains why it is easy to think that quantum particles are, in fact, waves. The classic example is Young's slits. A couple of hundred years ago, Thomas Young set light through a pair of slits so that the beams merged on a screen behind them. The result was a series of light and dark bands. This was used to show that light is a wave, because waves 'interfere' with each other. If two waves meet and they are both rippling up at the same point, the result will be a bigger wave. If one is rippling up and the other down, they will cancel each other out. And for light this would produce those dark and light bands.

The only thing is, we now know that light can be described as quantum particles - photons. And even if you send those one at a time through Young's slits, the interference pattern still builds up. The same goes for other quantum particles like electrons, which produce exactly the same effect.

The reason I bring this up now is I am currently reading for review a book called The Quantum Divide, which is about half way between a popular science book and a student text, and which takes some offence at the way this quantum strangeness is often portrayed. What popular science books frequently say, and I think I have been guilty of this, is that a particle goes through both slits (i.e. is in more than one place at a time) and interferes with itself. Gerry and Bruno (I'm not being overly familiar, these are surnames), the authors of the book, take serious umbrage at this wording:
We hasten to emphasize that quantum mechanics does not actually say that an electron can be in two places at once, hence the use of the proviso that quantum mechanics only superficially appears to allow the electron to be in two places at once.
And just to be clear why they are having to make this distinction:
Quantum theory does not predict that an object can be in two or more places at once. The false notion to the contrary often appears in the popular press, but is due to a naïve interpretation of quantum mechanics.
(Their emphasis in both cases.) In one way I am very grateful to G&B as I will be more careful with my wording as a result of this. But on the other hand, I think this typifies how scientists trying to present science to the general public can get a bad press. They no doubt think what they are doing is emphasizing their precision, but this comes across as the worst kind of academic bitching. More seriously, I think G&B are in danger of throwing the baby out with the bathwater. All descriptive models of something as counter-intuitive as quantum theory are inevitably approximations - what they are really doing here is not liking someone else's language, even though it gets the basic point across better than their version in some ways.

The idea that, say, a photon goes through both slits and interferes with itself is technically inaccurate. The photon is not in any place with certainty, but is only described by the wave equation, which gives it a probability of being located in each slit. And the interference is of that probability wave, not the photon itself. However it is arguable that the probability wave is the photon - that it is the only meaningful description of the photon and as such if we say that the probability wave has values at both slits and interferes with itself, we are surely not stretching things too far to replace the clumsy 'the probability wave' with 'the photon'.

Okay, it's not perfectly accurate, and we certainly should explain what we are doing and probably often fail to do so. But I don't think this is any more a problem than when physicists speak of the big bang or dark matter as if it they are facts, rather than our current best accepted theories. To make a big thing of it as G&B do is, frankly, to miss the point.

Thursday, 21 February 2013

When the remake is better

We see a steady stream of TV programmes from the UK crossing the Atlantic and being remade for a US audience. Often the result is to water down the original, or to lose the point of the show. I would be hard pressed to think of a remake done this way that was better than the original... until now.

I was a great fan of the Michael Dobbs 1990 TV drama and books House of Cards with its scheming chief whip (and, eventually, Prime Minister) Francis Urquhart. Everything about it was superb. Ian Richardson made a brilliant Machiavellian villain, and the show was groundbreaking in its use of direct access to the camera, with Richardson making asides to the audience and giving us wonderful knowing looks. And, of course there was that catchphrase 'You might very well think that; I couldn't possibly comment.'

Now Netflix has remade the programme from the original shortish series to a 13 part epic starring Kevin Spacey. And it is excellent. Although the original was great, this is genuinely better. It's more sophisticated, more complex and brilliantly done. Spacey, as Francis Underwood (presumably Urquhart was too difficult a name) has that same ruthless charm and uses the camera aside to great effect.

I've had Netflix for a while now, and am very impressed with it, but never expected they would produce their own drama of this quality - well done guys.

There is only one slight problem with the storyline, which will involve a spoiler, so I will briefly discuss that further down the page - otherwise this piece is finished.

Image from Wikipedia

±
|
|
|
|
|
S
P
O
I
L
E
R

A
L
E
R
T

|
|
|
|
|
|
|
|
|
±


One of the most interesting aspects of the new series was how it would end. The original book had Urquhart commit suicide at the end, when the house of cards collapses. But in the TV show he throws the reporter off the tower of Westminster Palace, gets away with it and goes on to become Prime Minister. (Hence the two subsequent novels are follow ups to the TV show, rather than the first novel.) The Netflix series does neither, but ends unresolved just before the house of cards collapses. Arggh! Nasty people. Hopefully that means there will be a sequel.

Wednesday, 20 February 2013

The dreaded CFCs


My latest podcast for the Royal Society of Chemistry features the compounds we loved to boo and hiss before carbon dioxide became our favourite baddy - chlorofluorcarbons or CFCs. Remember the hole in the ozone layer? That's the one.

Amazingly, the same man who came up with CFCs also was responsible for adding lead to petrol - if ever the environmental movement wanted a bad guy, Thomas Midgley was their man. Yet he got a medal for it - because at the time his work seemed brilliant. So slap on the factor 50 and hurry along to the RSC compounds site - or if you've five minutes to spare now, click to to have a listen to my podcast on CFCs.

Tuesday, 19 February 2013

Puff, puff

Would you take note of an endorsement
by this man?
An almost inevitable feature of a new book is some gushing comment on the cover - known in the trade as a 'puff'. Publishers love these - but do they make any difference?

We're all familiar with the kind of thing that is put on comedy books, where someone goes entirely over the top:
Before I read this book I was in a deep depression and thought my life was pointless. Now, thanks to this book, I realize life is worth living. It is quite literally the best thing since sliced bread, and I would pay £1,000 for a copy. Or give up a lesser organ.
This reflects an underlying concern - does the person giving the 'puff' really mean it? Have they even read the book? Were they paid to say nice things? And do you care what they think?

There certainly needs to be careful selection of anyone endorsing a book. Some publishers seem to think 'if they're famous, that's good enough' - but it certainly isn't the right approach for me as a reader. An enthusiastic comment from an Only Way is Essex 'star' is not going to get me heading excitedly for the tills. In fact the matching can be quite subtle. I have seen popular maths books endorsed by Carol Vorderman, and I can imagine the publishers rubbing their hands in glee. Who could be more mathsy than our Carol? Sorry guys, that just doesn't work for me, or I suspect, most of the audience for popular maths books. I think I do take a little notice if the person making the comment is someone relevant who I respect - but that's about all.

The good news is that people don't get paid for making these comments (well, I never have) - and personally I would certainly never endorse a book without reading it first. Nor would I say something I didn't mean. However, it's also fair to say that a one-liner comment can't really capture an overall view. If you take a look at my review of the book I'm quoted on in the photo here, I liked it, definitely - but there are a few balancing remarks too. A puff inevitably provides only one side of the balance.

Overall, then, I don't think such cover endorsements are a bad thing, nor would I totally ignore them. But I only give them a pretty small weighting in my buying decision - and I suspect you do too.

Monday, 18 February 2013

Hitting QI in the asteroids

The 2009 Orionid Meteor Shower (Courtesy of NASA)
I dearly love QI, the BBC's quirky factoid quiz show hosted by Stephen Fry. However, as I've pointed out before, the programme's 'aren't you thick, nah nah' attitude makes it fair game when its researchers get it wrong, as they regularly do.

One of their rather nice revelations on the show was that if you see a meteor crash to earth (a timely subject given the recent Russian meteor strike) and rush to pick up the resultant remains - a meteorite - it won't, as you might expect be incredibly hot, but instead it is likely to be painfully cold. This is because as it comes in through the atmosphere lots of fragments will be ablated from the surface, carrying away the heat, preventing the remnant from heating up.

Unfortunately, according to NASA scientist Donald Yeomans in his book Near-Earth Objects, they haven't got it quite right.

With a rocky object - which is most of them - this ablation will indeed occur, but Yeomans reckons the temperature on impact will be 'little more than ambient temperature' rather than freezing cold. It's worse though. Metallic meteorites are significantly rarer - but they wouldn't ablate in the same way and would retain most of their energy. They would be hot. And here's the clincher. Most meteorites that get found are metallic. Because they stand out. How could you find a few small bits of stone at ambient temperature in a field, say? The majority of meteorites that are ever found are metallic - and chances are these would have been hot on arrival.

Sorry QI - failed again.

Thanks, by the way, for the messages of encouragement to come back to the blog. I had to have a break for medical reasons, which still may cause further interruptions, but at the moment, we're back on track.

Monday, 4 February 2013

I'm going out and I may be some time

For reasons beyond my control (as they say) this will be my last blog post for a little while - apologies to my regular readers (both of you) - I will resume as soon as I am able.

In the good old days, when TV broadcasts used to break down, as they did with considerable regularity (it only seems to be Channel 4 these days), they used to be kind enough to play you some music while you wait. In that same spirit, I thought I might leave you for the moment with a piece of music.

I was going to give you one of my favourite Tudorbethan masterpieces, but I thought instead I'd make it this excellent example of rather more modern but still exciting choral music:

Friday, 1 February 2013

Quantum vampires

The title of this piece may sound like the latest Young Adult bestseller (and I reserve all rights, thank you very much) but I was thinking of something a little more down to earth... yet at the same time rather more exciting. Even though it has been out for a while, I get more emails about my book on quantum entanglement, The God Effect than almost any other. I think it is because the subject is mind-boggling even to physicists (the whole business really started when Einstein wrote a paper to the effect of 'this entanglement stuff is so weird, quantum theory must be wrong'... but it was Einstein who was proved to be in error), and because some of the applications are amazing, notably quantum teleportation, which produces an effect like a Star Trek transporter on the scale of quantum particles.

I just thought I'd give a taster for the subject by using a little extract from The God Effect where the scientists head for the sewers:

By 2004, [Anton] Zeilinger and his team had achieved teleportation over significantly greater distances – in fact across the river Danube. A year after their ground-breaking long range transmission of entangled photons across the Danube, the Austrian team was back in the sewers, this time achieving teleportation from one side of the river to the other. (Quantum entanglement experimenters seem to have a functional relationship with the sewage system rivaled only by utility workers and Buffy the Vampire Slayer.)

As always with teleportation there are two “channels”, one carrying the entangled particles, the other transmitting the conventional information that will be used to complete the teleportation process. Entangled photons were pumped along a fiber optic cable running through the sewer system under the Danube, while the conventional information was beamed by microwave for 600 meters across the river. This may not seem ground breaking, but as their paper in Nature commented they had “demonstrated quantum teleportation over a long distance and with high fidelity under real world conditions outside a laboratory”. 

This is a significant blow to those critics who have said that teleportation could only occur under highly controlled laboratory conditions. The team points out that it’s also possible that this technique could be used as an alternative approach to make quantum repeaters that would enable entanglement to be shared anywhere around the world, as teleporting an entangled particle transfers the particle’s state, including its entanglement.

As this demonstrates, even if there never can be “real” teleportation of physical objects, it doesn’t mean that this isn’t a development of great importance. Teleportation even its limited form will prove vitally useful in making quantum computers real. Quantum computers rely on qubits, where information is stored in the quantum state of a particle. This may be very powerful, but it is also difficult to transfer that quantum state safely from place to place within the computer – or even between two quantum computers.

Teleportation means that, provided a supply of entangled particles is available, something that is now relatively easy to achieve, a qubit can be teleported from one place to another using only a conventional link. So a satellite pumping out entangled photons to two locations could enable quantum computers in two locations to swap qubits over the Internet.