Tuesday, 21 January 2014

Object Oriented Programming

     In 108 there was a video called "object oriented python" or something like that. After watching that weeks video my first thought was that I hope this is over soon and we can go back to loops and other normal stuff. I just wanted to learn whatever was required and move on, so I didn't pay too much attention to it. What I failed to realize was that it would come back to haunt me, and in fact, be such an important part to programming. Professor Heap mentioned that the three cardinal virtues of a programmer are: laziness, impatience, and hubris. And object oriented programming is one of the many ways programmers maintain those virtues. However, it is so complicated I have to follow the exact opposite of the three virtues in order to solidify what we've been learning in class.
     For example, subclasses! I understand how to make a subclass, and that its like a child in that it inherits everything from its superclass. I also understand that they are an efficient method of specializing the original code, but what I don't understand is why certain subclasses are never reached...or maybe thats only for exceptions. Sometimes when you create exceptions as subclasses to other exceptions and the original superclass, certain exceptions are special cases where that code is never reached. I need to make use of my resources over the next few days and figure this out....answers coming soon.

No comments:

Post a Comment