Calvin's Train of Thought

Typing Like A 13 Year Old - October 17, 2014

Kid Type ScreenshotHave you ever noticed how – on Facebook – young teens and preteens type like they are trigger happy with the shift key? You know, when they type like this: “Hello eveRYbodYi AM now writIngLIkeiAm ThIrTEeN And amTrigGerhaPPYwiththe ShIfT kEY”. From time to time, I like to tease such kids by imitating them. But – amazingly – for someone with years of experience in typing properly (read: not trigger happy on the shift key) this is very difficult.

Today in my programming in C class, we were given the challenge of writing a program that would take a string input and then output the number of each letter that was input (e.g. A: 2 B:3… etc). In the process of doing this, I used “toupper()” from ctype.h to simplify the process of evaluating the contents of the string by converting everything to uppercase first. It then occurred to me: with a couple of modifications, I could make this program randomly choose whether a letter is upper or lower case, whether or not to include punctuation or spaces… I could make a program that would convert any string into a string that looks like it was typed by a thirteen year old who is trigger happy on the shift key. [Source code removed due to file corruption]