Apparently it started back in 2003 but it only came to my attention about two years after that. It’s since been labelled as an internet meme which is interesting because the first time I saw it was on a poster at a train station near London, not on the internet! If you’re wondering what "it" is here you go:

Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn’t mttaer in waht oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht the frist and lsat ltteer be at the rghit pclae. The rset can be a toatl mses and you can sitll raed it wouthit porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.

Assuming you have no reading impairment understanding the above block of text is supposed to be easy, in fact most people (apparently) don’t notice that it’s jumbled until half way through. Here’s the un-jumbled version:

According to a researcher at Cambridge University, it doesn’t matter in what order the letters in a word are, the only important thing is that the first and last letter be at the right place. The rest can be a total mess and you can still read it without problem. This is because the human mind does not read every letter by itself but the word as a whole.

According to Matt Davis, who works at the Cognition and Brain Sciences Unit in Cambridge no such study (to his knowledge) has ever taken place. See his article which covers it all here: http://www.mrc-cbu.cam.ac.uk/~mattd/Cmabrigde/

Anyway, to test this ‘myth’ for myself I wanted to experiment with some more realistic everyday sentences, but me, being so lazy could not be bothered to manually jumble up letters so I did a google search for a ‘word jumbler’ and ‘letter jumbler’. Neither search gave me what I was after so I decided to create a little JavaScript ‘program’ to do it for me.

It was just a bit of fun, not very practical, but I thought it worth sharing…

Have a look »

The Code:

The first component is a function which jumbles a string’s characters:

function jumble(word) {
 
    // Rand function will return 2-part array
    // [0] -> Index of rand, [1] -> random found value (from args)
    var rand = function(){
        var myRand = Math.floor(Math.random() * arguments.length);
        return [myRand, arguments[myRand]];
    },
 
    // Split passed word into array
    word = word.split(''),
 
    // Cache word length for easy looping
    length = word.length,
 
    // Prepate empty string for jumbled word
    jumbled = '',
 
    // Get array full of all available indexes:
    // (Reverse while loops are quickest: http://reque.st/1382)
    arrIndexes = [];
    while (length--) {
        arrIndexes.push(length);
    }
 
    // Cache word length again:
    length = word.length;
 
    // Another loop
    while (length--) {
        // Get a random number, must be one of
        // those found in arrIndexes
        var rnd = rand.apply(null,arrIndexes);
        // Append random character to jumbled
        jumbled += word[rnd[1]];
        // Remove character from arrIndexes
        // so that it is not selected again:
        arrIndexes.splice(rnd[0],1);
    }
 
    // Return the jumbled word
    return jumbled;
 
}

The second component get’s the value of the textarea on each keyup event and jumbles all characters between the first and last letter of each word: (It also has a primitive way of handling simple punctuation)

$('textarea').keyup(function(){
    var text = $(this).val().split(/\s/g),
        converted = '';
 
    $.each(text, function(i,word){
        if(!word.length) return;
 
        // Extract punctuation:
        var puncPattern = /[,\.;:'!\?]+/,
            punc = word.match(puncPattern) ? word.match(puncPattern)[0] : '',
            puncIndex = word.search(puncPattern),
            word = word.replace(punc,'');
 
        // Compile new word, split to array:
        var newWord =
            (word.length > 2 ?
                word.substr(0,1) + jumble(word.substr(1,word.length-2)) 
                + word.substr(word.length-1)
                : word).split('');
 
        // Insert punctuation back in:
        newWord.splice(puncIndex,0,punc);
 
        // Add space after word:
        converted += newWord.join('') + '\u0020';
 
    });
 
    // Inserted jumbled test into receiver:
    $('#receiver').text(converted);
});

So, there it is! You can see a demo of the above script here.

Sorry (I’m not really sorry, STFU if you don’t like it, it’s my website!) about this post being seemingly unrelated to web development but to become better programmers we must sometimes explore random endeavours!