Friday, 31 January 2014

Excepting, Inheriting, Composing, Recursing

Exceptions

Exceptions seem to be solely for the convenience of the users, allowing them to know that something is wrong with their input. It's something that requires some out of the box thinking on the part of the programmer to correctly predict what kind of inputs users are likely to make as the programmer's testing of the program usually involve correct parameters.

Inheritance & Composition

This is quite straightforward. Inheritance allows one to append their own methods to existing classes, update the obsolete methods of the old classes, etc while making citation of non-original material a breeze. I believe that composition is like using the import function while inheritance actively overwrites the parent functions unless super() is called. One of the keystones of object-oriented programming as it gets rid of excess code and serves as a basis for further development of the program.

Recursion

I think this is a topic that's hard to visualize without it written down step by step. Everything is done almost backwards as you start from the inside and progress outwards. The examples and exercises themselves haven't been too difficult to comprehend just yet, but I feel that it will become mind boggling with real world examples or something similar.



No comments:

Post a Comment