Sunday, 5 April 2015

Last Impressions

Now, when the semester is officially over, it’s time to share my last impressions about the whole introduction to programming course. Even though this course was definitely not easiest one, I really enjoyed it, and, looking back in time, I'm glad that I have taken. 
   
   The first weeks of this course were not easy for me, as I have forgotten almost everything I learned in CSC108 a year ago. However, as time passed by, I began to restore my memories about classes and methods’ implementation. I came to realize that in Python it is very important to know how to implement the class properly, as it helps you control the whole programming process in the future. 
   
    Another important concept I've learned in this course is recursion. Although I am not proficient with it, learning it opened a new way of thinking about the problems for me. Recursion was extremely helpful during the work on assignments 2 & 3, and it was irreplaceable for creating minimax strategy. 

   Sadly enough, we didn’t have the labs during the last four weeks of the course. Before the TA strike, I couldn’t imagine how difficult it will be for me to do without weekly labs and TA’s support. I constantly felt that I am behind the course, and I didn’t have enough motivation to do the lab exercises. Fortunately, the strike is over now, and I really hope that graduate students and the university will be able to come to a mutually acceptable agreement.


   In the conclusion of this post, I would like to thank everybody who helped me in this semester. Special thanks to Danny, who tried his best to make sure that the strike has the smallest impact possible on our learning experience, and was always approachable and ready to help. I’m also grateful to my TA, who supported me during the first 6 labs, and those TA who helped me to complete the 3rd assignment. Finally, I want to wish everybody good luck on the final and in their subsequent studies. Hopefully, we all will pass!

Friday, 3 April 2015

Revisiting Recursion

In one of my previous blog entries, I shared my first (and very brief) impressions about recursion. Today, I would like to talk more about this concept which so far has been the most important topic in the entire course. 

When recursion was first introduced I did not realize to the full extent how significant it will be for this course. First, the idea of calling a function on itself seemed pretty odd to me, but with time and practice I came to a better understanding of how this process works. The exercises with the search trees helped to finally understand that recursion works by executing the main body of function if the stated condition is satisfied, and then coming back to the original state. It took me a lot of time to comprehend how the trees might be traversed with the help of recursion; however, writing functions for assignment 3 was very useful for getting the practice in creating the recursive calls. 

Still, I am not completely comfortable with applying recursion to all the problems I need to solve. It becomes very difficult for me to use it properly, when the recursive call should be used to create the new data structures, such as lists or dictionaries, or when I need to somehow keep the track of the recursion traversing the tree. It is also pretty difficult for me to figure out in which case I should apply recursion. At this moment, I am pretty sure that it is appropriate to use it when nested lists or trees are involved. However, it is not always easy for me to determine at what point in the program I should use the recursive call. For some time in the past, I have thought that the recursion executes only the part of the function that is written before the call. When at some point I realized that the part following the recursive call is also executed, it was a big surprise, which changed a lot of things for me. Nonetheless, it is not easy at times for me to think recursively. When I look at the search tree, in my mind I can automatically count nodes, leaves, and determine the paths from the root to the nodes. It is difficult for me at times to overcome this automaticity and start thinking about recursion processes happening in my cognition. Anyway, I try my best to understand how each function or method I write should work, and where recursion should be used.

As for comparing myself to others, I think that http://dogthatslogsthroughthefog.blogspot.ca/ is a really interesting blog, and the author writes about the course-related concepts much better than I do, but probably has the same problems with recursion.


Concluding this post, it’s worth saying that my understanding of the concept of recursion has improved during the course. However, I really wish I could get more practice with it and be able to appropriately apply it to programming problems.