Thursday, January 30, 2014

Object-Oriented Programming

I guess you could say I am what you call a late bloomer in the slog world any other tech style means of communication other than the telephone). In my defense I did not even start texting until I was older than most of the students presently taking CSC 148.Now that I've joined this perverse overly acronymized quasi style communication, I still do not understand how it can be considered an acceptable manner to converse with someone. Yes, I see how extremely useful it can be for short messages, but come on, if you want to talk to your friend, i.e. more than one sentence, call them and speak, or wait until you see them and tell them what is so unimportant in person. Anyway, I seem to have diverged away from the task at hand upon this 'old man ' style rant. So without further adieu I am writing my (OOP) bit today anyway. Moreover, in the future I will be more diligent in writing the weekly entry within its allotted week.

I will start by regurgitating Wikipedia's definition say about Object-oriented programming (OOP) and then write my own interpretation as (OOP) relates to Python more specifically. Wikipedia says (OOP) is a programming paradigm that represents concepts as "objects" that have data fields (attributes that describe the object) and associated procedures known as methods. Objects, which are usually instances of classes, are used to interact with one another to design applications and computer programs.

If you came from CSC 108 and, or have little to no experience in other (OOP) languages your first introduction into programming probably would have been what is known as the procedure-oriented way of programming where we designed functions and blocks of statements to manipulate data.

Now, we are learning and starting to see that (OOP) will help us to simplify our code compared with a purely procedural approach. Furthermore, with custom classes we can help to guarantee that only valid operations are available in a given instance via their applicable methods helping to avoid mixing up data and functions such that the program's functionality our kept separated by their individual classes.