Accessible authentication codes

My friend Alan has just decided to introduce word verification on his blog, to prevent spam commenting. Word verification is when you’re forced to replicate an obfuscated in a textbox, in an attempt to ensure that you’re a human rather than a ‘bot. I was forced down the same route in July, 2005 when some comment spammers linked off to poker sites to elevate their search-engine rankings. The authentication plug-in did the trick in eliminating that pesky behaviour.

The lovely part about Alan’s implementation (a plug-in, no doubt, as I am confident that this is well outside his skill-set) is that it has an accessible alternative. If you click the disabled logo to the right of the textbox (not sure I approve of the logo), it reads out some numbers which you can then type into the box. Sweet!

Lily Allen: LDN

Just heard Lily Allen perform an acapella version of her new single on the Jonathan Ross show. Absolutely beautiful! iTunes here we come.

Colons

Never use a colon at the end of a title in a document; never succeed a colon with a dash, unless you’re creating an emoticon. Thank you.

Freshly roasted

I bought a coffee from Pret a Manger yesterday. The girl turned around to make it, revealing the following slogan across the back of her T-shirt:

Freshly roasted

Not sure if they’ve fully thought that one through…

SUMPRODUCTIF

As mentioned a few weeks ago, I recently found out how to do the equivalent of a SUMPRODUCTIF. Here’s the detail on how.

First of all, some context.

SUM does exactly what it says on the tin. It sums a range of cells.

SUMPRODUCT is a lesser-known function, and sums a set of products. (a1*b1*c1) +(a2*b2*c2) + [...] + (an*bn*cn)

SUMIF sums a range of cells if a certain condition is true. For example, sum people’s salaries in a column if they are based in London.

I wanted a way of putting a condition on the SUMPRODUCT function. That is, I wanted to do a sum of the products only where a condition for those rows held true.

To make the formulae more manageable, let’s assume I’ve named a few ranges: conditions is the column of data that I want to validate the condition against; range1 and range2 are the two ranges that I want to do the conditional SUMPRODUCT on. And let’s assume I only want to do this if the values in the conditions range are "London".

The formula would read:

=SUMPRODUCT(–(conditions="London"),range1,range2)

Basically, the first term acts as a range in its own right, taking the value of 1 (for London) and 0 (for anything else). This means that it’s not actually doing a conditional SUMPRODUCT, but instead it’s multiplying the entries for which the condition fails by zero, which has the same effect. I think the double minus at the beginning is to ensure that the first argument is read as a formula.

Quite beautiful.

What comes between F and C?

D and E, I hear you cry. I’m actually talking about the swear words. The F word has somewhat become common parlance and as such, less powerful as an expletive. As far as I am aware, the only word stronger than that (without delving into the field of racism) is the C word. (For the sake of Francis and his desire to read my blog at work, I’ll save spelling these words out in full.)

The C word is certainly reserved for very special occasions. I have a good friend (who will remain nameless) who once told me that she saved it for instances such as hopping into the shower and realising too late that the boiler’s broken. She had allegedly shouted the expletive at the top of her voice recently in that very scenario. I occasionally use it in a joking manner, but only in circles of friends that I know well, and that I know will take it with the frivolity with which it is intended. It is becoming more common in its use, but it still holds pride of place in the swearer’s armoury.

Is there anything that fits neatly between the two? More powerful than F, but less frowned-upon than C?

I often used to muse as to whether newly created swear words would take over the mantle of old ones as these are diluted by popular use. I have to say, thus far, I have seen little evidence of new words filling their shoes.

Poof reading

Full-page advert in today’s London Lite, with the following banner headline covering around a third of the page:

Weekend City Beaks.

How on earth did that get through?

Spreadsheets, documents and SI units

If you are referring to a spreadsheet that was produced in MS Excel, please call it a spreadsheet; not an Excel spreadsheet. Likewise, please never refer to Word documents; documents will suffice.

If you refer to a spreadsheet or a document, I along with much of the rest of the world, will assume Microsoft. Only if this assumption is invalid should you qualify the noun. Thanks.

It seems we need some new SI units. Today I heard of one IT solution being five times more complex than another. I also heard of something having ‘tons’ of potential. And advertising is quoting a 70% increase in hair’s radiance. The committee that decides upon SI units needs to act fast to get all three of these baselined and suitable units identified.

Lyrics good and bad

First of all to what I believe to be the worst lyrical construct ever. I’m not talking about the worst lyric ever. (For the record, that honour goes to Rhythm is a Dancer by Snap: I’m serious as cancer when I say rhythm is a dancer.) I’m talking about the worst-scanning lyric of all time. My view is that this particular honour goes to Roy Orbison for a particular segment from Crying:

I thought that I was over you,
But it’s true so true.

Next, a short note to share my view that Sleeper were lyrical geniuses. Sleeper were lyrical geniuses.

Banged up abroad

There was an interesting documentary on Channel 5 tonight about a British couple who were caught smuggling cocaine from Costa Rica. Allegedly, they thought they were smuggling cannabis, in much smaller quantities than was actually the case.

Throughout the documentary, the footage was generic, suggesting that they may have either got away with it, or else been released already. In fact, they are serving their sentence in separate Mexican prisons, due for release in 2014. They will likely be released in 2009.

Both criminals seemed reasonably rational, particularly the guy. However they both only had thoughts for themselves, and didn’t seem to be bothered about the potential damage the drugs they attempted to smuggle would have done. They didn’t think themselves the victims of injustice. Instead, they were annoyed at having been caught, rather than having taken the stupid decision in the first place.

Seemed odd.

Bad day

Fucking shit day. ‘xcuse the language. A double bill of The Libertines’ Time for Heroes on coming out of Clapham Common tube (with a bit of joyful singing from myself), followed by Otis Redding’s That’s How Strong My Love Is and Squeeze’s Up The Junction put pay to that.

Matching birthdays

Mat asked me yesterday what the chances were that if 11,000 one-second-long events occurred randomly across the course of a day, two or more would overlap. Even though there are 86,400 seconds in the day to go at, the chances of none of the events overlapping are phenomenally remote.

To make calculations easier, I assumed that events occur on the second rather than starting at the millisecond level. I don’t think this simplification affects the calculations greatly, if at all.

To work things out, it’s easier to calculate the chances that all events happen in distinct slots, than it is to find out the chances that two or more events happen at the same time; take the former number from 1 and you have the latter.

Anyway, the probability that events will not collide is:

1 – ((86,400!/(86,400 – 11,000)!) * (86,400^11,000))

or generically:

1 – ((X!/(X – Y)!) * (X^Y))

where X is the number of slots and Y is the number of events.

This is so close to 1 that it doesn’t bear thinking about. I can’t calculate it, as neither my calculator nor Excel can cope with such large factorials.

The puzzle is very similar to quite a famous birthday problem. If you ask random people in the street their birthdays (day and month only), then you only need to ask 23 people before the chance of having two matching birthdays is over 50%, assuming that birthdays are evenly distributed throughout the year. The fact that there are slight deviations in birth rates throughout the year only serves to increase these odds.

If you ask 30 people, your chances go up to 71%, 40 people gives you 89%, 50 people gives you 97%, 69 people gives you a 99.9% chance of matching birthdays. At school, I shared my birthday with someone in my class of 26 (60% chance) at the age of 10, but also shared the same first and middle name. Not sure what the odds of that are!

(As an aside, the reason I can remember the number of people in the class is that I just realised that after 23 years, I can still recite the class register for that year: Allison, Aslam, Bywell, Caunt, Cheema, Chitsabesan, Crann, Cullen, Greenhalgh, Halliday, Harrison, Howarth, Jackman, Khaliq, McNeill, Mahmood, Mene, O’Neill, Pollard, Riley, Saughman (sp.), Sutcliffe, Taylor, Tilney, Troy, Verity.)

Kylie, Irene Cara and shuffling

I wonder if anyone I walked past on the Pavement in Clapham could hear I Should be so Lucky or Flashdance (What a Feeling) pumping into my ears yesterday morning? They certainly saw the smile that it brought to my face, amidst those of my miserable fellow commuters. On my Most Played 25 playlist, Tiffany’s I Think We’re Alone Now has just kicked in.

I wonder if people’s setting their iPod/alternative MP3 player to Shuffle as a matter of course is a strong psychological indicator. I would have thought so.

Tesco’s personal hygiene

Tesco’s operating principles are highly revered, such that everyone in the organisation is geared around, and aligned to, its core values.

However, it seems that they’ve missed out on one particular detail: personal hygiene. For the last two days, very early in the day, I’ve been served by someone whose odour can only be described as rancid.

The new M&S TV advert, part 2

It inspires unbridled joy in me. My wife informs me that the clothes on display are dreadful, but she’s completely missed the point.

Today’s emotions

The morning started well. There was a lady who boarded the northbound Northern Line with me at Clapham Common, who was clearly pregnant. The tube was rammed, and I offered to negotiate securing a seat for her. She was genuinely thankful for the offer, but said she was fine standing. Then, when a guy barged on to the train at Clapham North, I reprimanded him, suggesting he be more careful. The lady disembarked at Stockwell feeling pleased. I was both happy for her impending joy at bringing a child into the world, and proud that I’d done the right thing.

Had a meeting with my boss. She was very empathetic and supportive, which made me feel confident and valued.

I enjoyed some banter with a colleague in a meeting, but felt constrained and frustrated at needless bureaucracy and process.

My friend is going through some tough times right now. I chatted to her, and felt sad for her situation, but confident that the tough times will be brief and good times are ahead for her.

And this afternoon, someone tried to close my laptop in a meeting. This made me quite angry.

Finally, I felt despair at the weakness of some individuals in the workplace.

That is all.

Who needs forums when you’ve got a popular blog?

Matt Cutts asks a question about CSS as a post in his blog, and gets 50 comments in response, in the space of 18 hours. Impressive.

I don’t think my blog is sufficiently popular for me to do away with forums just yet…

Dr. Aynsley-Green

It was interesting for me to see Dr. Al Aynsley-Green on the BBC news recently, talking in his capacity as Children’s Commissioner about the failure of the education system on autistic children. Dr. Aynsley-Green treated me at Newcastle’s Royal Victoria Hospital as a child; maybe he should have focused on my mild Asperger’s symptoms a little over 20 years ago. Mild??, I hear you cry.

Short loop across the river

I strained my left calf muscle slightly while running in my new trainers a couple of weeks ago. I think it was down to lack of stretching beforehand, as opposed to the nu shooz. Anyway, my first time back on the road was up in Telford in driving rain on Thursday morning while on a business trip. I followed this with runs on Friday morning and this morning; I’m definitely a morning runner.

On Friday, I did the 6.32km Round Battersea Park run seen here in 28 minutes. I did the 7.28km Short loop across the river run this morning in 33 minutes. I don’t take any technology with me (iPod, heart-rate monitor, watch etc.), so rely on the start and end times according to our analogue clock in the living room; not overly accurate, but it does the job.

I’m aiming to go out three times a week for the next three weeks until the Nike 10km run on 8 October, doing the 9.82km 10km loop across the river run once a week, which I’m currently taking around 47 minutes to complete. (Not sure why, but my maps are not working showing on Firefox; they’re working in IE though. Frustrating!)

If you’ve not yet sponsored me, you can do so from here, all proceeds going to the NSPCC.

The new M&S TV advert

It’s fantastic. It’s completely fresh, one of the models (Noémie Lenoir) is stunning, and the music (my wife reliably informs me that it is Sailor’s 1975 hit, A Glass of Champagne) is inspired. Not sure which agency created it, but I approve.

As an aside, music has become a far more significant element of TV advertising in the last two years.

Next Page →