Saturday, 31 December 2011

When "organic" is not "good"

The word "organic" is nowadays associated mainly with "environmentally friendly", as in "organic food", "organic agriculture".

Back when I was a student, Chemistry was taught in three main parts: organic chemistry (essentially the chemistry of carbon, and hence the chemistry of molecules in living stuff); inorganic chemistry (essentially the chemistry of everything else); and physical chemistry (focussing on the processes and laws rather than the constituent elements).

And I learned that many organic compounds are toxic and/or carcinogenic. When I was at school, benzene was the organic solvent of choice in practicals. By the time I was at university, benzene was no longer used, because it was realised to be a carcinogen, and toluene was the organic solvent of choice. Thanks, school.

Also, we were gleefully informed (by the physical chemists) that the lifespan of a bench organic chemist was reduced by 10 years on average. I have no idea if this is true (or if it was true then), but it certainly stuck in my mind.

So my strongest association with the word "organic" is "probably a nasty poison!", followed by  "molecules found in living stuff". This makes my reaction to the term "organic food" go something like:
  1. Potentially poisonous?  Surely not...
  2. Made from living stuff? Isn't all food made from (once) living stuff? If it's not "organic", it's not food. (Well, okay, except for salt.)
  3. Oh... food produced without the use of inorganic chemistry
I often have this problem of trying to figure out what people mean when using a technical term I know, but in a non-technical context. My favoutite example is when I first saw a sticker saying "Nuclear power? -- No thanks" with a picture of a smiling sun.  "They want to turn off the sun?  What?  Oh..."

Anyway, if "organic" is the adjective of choice to mean "envinronmentally friendly", what should we call envinronmentally friendly chemistry, given that we can't call it "organic chemistry", because that almost means the opposite?  Well, it uses that other environmentally friendly adjective; it's green chemistry.

Thursday, 22 December 2011

hello spotty

Take one ordinary digital SLR camera (Canon EOS 20D), add one sun filter (originally bought for the 1999 total solar eclipse), and see a spotty sun:

Monday, 12 December 2011

note to self: get an American accent

The speech recognition on the Android phone is pretty good, I've found.  But "Voice Actions", where the phone does something with the recognised speech other than merely google it, wasn't working for me.

Quick google for "Voice Actions not working" gets me the answer. It only works when set to "English (US)".

I change the setting.  Now Voice Actions work.  So, I can send emails, texts, and so on, all without typing.

Except that it no longer recognises what I say...

Saturday, 10 December 2011

O tempora o mores

It was very windy in Scotland on Thursday evening. Two colleagues had travelled back up to Dundee after a meeting in York, so I Googled BBC news to see how bad it had been. I was amused to see that
Grampian Fire and Rescue dealt with 75 storm-related call-outs on Thursday night, three times the normal amount. Many calls were to remove trees and chimney pots and a number of trampolines which had blown away.
Trees, and chimney pots, and trampolines! Oh my!
A number of trampolines.
First world problems, indeed.

(My colleagues arrived home safely after a somewhat longer than usual train journey, btw.)

Tuesday, 6 December 2011

I like short meetings

I get quite of lot of email circulars for workshops and conferences. My first thought on seeing this one was, "well, that's not going to take long":

(And my second thought was, "but there shouldn't be a hyphen ... oh!")

Sunday, 4 December 2011

perfection v. progression

Well, that didn't take long. 17 sets of games, each with 15-21 levels, completed.  Not perfectly: I have a few one star, and several two star, levels, and I found only 4 golden eggs along the way, so not all the bonus levels. (There are cheat pages on the web for finding all the eggs ... but that's cheating.)

I have found only four of these
So what next? (I have downloaded the Angry Birds "Seasons" set of level, but am waiting for the holiday to play that.)  The game itself suggests I could try for three stars on every level. Now, I admit I did a few levels more than once as I went through, when it seemed I just lucked out, or when I wanted to explore an alternative solution.  But, I prefer to move on once I have achieved what's needed, which here is to "clear the level" of pigs.

It's important not to spend too much time perfecting what you have done, in place of doing new things.  Do something as well as it needs to be done, then move on.  If you have moved on, don't go back and redo, knowing you could do it better now. (Of course you can do it better now: you've moved on!  Only go back if the earlier imperfect version is proving a shaky foundation.)  Polishing is much easier than progression, but is often only a displacement activity.

So, I will maybe try to get better scores on a few more levels (maybe try for no one star levels, anyway) in my "spare time", but it isn't anything like the same as marching on to new levels.


Thursday, 1 December 2011

it was 30 years ago today

that Acorn Computers launched the BBC micro.

I got a model B Beeb while I was doing my PhD, and had great fun learning to program.  (I already knew Fortran IV, but until reading Structured Programming with BBC Basic, I hacked, rather than programmed.)  I used my Beeb to do some real science (see the acknowledment section on p544), and even wrote some articles on fractals for Acorn User.  Happy days, and so long ago.

30 years ago, in fact.  That's the reason for the post.  We all know about Moore's law, commonly quoted as "computer power doubles every 18 months" (although of course the reality is more complicated, but let's go with this for now).  One doubling of power doesn't sound much, but what happens after 30 years of Moore's law?

30 years is 20 doubling times. 2^20 ~ 10^6. (Impress you friends with fast mental conversions between powers of two and powers of ten by remembering 2^10 = 1024 ~ 10^3. Caveat: any friend who would be impressed by this feat probably already knows how to do it.)  So that would mean today's PCs are one million times more powerful than the humble Beeb.  Is this true?
  • Memory: 32kB RAM (yes, 32 kilobytes).  32 GB isn't common today (although it is on a reasonably high end scientific workstation): more like 4 or 8 Gigs typically, so, a quarter of a million times as much memory.
  • Processor (6502A) speed: 2 MHz.  More like a thousand times faster today, with a 3GHz processor (but, of course, that's with a 32 or 64 bit processor, not the Beeb's 8 bit one, and then there's multi-core, dual processors, and what not, giving another order of magnitude).
  • Screen: max resolution 640x256 (2 colours), or 160x256 (8 colours), using 20 kB of video RAM.  Today, my flat screen is 1920x1080 (4 billion, or 32 bit, colours), so that's about 8MB of video memory, or 400 times as much. 
  • Disc storage: a cassette player, or an optional 100 kB 5.25 inch floppy drive once you got fed up with waiting for programs "Loading...". Today, a 500 GB hard drive is more typical: that's 5 million times as much.
Okay, not every feature is a million times more, but combined, today's PCs are easily a million times more powerful than the Beeb.  And for less money!  The BBC Model B cost £399 (which is about £1200 in today's money), but that didn't include the monitor or floppy drive. The Torch dual 800 kB floppy drive cost around £800, although you got a Z80 co-processor thrown in for that.  In March 1987 I bought a 28MB (yes, megabyte) hard drive for £745 (or about £1600 in today's money).

To get a better feel for what this doubling means, think of a slightly older computer, Deep Thought, which took seven and a half million years to calculate the Answer to the Ultimate Question of Life, The Universe, and Everything.  That was in 1978, or 33 years ago, or 22 doubling times, or 4 million times.  If that was a speed improvement, today's equivalent of Deep Though would take only 2 years to calculate the answer!  Not so impressive now.

But wait, you say.  Douglas Adams was a genius.  He would have taken that into account.  The real Deep Thought would have kept upgrading itself, but even so still took 7.5 Myr to calculate the answer.  7.5 Myr is 5 million doubling times, or 10^1,500,00 more powerful.  That would make the Deep Thought who gave the answer 42 to the philosophers' descendents umimaginably more powerful than the original (if such a machine is even possible in the current universe).

Anyway, happy birthday, Beeb!

Monday, 28 November 2011


So here's the latest box of tin foil we bought (yes, I know it's aluminium, not tin, but tin cans are made of steel, tin foil is made of aluminium, and silver paper isn't silver):

What caught my eye was this:

Improved thickness!  That must be good, eh?  It's improved!

But just what precisely is improved?  Well, the thickness, obviously.  But in what way?  Careful scrutiny of the box revealed no further clues. (Yes, yes, I know.  Anything to delay actually having to do any actual cooking, you see.)

Improvement presumably implies change. What changes could one make to foil thickness? I could think of four:
  1. thinner
  2. thicker
  3. more even thickness
  4. less even thickness (added simply for completeness)
But are any of these improvements? Thinner might mean less waste, but more fragile; thicker would then be more waste, less fragile.  More even thickness might be better if that made cooking times more predictable (I haven't a clue whether it does or not, I'm just hand-waving); then maybe less even thickness would make life more interesting by adding greater variability to the cooked result. 

On eventually opening the box and feeling the foil, it's definitely thicker than the previous batch.  So, that's an improvement because ... more waste?  And lo!  This box has 30m of foil, whereas the previous box of thinner, unimproved, product contained 40m of foil.

So the improvement is that I have to buy foil more often?  Well, sarcasm aside, presumably the implied improvement is that it's less fragile, that it is stronger.  But then, why not say so? Why not:

Or even:

Or if that doesn't have enough oomph, what about:

But ... improved thickness?

Sunday, 20 November 2011

most addictive use of a physics engine ever

I've been holding out, but yesterday I finally installed Angry Birds on my Android phone.  Four hours and two levels (of 21 stages each, for the remaining person on the planet who hasn't yet installed it) later, I decided it was a keeper.

An early, but difficult, level

And again, for that one remaining person, the concept is simple, but addictive.  You "fire" birds from a catapult (these birds don't fly, they fall with style) to knock over and blow up structures, in order to explode the pigs.  (What do you mean, "why"?)

The physics engine means that if you hit things just right, they fall in glorious cascades, squashing everything in sight.  If you don't, they fall in the wrong place, or wobble, or tilt, and you have to try again. And again.  And again.  Hence the four hours.

Different kinds of birds have different capabilities, and you get only a limited number, so you have to plan carefully.  And then you have to execute the plan, which involves a combination of skill and luck (that's the way the castle crumbles).

It took me back a couple of decades, to Lemmings, which absorbed a lot of life back then (I really should know better by now).

more screenshots available
What impressed me those years ago about Lemmings was the implicit training programme.  At the computer show (remember them?) where I tried it, and bought it, there were three demo levels: v triv, triv, and impossible.  After having played it for several months a completely non-significant part of my life, I realised I had just sailed through the "impossible" demo level, having been thoroughly and efficiently trained in exploiting Lemming capabilities to solve fiendish mining problems. Angry Birds (and, I assume, all its ilk) has the same approach, introducing the new capabilities one by one, having specially designed levels that you use these capabilities to solve, and slowly increasing difficulty, to keep you engaged.  In addition to being a brilliant teacher, it's a brilliant implementation of what Csikszentmihalyi calls "flow".

Time has moved on since the relatively simple graphics and trivial dynamics of Lemmings.  Angry Birds has that physics engine which gives a whole new level of realism (although I do think the friction model is a bit too sticky). But Lemmings had its own great feature: insanely compelling use of background music. To this day, whenever I hear a certain piece of Mozart, I flash back to images of hordes of grimly marching lemmings.

Now, have I got time for just one more go before lunch? 

Sunday, 13 November 2011

On the Road to Mendeley

I decided to evaluate Mendeley as a means to "organise" my scientific paper reading and note-taking. A hard disk full of PDFs from forgotten sources, with separate BibTeX files for each paper I write, is messy.

I decided on Mendeley after reading a few reviews. These mostly said good things, and only very few bad things. The desktop application lets you keep the PDFs of your collected papers (and other materials) together, along with notes, tags, and bibliographic information.

You can search on authors, keywords, tags, text, and so on.

You can keep papers in separate directories.  Having recently started using Gmail, and got the hang of using tags instead of directories to classify my emails, I was pleased to see tags also supported here. I will be tagging papers not only with the bits of their content of interest to me, but also to tell me which of my own papers have referenced them.

You can export reference information in BibTeX format, for ease of writing papers. (Apparently you can also export in MS-Word formats; but why would you write a scientific paper in anything other than LaTeX?)

So I spent a happy few hours importing my PDFs, and various BibTeX files, merging duplicates, cleaning up the entries, and generally populating my account:

You don't have to have a PDF of every paper: you can store just the bibliographic details, or a URL to where it is stored elsewhere.  But if you want to annotate the PDF, you need your own local copy.  (There is a separate "notes" field, so you don't need to do this unless you want to annotate in the exact place.)  You can sync all this information across multiple computers. (I haven't tried this yet: I've only accessed it from home so far). I can see that free 500MB isn't going to go very far...

I'll try using it for a while, and in anger while writing my next paper, to organise the bibliographic information.  So far it looks very useful.  It's the kind of thing that will make writing a review paper a lot easier, I suspect.

Saturday, 12 November 2011

Hero to Zero

I love Coke.  It's my soft drink of choice.  But there's a problem.  A 142 Calorie per can problem.  So I restrict myself to about three cans a week.  I did once try a Diet Coke (by accident!); ghastly tinny taste.

Scalzi has recently blogged about Coke Zero, his soft drink of choice. Part of the reason for his choice is its (lack of) calorific value.  I was interested when he mentioned that, whereas Diet Coke uses the "New Coke" (bleurggh!) recipe,  Coke Zero uses the (One True) Coke recipe.  (Calling Coke "classic Coke" merely legitimises the existence of "New Coke", which I refuse to do. And UK cans don't even need to say "classic" on them.)

I wondered, maybe the tinniness of that long-ago Diet Coke was due to the recipe difference, not to the sugar substitute?  Maybe Coke Zero tastes like Coke, and I could save myself 142 Calories a shot? (Slightly less, actually. Coke Zero has about 2 Calories a can.)

So I tried it.

Nope.  Still tinny.


Mind you, I know I can taste bitterness where many can't.  For example, I think lettuce is horrible.  Nasty bitter tinny after-taste.  When I Rule the World, the first thing I will do is outlaw lettuce.  Or at least outlaw it being put in every single kind of sandwich.

Many friends express disbelief in my dislike of lettuce: "but it doesn't taste of anything". (So why are you so keen on eating tasteless food, then, eh?)  Oh yes it does.

Monday, 7 November 2011

scientific abstract

Scientific and technical writing is a little different from the kind of "creative writing" you are taught at school. There are different conventions. For example, "vary your vocabulary" is a complete no-no if you are striving for precision and lack of ambiguity. If you think using the same word several times may sound a bit clunky, and you decide to make things "read better" by using synonyms instead,  imagine the internal dialogue of your readers going something like this: "You talk about a thingumabob here, a thingamajig there, and a whatchamacallit in your other paper. What subtle distinction are you trying to make? I've been trying to puzzle this out for ages.  Oh, I see.  You are just varying your vocabulary. Come here and say hello to this two-by-four." That should help you decide not to do it.

One important part of a scientific paper is the abstract. It should be short yet comprehensive. It should tell you what the paper is about, the question the paper addresses, and the answer it discovers. It is not a spoiler to put the answer in. You are not writing a blurb for a whodunnit. Don't worry that you are giving away the punchline. The abstract may be the only part of your paper the reader even sees.

So I was delighted to see a paper with an excellent abstract quoted at Ben Goldacre's secondary blog. (Actually, it's only the perfect abstract when combined with the paper's title; techincally, abstracts should be stand-alone. But, hey.)

Monday, 31 October 2011

oh dear

We have a garden pond to help encourage frogs and other amphibians.

Hedgehogs may suffer, however.


Sunday, 30 October 2011

I'm tired of this meme

Looking through our favourite TV listings magazine, it seems to be knee deep in artfully posed casts. We get them draped over the set:

or against a skyline:

Sometimes they looks as if separate pictures have been badly Photoshopped together:

The newest variant of this style appears to be a flying goose-like V shape, to emphasise the main character:

With a big enough cast, two Vs can be used to highlight the upstairs and the downstairs main characters:

Sometimes, when the poses are chosen well, this can work. But mostly, it's just very tired. Every new TV series seems to get one of these style of shots.

How about a new meme?

Saturday, 29 October 2011

hyperbolic hyperbole

What's with hyperbolic discounting? It's everywhere! I first consciously noticed the term at a workshop about six weeks ago, and now I can't turn around without tripping over another paper, article, or blog post on the subject. The most recent example is a post I read yesterday, from the [citation needed] blog, about how Future Self is able to be so much more productive than Present Self: "things that would take me a week of full-time work in the Now apparently take me only five to ten minutes when I plan them three months ahead of time". The post also contains the wonderful:
It’s about large-scale automated synthesis of human functional neuroimaging data. In fact, it’s so about that that that’s the title of the paper*.
Yet I didn't even notice how wonderful it was, until I read the footnote:
* Three “that”s in a row! What are the odds! Good luck parsing that sentence!
Three "that"s in a row, and yet I parsed it just fine. It reminds me of the time (many years ago) when my English teacher at school expressed surprise at how bad a speller I was (I'm better now, partly due to several decades more practice, but mainly due to spell-checkers). "I don't understand how you can spell so poorly given you read so much." It took me a while to realise that some people see the letters in the words they read; when I'm deeply into reading something (fiction or technical) I don't even see the words. I know when I've been pulled out of the book when I start seeing the words. That may be because something is wrong, which may include a misspelling. But there's a big difference between recognition (I see it and know it's wrong) and recall (I can spell it from scratch).

Sunday, 23 October 2011

Jupiter's moons

Which of Jupiter's moons did we manage to snap yesterday? More help on the web, from the Sky and Telescope site.

So it's Ganymede further out and Europa closer in, then. Callisto is too close to see in this:

Or is it? Enhance, enhance! (courtesy of Photoshop)

Now, with a following wind, I can convince myself there's a third moon snuggling up to the (now very evidently) over-exposed Jupiter. Also, we can see that the camera lens really is a bit rubbish -- with the red and blue splitting out. But still, pretty good with no (very) special equipment.

Saturday, 22 October 2011

International Space Station (2)

I saw the ISS for the first time in April. We saw it again tonight, at around 19:45 BST, with a bit more technology to hand. I used the "Space Junk lite" app on my Android phone to check where the ISS was going to appear -- although it was so bright and obvious that wasn't really necessary (but it's a cool app anyway).

We also had a camera ready. We have a venerable old Canon EOS 20D digital SLR (2005 vintage), with a 18-55mm lens, here set at about 24mm.

The camera wasn't moved between the first two pictures, so the star field is the same, showing the very clear streak from the rapidly moving (from right to left) space station. (Click to embiggen, and see the stars.)

The camera was moved for the final shot, which shows the ISS fading from view as it moves out of the sunlight.

We then went back indoors, and watched the last ever Sarah Jane Adventures episode, over tea. Sniff.

Jupiter was very bright, so a bit later (around 21:30 BST), when we realised just how well the ISS shots had come out, it was time to try to photograph it with a bigger lens, a Sigma 70-300mm, set at 300mm.

Okay, so not the sharpest focus, but, OMFSM, two moons as well! We can stand in our front garden with a commodity camera and lens, and snap Jupiter's moons.

redressing the balance

We tend to remember outliers, especially negative ones. So, just to redress the national stereotypes balance, here is the (much more representative) departure board at Kings Cross, exactly three weeks later:

Thursday, 13 October 2011

more scammers

So not long after the scam phone call, the phone rings again. It's British Gas -- they get to call me because I'm actually a customer. But they're not trying to sell me gas, they're trying to sell me insurance. Or a maintenance contract, as they call it. When I said I wasn't interested, the guy said "not even if you had a £800 boiler breakdown?" Gah! That's just as much trying to invoke fear to make me buy something as was the virus scammer.

Then, a bit later, a third phone call. This time, something to do with market research. "Have you heard of the Telephone Preference Service?" I ask them, "because I'm a subscriber". "Oh, very sorry -- you've come up on a national database -- you should take it up with the TPS". Yet curiously, when I went to the TPS website and re-registered, just in case my previous registration had evaporated or something, I was informed that I was already registered.

So, not just cold-calling scum. Lying cold-calling scum.

Robert Heinlein has an apt quotation: "Waking a person unnecessarily should not be considered a capital crime. For the first offense, that is." I believe the same sentiment applies to cold callers.

Oh, and in case you're wondering why I kept answering the phone and at least engaging in an initial conversation -- I was waiting for a business call from a colleague. That was the fourth call. Fortunately, I didn't bite his head off...

"Windows support" -- not

Just had another scam phone call -- someone with a strong Indian accent claiming to be calling from "Windows Technical Support" (or something close to that -- I wasn't taking notes), and saying that they had received reports of problems with my computer, that it had a nasty virus I didn't know about, and had I noticed my machine running slowly lately?

I was a tad bored (writing a tedious document will do that to you), so I strung them along a bit, to see what they were really after. They said they could prove who they were because they had my computer registration number, and only the registered owner and Microsoft would know this (along a bit of gobbledygook about how this happened).

I said I thought they were a scam and that they were trying to sell me something. (I didn't ask how Microsoft knew my phone number to contact me about the problem.)

Aggrieved, they offered to prove they were legitimate by telling me my machine's registration number. I should turn on my machine and look at its registration number myself, and compare them.

I said: "But you've just told me my computer has a virus. So how do I know that virus hasn't downloaded the number to you? You having the registration number is therefore no proof that you are who you say you are."

Pause. Then they repeated of all the stuff about only Microsoft knowing the number.

So I repeated my reason for believing that their having the number would not constitute proof that they were who they claimed to be.

Pause. Then a slightly plaintive: "so what can we do, then?"

This was not providing me that much amusement value really, so I terminated the conversation, then Googled "windows phone call saying they know your computer id". Top hit was “Windows Support” Scam Worsens / Money Watch. From the comments it seems many people have much more stamina than I do for keeping scammers hanging on the phone.

Scammers are scum.

Update 12 July 2012:  Aaaand I got a comment, from sanjay gupta-bot, on this post:
Nice Blog! Informative Content for Technical knowledge. Thanks for sharing your views.We resolve every issue arising in your computer operating system, windows,software,internet security,registry settings,sound drivers etc in one call.Visit this link XXXredactedXXX
Spamming a blog post about spammers.  Gah! 

Monday, 3 October 2011

bio-optically organized knowledge

Some great new technology here -- I want one of these!


Oh. Hang on...

Sunday, 2 October 2011

national stereotypes

I've just got back from a very productive three day meeting in Paris. Just around the corner from where I was working, there was a marvelous cobbled street (Rue Mouffetard) lined with oodles of little speciality shops: boulangeries, patisseries, chocolatiers, butchers, fishmongers, fruit stalls, cafes, and, within less than 50 yards of each other, four fromageries.

4 cheese shops

The smell was amazing. (I think there were a few shops selling non-food items, too, but they didn't really register.)

Friday evening, I travelled back on the Eurostar, arrived punctually at St Pancras, crossed the road to Kings Cross, to be met with:

Kings Cross 'departure' board

Home sweet home.

Monday, 26 September 2011

name that tune

book cover
I have great difficulty identifying tunes, even if I know them well. I have no way of asking for help, since all notes I sing are the same, and flat, even though I can hear the tune perfectly well inside my head.

So, many years ago I was excited to hear of a book that would help: it lists all tunes in order of whether their notes go up, down, or stay the same. I didn't know the author or title, but in 1990 I found copy --- it's "The Directory of Tunes" by Denys Parsons --- whilst browsing bookshelves. I excitedly bought it, thinking all my troubles were over (provided that the tune had been written before 1975, the book's publication date, of course).

How does it work? Well, consider a well known song, like "Do You Know the Way to San Jose".
music score

Write a star for the first note: "*". Then, since the next note goes down, write a D: "*D". The third note goes up, so that's a U: "*DU". Keep going: "*DUUUD", etc. Then look up the resulting string in the book:

Perfect! Problem solved.

Except for one tiny thing. I can hear the tune in my head. But I can't tell if the notes go up, down, or stay the same (unless they change a lot). So I can't construct the string! The book has sat, unused, on my shelf for the last 20 years...

Last week I was round at some friends, and talk moved to discussing the Web, as it does. One of them was saying how much easier it was now that so many things were available to be looked up. I mentioned an anecdote told by Bertrand Meyer in 1999, about using the web to identify an opera he was listening to, and said that would only help if you have lyrics (and it would help me only if they were in English, and if I didn't fall foul of a Mondegreen).

Shazam logo
The daughter of the house looked at me pityingly, and told me about Shazam. You point your phone in the direction of the music and "tag" it; the app records for about 10 seconds, sends it off, and the answer comes back. Perfect!

So, naturally, I downloaded the app then and there (well, after having a brisk discussion about whether it was Superman or Captain Marvel who said Shazam!), and we all spent the next few minutes playing random bits of music at it, and seeing what it could identify (despite the background noise of an excited budgie). At first I wondered if it was using a similar system to the book, but quickly realised it had to be quite different: you don't have to start at the beginning of the tune, and it not only tells you the song title, but also the artist -- and in the case of a piece of Mozart, the orchestra and conductor. So it must be matching against the actual recording. How does it work?

I found an article in the August 2006 issue of CACM which gives a brief explanation -- more technical detail can be found following the links from the wikipedia article. Essentially it looks for spectrogram peaks, takes adjacent pairs of these, does some hashing to increase the entropy, and matches the results against the music database. Many of these peaks are just noise, and so don't match. But enough do, with the added constraint that different pairs have to match at the right time intervals, to get a high quality matching system. So, a combination of a really clever algorithm and a massive database give a fantastic ability to match tunes.

But it's matching, not "recognition" as such. So it doesn't work with live music, including amateur singing (and I don't consider the noises I make to be singing as such). It's not quite the perfect system. But it's still mind-bogglingly amazingly useful.

Sunday, 25 September 2011

Me ears are alight

Last month I blogged on illusions, inspired by a Bad Astronomy blog entry on the "Flashed face distortion effect". In it I mentioned an aural illusion: the McGurk effect, where you perceive one of three different sounds, depending on whether you listen only, watch only, or do both.

Well, Bad Astronomy has a different example of the McGurk effect, from the BBC Horizon programme. This time, you perceive one of two different sounds, determined by the lip movements you observe whilst listening.

Interesting, of course, but what prompted my follow-up blog entry was a related comment, about mishearing song lyrics. This is accompanied to a link to O Fortuna from Carmina Burana, here transcribed as "oh, four tuna", and including lines like "some men like cheese", "Vimto can taste of kidneys", and more. Although one or two of the hypothesised lines are a little strained, the majority fit beautifully, giving a highly surreal reading.

This reminded me of a TV advert from the late 1980s (for Maxell batteries), on mishearing the lyrics to Desmond Dekker's The Israelites. Naturally, it's on You Tube.

Maxell Israelites advert

A misheard song lyric (or line of poetry, or whatever) is known as a Mondegreen. Before I ever knew the name given to this effect, I'd come across it in Maurice Dodd's Perishers cartoon strip: Baby Grumplin's teddy-bear is called "Gladly, the cross-eyed bear". There are lots of other examples I've heard from people over the years: "The ants are my friends", "Lucy in disguise", "Beelzebub has a devil for a sideboard", "Reverend Blue Jeans", and more.

Nowadays, the web makes it a lot easier to find the actual lyrics, of course. But if you don't know you've misheard it, there's no reason to look it up. (And let's face it, many lyrics are frankly unintelligible even if you know what the words are, so incomprehension is no real reason to suspect a mishearing.) Yet even after hearing a song a gazillion times, I can still sometimes suddenly hear it differently, and go, "Oh, so that's what that line is!" I doubt that my ears are more alight to the words: maybe it's because CDs are higher quality than cassette tapes and radios, even without the excuse of fading batteries?

Sunday, 18 September 2011

Saturday, 17 September 2011

full circle

On our recent Lake District holiday, I took a series of photos encompassing the Castlerigg stone circle. I wasn't intending to do anything with them; I was just testing out my new camera. However, after I got home, I wondered about trying to stitch them all together into a single panorama. A bit of googling later, I downloaded Hugin.

It took me a few goes to get things working -- mostly, I think, because I hadn't been thinking of taking a panorama originally, so had moved a bit between some of the shots. Still, after playing around with control points, and masking out the people, and removing the shots with the most parallax, I manage to get a panorama that includes nearly all the stones:

Castlerigg stone circle panorama

These are the actual photos that Hugin stitched together:

Castlerigg panorama sources

The panorama has a slightly wobbly horizon near the secondary circle, and there are some artefacts in the stitching. But given the poor quality of the original photos for this sort of thing, the result is amazingly good. And the ability to mask out certain areas (here, people) is really useful.

And all this with open source software that I downloaded of the web with the click of a button!

Thursday, 15 September 2011

serial commas

Well, Scalzi's blog Whatever is providing a rich source of grammatical fodder. One post gave me a great example of it's v its, then soon after we have a mention of the serial comma (the one that some put before the final "and" in a list).

We've all heard the famous example of how a serial comma can help disambiguate a sentence:
This book is dedicated to my parents, Ayn Rand and God.
Xopher's comment gives a a link to a great new example:
Among those interviewed were his two ex-wives, Kris Kristofferson and Robert Duvall.
Language Log also has something to say about this new example.

Despite the fact that the serial comma is standard American usage, and its omission is standard British usage, I tend to use it anyway, simply because it provides less chance of an ambiguous parse (even in less hilarious cases than those above). However, I do follow the British usage that punctuation goes outside the quotation marks when it is part of the quoting text and not part of the quoted text. It's only logical.

Wednesday, 14 September 2011

Perhaps it’s its forbidden nature

One of the many things that can get me riled is the use of "it's" when the writer means "its". C'mon, it's not difficult: "his" and "hers" don't have apostrophes, so why would "its"? And formal writing (where the mistake also often pops up) tends not to use contractions; it should either be "it is" or "its", never "it's".

Given my pedantrypassion on the subject, I immediately noticed the sentence
Perhaps it’s its forbidden nature that consumed me.
in a "Big Idea" blog post. What a gorgeous juxtaposition. Why have I never noticed such a construct before?


Sunday, 11 September 2011

Lake District holiday

We spent a couple of days in the lake District as part of our holiday this year-- neither of us had been before.
We had a great time -- marvellous scenery -- even some good weather! (View a larger map.)

We did the usual touristy things -- first off to see the Castlerigg stone circle, and try to spot how the stones are aligned on peaks and valleys:
brass map of stone ring part of stone ringpossible alignment of stones on valleys

We had a trip on a steam train, sitting in a carriage that is exactly like ones I remember from my childhood (except much cleaner!), and looking at the lovely views:
a very clean carriage the Repulsereflecting on the view

We did a lot of driving round, marvelling at the scenery of lakes and mountains. Some roads were a little alarming -- hairpin bends on steep inclines with little room to pass traffic in the opposite direction (fortunately there wasn't that much traffic) -- topping the brow of a hill and being unable to see anything but sky past the front of the car -- learning to sneer at "mere" 20% incline warning signs -- sitting at the top of a 30% incline, thinking, it looks vertical! But the scenery was worth it all.

We even made friends with some of the exotic local wildlife -- sparrows!! -- who were tame enough to eat crumbs from my hand. After I made the mistake of providing some food, lunchtime turned into a scene from Hitchcock ... suddenly sparrows, hundreds of them!
lake mountainscheeky sparrows

We were expecting scenery and stone circles -- it was why we went. But an unexpected highlight was the Cumberland Pencil Museum in Keswick. We saw this advertised in a tourist leaflet at our B&B, and so we just had to go. Now, I've never really given a lot of thought to pencils beyond the obvious "so how do they get the lead in there?", but, like just about everything really, there's more to them than meets the eye, as we learned at this fascinating museum.

The local pencil industry grew up around the local graphite outcrops (I learned that it was only relatively recently named "graphite", after the Greek for "drawing/writing", as in "grapheme" and "graphic"). The hardness is altered by adding clay -- more clay gives a harder "lead". Then the industry branched out into coloured pencils, watercolour pencils, and more. And there's lots more fascinating bits and pieces -- including wartime spy pencils, manufacturing tricks, and more. We would have stayed longer, but our car park ticket was expiring, so we had to leave after about an hour.
pencils through the ages putting the lead in a pencil

So, a good couple of days in the Lakes. I'm sure we'll be back.