Thursday, 23 January 2014

The First Blog Post of my Life

    As the title suggests, this happens to be the first time I've posted anything personal about myself (aside from my extremely gorgeous Facebook photos) on the internet, so introduction is in order! For those who already know who I am, congratulations on finding me staff of CSC 148! For those who don't, while I won't tell you my real name, the monicker of 'Sparkles' will suffice. Before talk of the extremely interesting subject of inheritance of classes by other classes, how to properly create instances of classes, and re-write those classes to work together in blissful harmony, as well as many other equally blood-pressure-increasing subjects, I would like to end this sentence in a non-sequitur.

    Now on to object-oriented programming. While I believe myself to be a semi-competent pythonista, one specific part of python never quite clicked with me: classes. Anything to do with classes. The making of a new class, the writing __init__ or __str__ statements,
Programming on a ridiculously oriented object
using self.function to call a list etc. never got through to me in CSC 108. But in CSC 148, the idea of inheritance made the as subject clear as day to me. To see how a class actually obtains its properties, and how it simply just has the same functions as the superclass, as well as any new functions you want to add showed me how simple creating a class can be on python. When I made classes in 108, inheritance from the default object class was never explicitly shown, so I didn't understand how things happened. But seeing it actually happen gave me a base of how classes are created, allowing me to relate it to how I would make my own class.

In addition, the idea of recursion, while not fully understood, has become a lot clearer to me since I first learned it. The idea that, while defining a function that you can call the function perplexed me. How is something like that possible? Wouldn't that be like just calling the function infinity times? It turns out most of my confusion was that I didn't understand what a recursive function was meant to replace; a for-loop. Once this became clear, the idea that a recursion could be infinite seemed preposterous to me; only a mistake in coding could possibly result in something like that because there would always be a definite end-point. The one example that I found on Youtube that convinced me of this was a simple program used to count down to zero where the function would call itself, with the input minus one each time until it reached zero. The example presented in class however, seemed much more confusing as it was just a return statement calling the function itself.

    In conclusion, the end the introduction to the mind of this simple CSC 148 student, I pose the following idea :if something seems too complicated to comprehend, it is not because the thing itself is complicated, but rather because the complex idea had not been broken down into its simplest, fundamental parts.