A million monkeys and Hello World

Got bored the other day and was scrolling through /r/ProgrammerHumor.  Seems they’re going through a Hello World phase, and a couple of the posts we talking about the Million Monkey theory.  Basically given an infinite number of monkeys typing on an infinite number of typewriters, eventually you’d get Shakespeare; or in this case Hello World.

So here’s mine.

Originally I was going to create a random string of up to 99 characters using all letters, upper and lower; numbers; and spaces. Gave up on that and just created random strings of 11 length – the number of characters in “Hello World” and only using “Helo Wrld”. Even then it still took 100,138,326 iterations to randomly build Hello World.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *