Brian Clegg's Blog, page 140

June 1, 2012

Forget the Queen, I have more birthdays

Apparently this is the Queen's Official BirthdayAs I am a mild republican on the quiet (I don't want them all taken out and shot, but I am very doubtful of the benefits of paying for a royal family, even more doubtful about the benefits of having Prince Charles become king, and feel it's time we liquidated most of the royal estates) I won't be celebrating the Queen's diamond jubilee over the next few days. I will just enjoy muttering 'Bah humbug,' and taking potshots at bunting. But I thought I would put up a post that mentioned herself.

One of the oddities about the Queen is that she has two birthdays. This isn't due to some biological peculiarity from inbreeding, but for some reason she has a separate 'official birthday'. (Don't ask.) Funnily, in this age of e-presence I suspect more and more of us will be like the Queen in this respect.

This occurred to me when that excellent living typo Peet Morris congratulated me on my birthday on a day that, well, wasn't my birthday. This reflects an intentional casualness I have about my date of birth online. I am profligate with my dates of birth. The only rule is that none of them is correct. We all know that date of birth is one of the ways financial institutions and others try to make sure they've got the real you - so it seems best not to broadcast your birthday this way if you want to avoid identity theft. (Actually it's academic, as the only time I've suffered identity theft so far they used totally random dates of birth and it wasn't picked up. But hey.)

So you will find, for instance, that on Goodreads I was born on April 1, 1959. I have no idea where it got this date from - it's not the date I put in, but I rather liked it when it came up, so I stuck with it. In the 'Rochdale Hall of Fame' (don't laugh) which I proudly share with the likes of Gracie Fields and Anna Friel, I was apparently born on March 22, 1955 (closer but no cigar). And Wikipedia (I must do something about that photograph - I don't know who put it up, but it's terrible) accurately but coyly places me in 1955. I can think of at least three other dates I've used, though I'm not quite sure where they are.

So move over, Mrs Windsor. Two birthdays? Pah! That's nothing.


Photo from Wikipedia
 •  0 comments  •  flag
Share on Twitter
Published on June 01, 2012 00:11

May 31, 2012

When is a bug not a bug?

Is it a bug or a feature?I spent a fair number of years at British Airways both programming myself and working with programmers. Arguably the most fascinating sociological aspect of the computer programming environment is the concept of the bug. The error in the code that makes it do the wrong thing. I might not be rich, but I could probably afford a pint of beer if I had 10p for every time I heard a conversation between programmer and user going a little like this:

User: 'There's a bug in this software. It does X and it should do Y.'
Programmer: 'Sorry, that's not a bug, it's a feature.'
User: '??!?'

I need to briefly dive into the origins of this word 'bug' before exploring the sociology. You will see it said that the word originated from the early days of computing. A (valve) computer failed and on investigation it was found by the early computer expert Grace Hopper that there was a large insect in the machine had caused a short circuit. The insect was stuck in the computer's log book with a write up that said there was a "bug" in the system. And so the term started to be used.

This would be a good story for the origin if the term hadn't been in use by engineers in Victorian times. While it probably did refer to some such incident in the dim and unrecorded past with a mechanical device, the early computing example was just making use of a term that already existed.

Meanwhile back at that programmer/user conversation - a bug is when a computer program does something it shouldn't because of an error in the code. A (bad) feature is when it does something the user doesn't want it to, but there is no actual error. The code is operating fine. It isn't making any logical errors. It's just that (say) it won't let you put more than nine passengers on a plane. Not much use in a system for calculating loads on a 747, but it is a feature, not a bug.

This all came back to me when I had an argument with the support department of a software company called Yabdab. (Boggle.) As a result of my move to Mac I've started re-writing my websites, as my old website software doesn't have a Mac version. I'm using a product called RapidWeaver, which has lots of bolt-ons called stacks. And I'm using a nice little stack from Yabdab called PaySnap that makes it easy to take payments on a website. With me so far? A big advantage of this over using Paypal direct, as I did previously is that it sets up a nice little shopping cart/trolley on your site and you only go off to Paypal to handle payment when all the items are in the cart. Excellent.
Hang on, that was £10.99 a minute ago...
I was implementing this on my Hymn CDs site, which has two versions, one operating in UK pounds, the other in US dollars. This is appreciated by US customers, who prefer to pay in their own currency - and why not?  But here's the thing. As far as I can see, Paysnap only sets up one shopping cart on a computer. If I put an item into the cart from the UK site, then go to the US site and add an item in dollars, then the first item is still in the cart - but its price has been switched from pounds to dollars. Put it in at £10 and it is now $10. A bargain.

Yabdab aren't interested in doing anything to fix this because as far as they are concerned it's a feature. So stuff stays in the cart? Not ideal, but hey. I argue, though, that because it crosses the line and makes an actual mistake (converting from pounds to dollars or vice versa by simply changing from £ to $) it's a bug. They still won't fix it - but I feel I have the moral high ground.

Top illustration from Wikipedia
 •  0 comments  •  flag
Share on Twitter
Published on May 31, 2012 00:40

May 30, 2012

Goose bumps

I think the thing I enjoyed most about writing The Universe Inside You was the chance to explore how small aspects of the human body could help explore some entertaining science. Take skin, for instance.


The outer layer of your skin is primarily the same material as your hair and nails, a protein called keratin. One of the interesting things about keratin is that it isn’t a living substance. Your outer skin, hair and nails are not alive. This means, of course that all those hair adverts claiming that a product will nourish your hair are rubbish. You can’t nourish hair, any more than you can nourish a boulder. It makes no sense. But what I find particularly interesting is the paradox of what makes you a living creature. You are, without doubt alive – yet parts of you aren’t. Many of your cells could be considered to be alive, yet on their own, they aren’t you. Where does the divide come between you and the cells that make you up? Your hair and skin are certainly part of you – but they aren’t alive.

On a more mundane level, when we take a look at our skin, we can get some insights into the development of human beings. Because when we’re cold or feel threatened we get what was called goose pimples in my youth but now seems to be better known as goose bumps.

Goose bumps are a great example of the way many of our body’s responses live in the past. What is happening when you get goose bumps is that your body is fluffing up your fur. It doesn’t realize there’s not a lot to fluff because we appear relatively hairless. (I say ‘appear’ because we have as many body hairs as a chimpanzee, but those hairs are so small and fine as to be useless as fur).

The response happens when we’re cold because fluffed up fur is better at keeping an animal warm.  When the fur is fluffed up it traps more air, and this acts as an insulating blanket, just like a woolly jumper does. Only the body hasn’t cottoned on to the fact that we don’t have a nice coat of fur – so the result is to give you chicken skin.

Similarly we get the bristling feeling of our hair standing on end when we’re scared or get an emotive memory. Once more it’s a useless ancient reaction. Many mammals fluff up their fur when threatened to look bigger and so more dangerous. (Take a dog near to a cat to see the feline version of this in all its glory. The cat will also arch its back to try to look bigger.) Apparently we used to have a similar defensive fluffing up of our coat of fur – but once again, the effect is ruined by our relatively hairlessness. We still feel the sensation of having hair stand on end, but get no benefit in added bulk.

Image from Wikipedia

 •  0 comments  •  flag
Share on Twitter
Published on May 30, 2012 01:34

May 29, 2012

Selling top hats on eBay

Got the hat. Time to feed the pigs...It sounds like a joke - Did you hear the one about someone selling top hats on eBay? - But it isn't, it's a demonstration of how flexible and innovative our farmers can be.

Many farmers have had to diversify. These days, with a relatively small farm, it's difficult to make a living from agriculture alone. So, for example, some good friends of mine who farm cattle now also have a successful microlight airfield and skydiving school operating from their farmland.

When I was running a creativity session for the CIME Project in Wales the other day, I came across another example of diversification at its best from a farmer. In this case he's selling things on eBay. Specifically he's apparently now one of the country's biggest seller of top hats. This, was, I hasten to add, not one of your gentleman farmer types, all Barbour and Range Rover, but a proper, hands dirty farmer.

More than that he imports and sells hat adjusters - on the whole these hats don't fit very well. A cheap little plastic add-on makes for a perfect snug top hat. And apparently sales of them are booming. They're more popular than ever for weddings and such.

I thought this was wonderful. The need to diversify coupled with real imagination coming up with something highly unlikely but profitable. A lot of our businesses could learn a thing or two from farmers.

Image from Wikipedia
 •  0 comments  •  flag
Share on Twitter
Published on May 29, 2012 00:30

May 27, 2012

That's the way the cookies crumble

If you have a website, you live in the EU and you aren't the slightest bit nervous about the European Cookie Law, you ought to be. This sounds like a 'Yes Prime Minister' plan by the EU that says we should stop calling biscuits 'cookies' (dratted American influence) and instead have to all call them biscotti. But no, the EU is trying to interfere with the internet.

Cookies, as I'm sure you are aware, are little files that websites use to store information on your computer. Of itself a website has no memory. A cookie lets it keep a note of some information and come back to it next time you visit the site - essential, for example, if you want it to remember what you've put in a shopping basket. The EU has decided, in its overpaid wisdom, that sites using cookies should be forced to ask visitors whether they want cookies to be used.

But isn't this stupid?

It certainly is, on a number of levels. First the EU doesn't own the internet. It really shouldn't attempt to apply this kind of petty jurisdiction. Secondly cookies are pretty harmless and many of us value the way they keep info so we don't have to re-input it. Thirdly every browser has a mechanism to block cookies, so why force the site to offer it as well? (And in principle, from Saturday when the law came into force, this is exactly what is legally required.) Finally, and with a real Sir Humphrey flourish, guess what is the only way a site can remember that you don't want it to use cookies? You guessed it. With a cookie.

Time to panic!

I had vaguely heard of this law, but it didn't really sink in until last week, with days to go. Like most operators of little websites, I have no idea if my sites use cookies, and no idea how to provide an opt-out. It might seem strange that I don't know if I use them, but anyone who uses site builder software like FrontPage or Rapidweaver, or a content management system like WordPress or Drupal (or even Blogger or WordPress for a blog) has no idea if that software is making use of cookies without explicitly mentioning it to its owner. This legislation is fine for big companies with dedicated professionals crafting HTML - it is a nightmare for all the rest of us.

No, no cookies hereSo do I use cookies?

Luckily there is a way to find out. Fire up Firefox (if you don't use this browser it's free to download) and visit here to get the 'view cookies' add-in. Take a look at your web pages and when you are on a page, in Firefox select Tools > Page Info. Click on the 'Cookies' tab and it will tell you if your page has any cookies in it.

One place you will always find them is any site that remembers your login information - so if your bank, for instance, hasn't checked if you want cookies, technically they are breaking the law since last Saturday. Naughty banks.

A randomly selected bank breaking the law

What was the outcome?

I was, on the whole, clean. The WordPress login page has one, but unless you make users login, this doesn't apply to them. The only place I did have them was where I'm selling things: as soon as you use, say, a Paypal shopping cart you are loading on the cookies.

Does this mean I had to provide an opt-out?

Luckily, no. There is an exception to the need to offer opt-out if the cookies are being used for an essential function like a shopping cart. I am gradually adding a privacy statement to sites that do this, making the situation clear, but there should be no breach of the law.

So if you have websites, no need to panic, but for peace of mind it might be worth checking what's going on in those pages. Oh, and to think once again, do we really need to be part of the EU?

Image from Wikipedia


 •  0 comments  •  flag
Share on Twitter
Published on May 27, 2012 23:59

May 25, 2012

The versatile compound

One of the all time favourites in any chemistry set was potassium permanganate. Those crystals look beautiful in their own right, and make a great purple coloured solution, but that's only the start.

My latest entry in the Royal Society of Chemistry compounds podcasts takes on this simple chemical that is equally comfortable as a disinfectant and as a source of spontaneous combustion. Embrace purple! Listen to the story of this chemistry set star.
 •  0 comments  •  flag
Share on Twitter
Published on May 25, 2012 01:12

May 24, 2012

Lessons in WordPress

Despite being only a few days in, I am very pleased with the way things are going with the WordPress migration of the www.popularscience.co.uk website - I just wish I'd done it sooner.

 However I do have a couple of lessons for anyone considering such a move. The first is that you will have to do something about spam.

Even though the site has only been live for about a week, it already has over 100 spam comments. I originally thought it would be enough to moderate them before they went live. Obviously this stops them being seen but it still would be very tedious. Luckily the anti-spam plug-in that comes semi-preloaded works brilliantly.


 The second lesson is the matter of backups. I've never bothered to back up my websites because they are created on my PC/Mac and uploaded, so the back up of the local machine keeps them safe. But now the Popular Science site is being updated online which means I have no backup on my desktop.

My immediate thought was to ask the web host if they provide a backup service. They don't, but their help desk kindly pointed out to me that 'there's a plug-in for that.' I begin to realise this is as much a mindset with WordPress as 'there's an app for that' on the iPhone/iPad.

 So now I'm safely backed up. The plug-in cunningly backs up to the brilliant free Cloud storage service Dropbox (if you aren't using Dropbox, you ought to be!), so there's no need to have anywhere to upload the backup to, and it will all trundle along happily on its own in the middle of the night. Very neat indeed.
 •  0 comments  •  flag
Share on Twitter
Published on May 24, 2012 00:06

May 23, 2012

Going all studio

Science and beauty can be uncomfortable bedfellows. Like anyone with the vaguest ideas of scientific terminology I wince at the 'science bits' in most beauty product advertising on the TV. 'New improved CrackFilla with DNA piped light technology.' What? However there is one place that science and beauty come together effortlessly and that's in software.

We all know that magazines have airbrushed pictures since... well since they've had photographs in them. And of late that touching up to make photographs look their best has all been done in software. Most of us don't have the Photoshop expertise to do this effectively manually, but I have been genuinely hugely impressed by some software that I have been sent to try out called Portrait Professional. It's described as 'intelligent retouching software' and it's remarkable.

Here on the right is the picture of me I tend to use as an author photo at the moment.

Andon the left is a touched up version. The differences are subtle but still surprisingly effective. My skin tone has been improved, the wrinkles in my forehead have been reduced, my teeth are a little whiter. Even the shape of the face has been subtly changed.

I have to admit it's an improvement. Of course there are limits to what can be done with this particular example. It's a head cropped from quite a large area of photo rather than a proper head and shoulders portrait, so it doesn't have as much detail to play with as a seriously taken photo.

And that, to be honest, this highlights the only hesitation I have in saying that everyone should get  copy of this software. In looking through our family photos to try to find a picture to demonstrate on, I found it really difficult to find a single full face portrait. It's not the kind of picture we tend to take.

I thought I'd have better luck with my daughters' collections of photographs because they are always taking pictures of their friends... but again they are very rarely anything like a studio portrait, and not  necessarily ideal for this software. But there were a few, enough to be able to do this before and after. So here's the original:


And here's my improved version:


Note I have done no manual touching up - all the changes from removing the freckles to changing the eye colour were done with sliders. Some of the changes are a bit clumsy - but bear in mind this was done in less than 5 minutes. Well, I was impressed.

I expected this to be the kind of software that had professional pricing, but it's actually surprisingly reasonable (just under £30 at the time of writing) - and you can try before you buy. If you ever take photographs of people it really is worth considering. Take a look at the website.

And yes, I will be using the improved photo from now on...



 •  0 comments  •  flag
Share on Twitter
Published on May 23, 2012 01:42

May 22, 2012

Call that ancestry? Bring in the physics

The stately homeI get a bit irritated when you get some old buffer on the TV pointing out that his family has owned a particular house for 400 years, or that she has ancestors going back to the Norman Conquest. There are two problems with this. One is that unless such folk can claim to be a non-human species, we all have ancestors going back the same extent. But the more important one is that 400 or 1,000 years is a trivial ancestry compared to the way we can all trace our origins back billions of years.

As I point out in The Universe Inside You , the atoms inside you (and in the old buffers) have been circulating around on Earth since life began, well over three billion years ago. Fossils can be used to trace life back in rocks that were formed around 3.2 billion years ago, while the date can be pushed back a few hundred million years more on the basis of chemicals that suggest the existence of life. But before then, the atoms were still there. They didn’t appear out of nowhere. The atoms that make you up were present when the Earth was formed 4.5 billion years ago (apart from a few that arrived since on meteors from outer space).

Before that they floated for aeons through space. Some have been around since the beginning of the universe. According to the big bang theory, our best idea of how the universe began, all of the hydrogen in the universe and some of the helium and lithium was created when the remnants of the big bang that formed the universe cooled down enough to stop being pure energy and formed matter. So the hydrogen in the water and organic molecules in your body dates back to the very beginning of the universe.

After a while, some of this hydrogen clumped together, pulled by gravity, and formed stars, which burn in their youth by converting hydrogen, the lightest element, into the next element, helium. When most of the hydrogen is used up, helium too can be consumed, working up the elements all the way to iron. And this is where elements like the carbon and oxygen that are so important for life were forged.

Later still, some of those stars would become unstable and detonate in catastrophic explosions called supernovas. Ordinary stars don’t have enough energy to make the elements that are heavier than iron, but supernovas have so much oomph that they can create elements all the way up to uranium, the heaviest of the naturally occurring elements.

This means that quite literally you are stardust. Every atom in your body either came from the big bang – so is 13.7 billion years old – or from a star, which would make it between seven and twelve billion years old.

Now that's what I call ancestry.

Image from Wikipedia

1 like ·   •  2 comments  •  flag
Share on Twitter
Published on May 22, 2012 00:42

May 21, 2012

Hello WordPress!

The new look WordPress siteNo, when I mention 'WordPress' I'm not deserting Blogger for hosting my blog, but my oldest website www.popularscience.co.uk is in the process of moving from being a bespoke website to a WordPress site. It's all the fault of this pesky Mac I'm typing on.

Almost everything I did on the PC translated across smoothly, but I knew there were two big issues to sort out. One was my business accounts, which I'd knocked up as a hand-crafted Access database back when I used to program regularly. This had become unwieldy and unmaintainable. So last summer I switched over to using SageOne, an online accounts package, which had the big advantage of being web-based, so there was nothing to migrate to the Mac. (It can also be accessed directly by my accountant, which is spooky.)

The other problem was my rag-tag collection of websites. These had all been written originally in FrontPage, but I had switched over to a host that doesn't support it particularly, so I had gradually replaced most of my websites (like www.brianclegg.net) with sites built in the flashy Webplus. This works well, but doesn't have a Mac version. So I've started a long process of redoing these using a Mac app (RapidWeaver).

So far, so good. But I never got the Popular Science website into Webplus, as it's simply too big (over 1,000 pages). I was maintaining the site by editing pages in FrontPage, then manually uploading them using FTP, unwieldy to say the least. So moving to Mac made me face up to the fact it was time to do something about it.

The obvious solution seemed to be WordPress - and so far it has been fairly painless, though I wouldn't recommend it for technophobes. My hosting company said the server www.popularscience.co.uk is on wouldn't support WordPress, but they could move it to one that did. About an hour later I was ready to install the WordPress software - which is kind of a scary business. I wouldn't say their 'five minute install' took 5 minutes - more like an hour - but the same day I decided to go to WordPress the first pages were up and running.

I am putting all new reviews into the WordPress site and am gradually migrating the old posts (though it will take a while). It took me a day or two to sort out a suitable layout, but I think I'm getting there. Some things are less flexible than the old site, but it's much quicker to add a post and there are all sorts of new facilities for users - most notably, visitors can add comments to any of the reviews, which should be interesting. Using the www.popularscience.co.uk link now takes you into the WordPress site, but the old site is still available, so nothing is lost.
 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2012 00:06