Tuesday 11 February 2014

Week 4 - Recursion



This week we started recursion. As I guessed in my last post, recursion turned out to be quite complicated. The week is already over and I'm still struggling with the basics of recursion.

The main difficulty I am facing is to trace how the recursive call in a function works its way through to the base case. Thus, I’m not being able to write such functions of my own. However, when someone explains it to me, I seem to understand.

To be honest, I am kind of worried about this since I didn’t get to successfully write a single recursive function by myself till now. The worrying factor is that, the final part of Assignment 1 (which accounts for approximately 30% marks of the assignment) is based on recursion. And not to mention, there is a test coming up soon.

I am not too sure about how to get a grip on this topic. I will go through the lecture slides again and rewrite some of the functions that Dan showed us in lecture. I believe this will help. I’m also going through my course mates’ SLOGs. So far, this week’s post from http://csc148enthusiast.blogspot.ca/ seemed to help me a bit.

The only success this week was to successfully understand and complete most of Assignment 1 (i.e. the TOAHModel and the ConsoleController classes). This was a big relief since I was quite confused and worried after reading the assignment handout last week. However, so far I found Assignment 1 quite interesting after I figured out what methods to add in the TOAHModel class. Implementing the methods wasn’t too difficult after going through the initial difficulty of identifying the missing method headers. ConsoleController didn’t seem tricky either, except from thinking of the different kind of “wrong” inputs the user may enter.



There is not much positives to take from this week, so I’m trying to motivate myself from the “success” of completing most of Assignment 1.

Hope, the coming week is a great one!