Wednesday, 22 January 2014

SLog #1: Object Oriented Programming

Welcome to the first entry of my SLog, a student log for CSC148. This week's topic of discussion is Object Oriented Programming. I'll start off by defining what I believe OOP consists of. Object-oriented programming is a form of programming that focuses on abstract data types, the usage of these user-created data types and the interactions between them.

For me, OOP is not a new concept, I've learned to work using OOP in Java in high school and as a result, many of these lessons serve as a review. It was nice to see this come up after taking 108 (which, for the most part, didn't talk about OOP). Even though I have learned object-oriented programming already, it seems that it hasn't exactly become innate. (Explaining this would be much easier by telling a story, so I will.)

Today, I had my lab for 148 and we had to work with classes and, at the end, analyze the efficiency of the code and try to improve upon it. The best idea I could come up could only match the efficiency of the original code, so I figured it was impossible. Our TA however insisted that it was possible and after several minutes of arguing, he told us the answer; that we needed to think in terms of objects, rather than collections. When I thought about it, after he told us, it made perfect sense (sort of) and I was surprised that, after two years of working with Java and objects, that I didn't think to solve the problem with OOP.

Even though most of this material seems to be review, it looks like I still have a lot to learn.

No comments:

Post a Comment