In elementary school we are taught: a sentence is a complete thought, with an object and a verb. To write thoughts down solidifies it, makinng it concrete. Even if it is wrong, it can be reviewed by someone else and corrected.
In computer science, writing down thoughts may be just as (if not more) important than writing down code.
In my view, computer science is a lot like mathematics, in a sense that it starts off with the most basic concepts: if, for, while, recursion, and ideas stacks on top of ideas on top of ideas. While i am not introduced to the later more complex ideas yet, I do believe that the current material lays a foundation that will become useful in making sense of the material to come. So, why is it important to write (journals)? Answer: to keep track of what you have learned - to solidify your foundation - to have them reviewed by someone who knows what they are doing - so that one day when you are stuck on something more complicated, you can come back to it for review.
If learning is a jouney, writing down thoughts is like drawing a map for yourself that you do not get lost later on.
Sunday, 25 January 2015
sLog 6: object oriented programming
The first few weeks of csc148 were good review. However, I was also introduced to a new concept: Object Oriented Programming. In the past, I have only thought of programs as simple machines that takes in input and spits out something else. Object Oriented Programming is exactly what it sounds like: you use code to create "objects."These objects contain characteristics that are executed by functions. It may only seem like a way to organize code, but it operates with efficiency far beyond that.
An example of such is a game, such as subtract square that our group has already been working on. a super class is a game object (almost like a game console, even though i have never owned one) is a platform which the game operates on. The platform contains atributes which the game operates on. The game itself, Subtract Square, is a module that is attached onto the superclass (the "platform"). Attributes that are common across every "game" (such as: the turn, the score, the game over state) are embedded in the super class (platform) and inherited to every game (module).
Even though not thoroughly covered in class, my curiosity has led to the "why's" of OOP via. google, and there are a few which i found profound:
1. Code reuse. example: since every game has almost the same characteristics, the platform can have multiple games attached to it.
2. Encapsulation (csc207 concept). Hiding code from the next software engineer so that they are not tampering with things that might cause problems. Useful when working in teams.
I believe in education. However, I want to also believe that the techniques I am learning in "practical" courses can be applied within the industry.
In brief, Object Oriented Programming has been taught to me in such a way that i am beginning to understand software development process. It is a concept that I am currently learning to apply in my assignments and I believe will be here for the next few decades.
An example of such is a game, such as subtract square that our group has already been working on. a super class is a game object (almost like a game console, even though i have never owned one) is a platform which the game operates on. The platform contains atributes which the game operates on. The game itself, Subtract Square, is a module that is attached onto the superclass (the "platform"). Attributes that are common across every "game" (such as: the turn, the score, the game over state) are embedded in the super class (platform) and inherited to every game (module).
Even though not thoroughly covered in class, my curiosity has led to the "why's" of OOP via. google, and there are a few which i found profound:
1. Code reuse. example: since every game has almost the same characteristics, the platform can have multiple games attached to it.
2. Encapsulation (csc207 concept). Hiding code from the next software engineer so that they are not tampering with things that might cause problems. Useful when working in teams.
I believe in education. However, I want to also believe that the techniques I am learning in "practical" courses can be applied within the industry.
In brief, Object Oriented Programming has been taught to me in such a way that i am beginning to understand software development process. It is a concept that I am currently learning to apply in my assignments and I believe will be here for the next few decades.
Subscribe to:
Posts (Atom)