Sunday, 8 February 2015

impressions of tracing recursion

Tracing recursion is my favourite part in this course so far. It is pretty interesting and for me, it is kind of easy to trace the output through looking at the code that is given. Everytime I see the code, thinking that how magical it is that the function itself goes into its own body code. I've seen the slog from http://sl0gforcsc148.blogspot.ca/, and there is a conversation which I totally agree with that goes like this:
       Student: "How do I learn recursion?"
       Teacher: "You have to know recursion to understand recursion..."
In order to understand how the body of function works, you have to understand what the whole function does. And then , useing a smart way with only a few lines to illustrate something which goes to unknown even to infinity

Although I love the way tracing recursion does, there is still one thing I'm worried about. I have no idea how to start if I'm asked to write a recursion by myself. We did the lab exercise in week 4 and there was a part asking us to write a code of recursion which confused me a lot. I know it won't be long to ask us write the recursion code by ourselves, so I still need more practice on that in order to fully understand the recursion part.

No comments:

Post a Comment