Pretty Handsome Scramble

So, when we started Pretty Handsome Nerds we wrote a manifesto. In this manifesto was guidelines for us and things we needed to think about and stick to as a team. Part of this manifesto was supposed to be quite nerdy to further enhance that we are nerds in our own fields, so we wanted to write part of it scrambled. Since the brain has the ability to actually read scrambled text as long as the first and last letter are in the same place.
As we were talking we decided that instead of scrambling it by hand we could just build a tool that scrambled text for us.

A few moments later you could read:

In the world of Pretty Handsome Nerds things are often upside down, but always make sense. That is why we created a Pretty Handsome Scramble – an ultimate tool for future communication that‚ we hope, will become a language one day. A Pretty Handsome Language, that is.

 

The site uses javascript to scramble the words you type by this code.

function scrambleString(string) {
	var arr = string.split(' '),
		result = new Array();
	$.each(arr, function(index, word) {
		var len = word.length;
		if ( len > 3 ) {
			var newWord = word,
				i = 0;
			while (word == newWord && i < 5) {
				newWord = word.substring(0, 1) + word.substring(1, len-1).split('').sort(function(){return 0.5-Math.random()}).join('') + word.substring(len-1);
				i++;
			}
			result.push(newWord)
		} else if ( len < 4 && len != 1 ) {
			if ( Math.random() > 0.5 ) {
				result.push(word.substring(0, 1) + word.substring(1, len-1) + word.substring(len-1));
			} else {
				result.push(word.substring(len-1) + word.substring(1, len-1) + word.substring(0, 1));
			}
		} else {
			result.push(word);
		}
	});
	return result.join(' ');
}

Simple but elegant.
We also made it possible to share the results on Facebook as soon as it was scrambled.

More images

Pretty Handsome Scramble