How did that take a couple months? Even in R's slightly awkward language, random walks shouldn't be very difficult! I'm baffled, I must be missing something.
Writing the code did not take him several months; that's just the period of time he utilized this code. During that time, he tweaked it for evolving requirements. What took a couple of months was the path to his epiphany.