I’ve thought of a great way to manage my aversion to recursion. I’m going to write a simple and cute NON-recursive program to generate the insomniac bunny story—you know, “Once upon a time there was a Baby bunny who just couldn’t fall asleep, so Mommy rabbit read Baby bunny a story about a Baby bear who just couldn’t fall asleep so Mommy bear read the Baby bear a story about …,” and so on until you finally encounter a story in which a baby animal falls fast asleep, and sure enough the stack unwinds, and Mommy rabbit finally gets some sleep. THEN I will write a recursive program about a programmer who just couldn’t bring himself to deal with recursion, so he wrote a program about a programmer who—Oh, never mind, I need to get some sleep first.
It’s been a long and lovely day.
0 Comments
|
Capt. PeteWhen Peter is on land, he develops curricula for teaching Computer Science to all high school students via coding elementary apps in multiple professional development environments. Archives
December 2017
Categories |