Come one, come all! Gather 'round, don't be shy! Bring your mother, brother, sister, father, cousin and neighbour you have a questionable relationship with! Witness the magical capabilities of our latest act - Recursion!
We've been waiting to be offered the deathless death of recursion (yes I'm listening to Hozier as I write this) since last semester's 148 students wrote their second midterm and came out bathing in their tears. Finally, it's here - well, kind of. We've been tracing recursive calls this week, and it really hasn't been all that bad. As far as I can tell, it's the same process as Alice traveling through Wonderland - you keep going deeper and deeper until you reach a turning point where you can't go any deeper, at which point you have to leave with everything you picked up along the way.
Okay, I'll try going the rest of this post without going on too many tangents.
Danny's introduction to tracing recursion was very useful, and it really helped me understand how and why each step was happening. It was very interesting to see how such short pieces of code could produce such long traces, and be so powerful. Not to mention the representation of recursion using the Turtle drawing module was pretty freaking cool. I'm interested to see how recursion is used in application in future classes and labs, and I can't wait to begin writing some recursive code on my own as well.
No comments:
Post a Comment