Monday, 2 March 2015

Week 7 Summary of Recursion

"It seems very easy!"
 Yes! That was my first feeling when I just learned the recursion in the lecture!
 Since a few weeks struggled with topics that professor taught during class, I was strongly  not confident about what was going on and whether I could understand new stuff.
 The presence of Recursion changed my mind at beginning. It showed to be not hard initially, we just needed to know the steps it  worked through, just put new data in the same function again and again until the final result was gotten.
 I actually became relaxing and assumed I understood recursion very well and pay little attention on it. This always happened before the bad things, and bad things indeed took place.
 The 5th tutorial quiz, which concerned about how to construct a recursion function, was the worst one I had ever did. I could predicted my bad score when I was doing that quiz, because I completely had no idea after I looked through the question.
 I treated it to be a serious problem, and I started to rethink about recursion-- What is the recursion and what is the purpose of using it?
 In order to get answer I went through the notes posted on the course website. It gave me a clear direction.
Recursion is a great problem-solving technique that split big problem into small parts and solved each part individually and finally combine all results together.
 Programmer use it because it make complex problems become simpler and make both codes and logic become more clear and easier. There were no doubts that tracking recursive functions was not hard, but how to write one is a big issue.
 As I was totally losing at beginning, I started to think why I could not find a way to solve it. Then I started to consider examples given in the lab handout and those during the class steps by steps, and summary the general pattern and conclude purpose and the role of each step. It was extremely helpful and after a few hours of after class practice, I realized that I was over-thought before.
 When I was handling handout 5,  as the result of lacking necessary knowledge, my logic was a complete mess. I had an illusion which always told me that I must missed some minor situations that would cause the function fail if run it. Then all I did was trying to think about all situations the function might meet and, of course, confusing myself and make the problem become more sophisticated.
 If I looked back now, I may think the problem was quite easy. I just need to find out when the function needed to call itself and in what form, then I can solve it.
 Sometimes problems were not so hard to solve, but it also will not be very easy. I need to be careful with each topic and its content even if it may show to be simple. Alternatively, I plan to do more after-class practice about recursion to solidify concepts, and so I could be familiar to use it when handling with Tree(General Tree and  Binary Tree) and finish examines as well as I expected.