You probably have to be pretty heavy on the computer-geek side of geeky to appreciate this, but luckily, I am :). "Markov chains" are a way to statistically look at a data set and then try to reproduce likely combinations of the elements that could have matched the similar pattern. It's also useful for doing things like name generation.
Here, the programmer starts with the text to Hamlet and then rearranges it jigsaw puzzle style to see what comes out. Most of it is nonsense, but if you know how to spot the seemingly random bits from the "wow he almost got it" bits, it's fun stuff.