Wednesday, 29 January 2014

Inheritance

Folks,

We covered a lot of new material this week, but being UofT, of course none of us actually have anytime to completely familiarize ourselves with any of it!
But jokes aside, the idea of inheritance and recursion are so incredible!
With respect to inheritance, I think one would need to be very careful using this in an industrial strength code. It's very easy to see how inheriting a class that was defined 10,000 lines of code and then using it could seriously screw everything up. Though, I do believe that it is a Python particularity which allows for manipulation of inherited attributes/methods.
As for recursion! Such a time saving tool! It takes me a bit of time to trace through the program the first time till I am satisfied with my understanding of it. But once that is done, even a 7 year old could understand. Just copy-shrink to a smaller version-paste.

Cheers,
Slogging Along

Monday, 20 January 2014

Object Oriented Programming




Initially OOP struck me as a waste of time! Why were we learning about one particular programming paradigm amongst many other equally valid ones? Why weren't we learning more about actual programming. Some interesting Wikipedia reading  later though, it is apparent that OOP is the pre-eminent programming paradigm in industry if not other applications. As a result to be a competent Computer Scientist I would have to at least understand the basics of the most popular paradigm in development in industry.

I had some trouble understanding the self convention in Python when designing classes. The idea was in general hazy.However, a 10 minute trip to Danny's office hour managed to clear that up. He explained that the purpose of self is so that the particular attributes/methods of a particular class are assigned to that particular instance of the object. I'm still just getting comfortable with the idea.

As an aside, there must be a better way to get personal help than office hours! It took me 20 minutes to walk to BA, then another 35 minutes waiting for the people before me to finish their turns and finally another 20 minutes to walk back to my class. More than an hour wasted for 10 minutes of explanation time. 
Would it be possible for Instructors/TAs to post youtube videos to what are trending to be popular areas of poor understanding amongst students?