csc148h1 slog
Home follow +

運命なんてくそくらえ

heyo.

A collection of thoughts and responses to things learned in CSC148H1 at UofT. Feel free to browse and comment ^^


Saturday, January 25, 2014 @ 8:12 PM
1 +
Week of January 19, 2014: First post and object-oriented programming!

Hi everyone! This is my first post, so I'm not sure of how it should be written but I'll give it my best shot. Any questions, comments, or suggestions for improvement can be posted by clicking the large "+" sign beside the post title (yes, the layout is a bit annoying).

Today, the assigned topic is object-oriented programming, which I think is a simple concept that is difficult to grasp for people learning introductory programming like me. I've seen the term "object-oriented programming" frequently mentioned in Python courses and webpages in passing, but I had never understood what it was exactly. In hindsight, it was probably because I hadn't been exposed to enough programming to understand.

Perhaps what I had most trouble with was what a programming paradigm is. OOP is a type of programming paradigm, but as someone with very little programming experience, I had no idea that there were different styles of programming. It was only after classes were introduced that it became evident that programs could be written in a way that didn't involve writing a step-by-step process that executed from top to bottom (by the way, this is what is called procedural programming). And thus, I understood a bit more of what OOP was, but not entirely.

Luckily, I have a friend who programs for a living, so I asked her. Her response was something along the lines of: with procedural-programming, you have to write code to perform a task step-by-step, whereas in OOP you make objects like classes that work on their own. This helped a lot actually, because I realized that things like list and int and and str were all built-in classes and they were really useful in that they could store data along with the properties of the data. A youtube video also helped:



I liked how the video compared objects to objects in real life that can function as little machines; it really emphasized the organizational benefits of having properties assigned to each type of data. In addition, when it mentioned that procedural programming used a lot of functions and variables that can get messy, it very much reminded me of how I felt with the more complicated assignments I had to complete in a procedural style - those programs got very messy very quickly. It certainly seems like OOP would help with that a lot.

At this point, I think I've developed a bit of intuition from what OOP is and how it differs from procedural programming, but I wouldn't that I'm entirely comfortable with the idea. I definitely see the usefulness of classes in that they can give different types of data different properties, but I do hope that future assignments will show me how classes can be implemented in ways that are clearer and more efficient that the procedural methods we learned in CSC108, the first introductory course.

Thanks for reading! I'm off to play Pokemon now ^^
- Belinda

Older Post