Shared posts

11 Dec 08:50

Phone Keypad

by xkcd

Phone Keypad

I use one of those old phones where you type with numbers—for example, to type "Y", you press 9 three times. Some words have consecutive letters on the same number. When they do, you have to pause between letters, making those words annoying to type. What English word has the most consecutive letters on the same key?

Stewart Bishop

We can answer that question with the following headache-inducing shell command, which finds all words in a given list which use the same key a bunch of times in a row:

cat wordlist.txt | perl -pe 's/^(.*)\$/\L\$& \U\$&/g' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' '2223334445556667777888999' | grep -P "(.)\1\1\1\1\1"

The winner, according to this script, is nonmonogamous, which requires you to type seven consecutive letters (nonmono) with the "6" key.[1]It's actually tied with nonmonotonic. These no doubt both lose to more obscure words which weren't in the wordlists I used.

Phone Keyboard Sentences

It's rare for a word to have all its letters on the same key; the longest common ones are only a few letters.[2]Like "tutu". Nevertheless, using only these words, we can write a high def MMO on TV, a phrase whose words use only one number key each.

There are plenty of other phrases like this, although some of them are a bit of a stretch:

Typing issues like this aren't limited to old phone keyboards. For any text input system, you can find phrases which are weird to type.

QWERTY Keyboards

It's a well-known piece of trivia among word geeks that "stewardesses" is the longest common word you can type on a QWERTY keyboard using only the left hand.

In fact, it's possible to write entire sentences with just the left hand. For example, try typing the words We reserved seats at a secret Starcraft fest. Weird, huh?

Let's take a look at a few more sentences—written with the help of some even messier shell commands and Python scripts[3]I constructed these sentences by searching text logs for sentence fragments that fit a particular constraint, then randomly connecting those groups together using a technique called Markov chaining. You can see the code I used here.—which follow various constraints:

Left hand only

Right hand only

Home row only

Top row only

And lastly, if anyone wants to know why you're not more active on social media, you only need the top row to explain that you're ...