Wednesday, March 2, 2016

Week 7 Entry

For the past few weeks we have talked about recursion, a topic that I am familiar with in high school. However, it is still a fun and rewarding experience to extend my knowledge about recursion in CSC148.

There are several ways recursion is used or analyzed differently in lecture from how I learned it before, but perhaps the most obvious one is tracing recursion. In high school, we don’t tend to have a structured method to trace recursion, rather we often carry the parameter along as we trace the code solely in our mind. For example, suppose we have a recursion that finds the maximum value in a list with depth greater than one, then how I would trace recursion in the old way is to actually take the list in the parameter and goes through the code one by one in my mind without writing down anything until I reach the base case. The downside of this method is I often find myself stuck in a logical loop with complex recursions and unable to keep track of all the small pieces of the parameter as it is being breakdown by recursive calls. Now with the new method taught in lectures, tracing recursion has become easier for me to do.

Another interesting topic about recursion that we have discussed in class is recursive graphics.  I am always fascinated by recursive images because they are complex on the visual, but the actual code that produces these images are often easy to understand, at least for the recursive images I have encountered so far. If possible, it will be really interesting to see more lectures about recursive graphics in the remaining time of this course so I can learn more about how to produce complicated yet beautiful recursive images.

No comments:

Post a Comment