Wednesday, 4 February 2015

Week 5 of CSC148

Hello guys! 

Last week we learned about Recursion in class. It is the process of calling a function in its own body. Why is Recursion important ? It's neater and more concise than simply using multiple loops. 

When we first encountered Recursion in the lectures, I found it to be confusing and complicated but when the professor went over it systematically, it started to make more sense. The great thing about the way we were taught Recursion was that before discussing it, our professor reviewed helpful functions and techniques used in recursive coding like list compressions and all() and zip(). Being aware of the various aspects used in recursive coding before learning about Recursion made it easier to scan through the code. 

Not only that, but the python visualizer has been a great help in explaining to me, step-by-step, how recursive code is processed and used by Python. When tackling a recursive function, I've realized that not being overwhelmed is the key to understanding the code body. And then tracing it step by step, by first using an object with a low depth and then working our way to a higher depth really helps one to understand how Recursion works. 

With enough practice, tracing recursive code has become easier. And for now, those are all my thoughts and experiences with recursive functions for now.
 

No comments:

Post a Comment