Thursday, 3 March 2016

Week 7 - Recursion

I've been familiar with recursion since early last year, and although it doesn't often come up in my work, it is incredibly satisfying when it does. Of all concepts one can learn early in their programming education/career, recursion opens up not only countless possibilities with respect to various recursive data structures, but also can facilitate some unimaginably elegant solutions.

Personally, when I first learned recursion it seemed almost magical. I was taught to never try and trace the program, but instead rely on constructing robust base cases, and sound logic in making the recursive calls. The end result of these two major keys (anotha one), is code that is concise, elegant, and WORKS (the latter of the three often occurring to your own pleasant surprise). The magic hasn't faded to date.

Successfully implementing some recursive code is not only very satisfying, but it also gradually cements your understanding of the concept. Mastering recursion can be a powerful milestone in becoming a more efficient and effective programmer.

No comments:

Post a Comment