I tried to code up Markov chains when I was first learning to program but I found that many resources didn't have clear/terse enough code snippets. Most articles also didn't walk you from zero to understanding.
So I'm trying to fill that gap and help out anyone who is trying to learn the basics.