Saturday, 8 February 2014

Week 5 - Well What Did You Learn?

Not much new this week, with more tracing recursive algorithms. Well, we did learn about scope, basically where Python looks for pieces of code depending on how "accessible" they are. Code can either be restricted to a certain method or function, available locally or made global so that it is defined for the entire file. I suppose that's good to know, for whenever it comes up as well as for tracing code which has this hierarchy.

The lab this week was really useful, practicing coding recursively and going through the process of getting to the recursive insight. Once you understand it and struggle with it, you realize what to do and after that, it seems much easier. For instance, my partner and I spent the majority of the lab trying to do the first recursive code that we were supposed to come up with, tracing out test cases multiple times. After almost an hour, we figured out what we needed to do and got it working. We moved on to the second problem and solved it in under five minutes because it seemed so easy after having spent so much time thoroughly analyzing the code for the previous question.

As for Assignment 1, progress has been... slow. I find it hard to figure out how to implement some of the methods required and because of that I keep stopping after an hour, giving up. I know that the Towers of Hanoi code we analyzed will help sooner or later, but now it seems pointless. Well, how about you? What did you learn from this week's lectures and has it helped you at all?

No comments:

Post a Comment