Sunday, 22 March 2015

SLOG: Week 10 REVISIT

This week we need to revisit one of our earlier SLOG posts.

http://myanacondadontpythonista.blogspot.ca/2015/02/slog-week-5.html

In this post, I talk about the importance of recursion how powerful it is. Even now as I look back at my post, I know exactly what I mean when I say "programmers use it on a daily basis" because of how much I've used it to make the functions in my assignments properly accomplish their tasks. Without recursion this would have never been possible. A prime example is the Minimax function in assignment two where the function checks every possible game state and then makes a move based off of which game state leads to a win. Though it may have been possible to make this function without recursion, it would have been very tedious and inefficient. Recursion simplifies the task as well as the amount of code we need to write and most importantly, it gets the job done.

In Ivan's blog: http://ivanslog148.blogspot.ca/ I found that he had the same view as me in the importance of recursion. It's really nice to know that I was not the only one having trouble with recursion back then and it's very inspiring how he had no experience with recursion but still managed to solve a question that had taken me an hour or two to complete.

I still agree on the fact that coming up with an algorithm for recursively calling functions is a bit tricky however, after weeks of practice and experience with recursion, I am nearly 10 times more confident in my ability than back then and I now feel as though I can find a recursive algorithm for anything given enough time.

All that is required for recursion is to simply find base cases that end the recursive process and what to do when the base cases are not satisfied aka the general statements.

At the end of the post, I also talked about how I should have prepared more for test one. This is something I definitely agree on for tests in general. Like I said, both studying and sleeping is very important which is something I will definitely do for the exam considering I only took half my advice for test two.

No comments:

Post a Comment