Wednesday, 22 January 2014

Introduction and Object Oriented Programming

And so begins the computer science blog. This will, by no stretch of the imagination, be a blog full of substantial, life changing material, but it should suffice to talk about my endeavors in the field of computer science.

To be entirely honest, I did not at first make the connection between OOP (Object Oriented Programming) and the use and creation of classes in Python. Because of this, I had a brief moment of confusion. However, after a short bit of clarification, I was back on track. In my previous computer science course from last semester, we had covered the subject of classes briefly towards the end, and so I was able to understand it in a relatively simple way. However, due to the break, and the small amount of work that we actually did on this topic, I was rather rusty by the time that I started back up again. As far as rustiness went, I had simply forgotten things like how to initiate a class, or how to use the methods made within a class. After re-reading some of my older codes on the subject though, I was able to get rid of that rustiness. They were mostly simple things that I has forgotten, like adding the () at the end of a method call, or including self in the construction. However, simple or not, they were still incredibly important to include, and so it was good that I remembered these things without too much trouble.

Something that I noticed though once I was back on my feet with the creation of classes and OOP, was that I was not entirely used to calling upon the methods of my own classes. This became apparent in our first exercise, and in the first lab, and so I had to fiddle around a bit in order to finally get it working. It soon came to light though, that this problem had arisen from the fashion in which I was trying to type it up. Once again, they were simple mistakes, like a misplaced (), or improper words or letters used in the call, and once again, despite its simplicity, it was entirely necessary to get it right.

Fortunately though, as I am now while I am writing this blog, these problems seem entirely trivial now. During the second lab, which was quite recent, I found that none of these issues arose, and so I can confidently say that I have learned more about OOP. I have even learned a little more about stylizing and shortening code through this experience. I found that most of the code that I was writing was excessive, and included too many things, adding to complexity, and therefore, increasing the probability of the code cropping up and making an error. So now, I try to make an effort in order to shorten and simplify my code, so that I can avoid any messy errors.