Friday, March 21, 2014

Recursion,Trees and Towers.
Last time around, I was having trouble coming up with recursive solutions and figuring out where exactly it could be used. Now, with the introduction of trees and linked lists, it's becoming easier and
easier to implement recursive code and come up with it all on my own.

The first assignment was mostly simple, except for the last part where we were to implement the way to move the cheeses the fastest. I had some trouble with this, but after a lot of experimenting and referring back to code presented in class, I was able to come up with what I thought was a working solution. It only passed two of the tests on the marker, and was not at the optimal number of moves for higher cheeses, but I'm happy with our performance overall as all tests passed for TOAHModel.

Trees and linked lists were completely new to me. Without the weekly labs, I think I'd be pretty lost on the subject overall. The basic concept of a tree was easy enough, but the implementation of it in python felt foreign to me. However, as with all other things in programming, the more I practiced with them the easier I got. I was certain I was proficient at a decent level when I was able to complete Exercise 3 relatively fast, albeit I only passed two tests, because of a silly naming mistake, that I found shortly after submitting it.

I'm glad we're getting so much hands on practice with these new concepts, as they've helped me get  a good grasp on these new data structures, as well as recursion through repetition. 


Sunday, February 2, 2014

Recursion
This is probably one of the more confusing topics I've had to tackle. Though the concept was easy; call the same function within the function, it was difficult in practice. Even after looking through numerous examples I had a hard time figuring it all out. Though tracing it wasn't all that difficult, which we did repeatedly, it was hard to imagine coming up with a recursive example on my own and how I might go about implementing it. In addition to the recursive material presented in class, it took several youtube videos for me to have a firm grasp on the subject. I feel somewhat comfortable with the topic, but still feel as if though I might run into trouble when trying to implement these functions. 

Wednesday, January 22, 2014

OOP - Objected Oriented Programming

Fortunately this course was not my first time tackling OOP. I learned Java in high school, and while I didn't fully grasp the concept of OOP at the time, I was able to follow along. However, this prior experience was a great help in understanding it this time around, because some parts were review, and gaps I had before were filled with concepts I learned now.
OOP revolves around classes. As far as I can tell, this makes it easier for everyone that interacts with the code. The ability to just spawn a child class which inherits all properties and methods from the super class makes it convenient and easier to add on to programs. I guess this follows 2 of the 3 'principals' that Prof. Heap was talking about(Laziness, Impatience, Arrogance).
Thinking of classes as blueprints is perhaps what made them the easiest for me to understand. It's real easy to figure out the real world applications when I think of it in this way. Employees, Students, food items at fast food restaurants; they're all just instances of classes with a variety of attributes tied to them.
In order to back up my understanding of the concept I jumped on codecademy.com and played around with their exercise that had to do with classes. I find this practice invaluable as it helps me discover common low-level mistakes that I make, so I can avoid making them in tests/exams.