Thursday, January 23, 2014

Object oriented programming... First post!

Hello and welcome to my course blog. Here is where I will be documenting my thoughts, questions, and experiences with csc148.

The subject of this week's post is object oriented programming, abbreviated to OOP.

What is OOP?

By necessity, different programming languages are designed in fundamentally different ways. One such classification is by paradigm. Wikipedia tells me that there are five main paradigms: imperative, functional, logic, symbolic, and object oriented. In my limited experience, I am only familiar with Python, which is of the latter category. 

OOP languages are characterized by, as their title implies, a focus on virtual objects, and how they interact. In the case of python, these are called classes. Classes are kind of like containers: they contain both functions and data. They are often based on real world objects, or mathematical concepts. 

For example, someone could use a class to model nxn matrices. Inside this class there might exist functions, such as "invert matrix", as well as data pieces like "the identity matrix" which could be useful for operations that use the class.

Another important feature of classes is interaction between classes. For example, python allows multiplication between integers and floating point numbers, despite their being different classes. This is due to something called inheritance. Classes can take on, or inherit, functionalities present in other classes, allowing for more efficient and better structured code.

That is my basic understanding of OOP as it stands. As I go forward in computer science, I expect that my perspective will be expanded greatly.

Weeks 1-3 of the Course

This section is just some personal thoughts about the course so far. I have really enjoyed both labs, as well as the first homework assignment. The pacing of the course is on point as well, at least so far. I'm excited for the first major assignment. 

-Jesse

No comments:

Post a Comment