Sunday, January 24, 2016
First Two Weeks In CSC148
Before taking CSC148, I have heard from my CSC108 professor that 148 is all about object oriented programming. In my three and half years of programming experience, object oriented programming (OOP) is something that I always adore because of how it makes programming so much easier. As we learn in the first two weeks of lecture, OOP is basically about writing a class and using the instances of class as part of the program. This reminds me of my experience when I first encounter OOP. In grade 11, my computer science teacher asked us to design a game as the final project for the course. I was struggling for a brief amount of time because I had difficulties come up with a way to handle multiple pieces of data that have the same attributes. And when my teacher introduce my OOP, I was astounded since it not only made my code much cleaner but also it was way more efficient. Thus, I am really excited to learn more about the techniques and algorithms that can be use with OOP in CSC148. So far what we learn in the course is basically what I already know about OOP, especially inheritance. The reason why I am so interested in inheritance is because it eliminates abundance of repetitive code, and in the lecture, this is also what the professor suggests. One small problem I have with one of the topics we discussed during lecture is the data encapsulation in Python. Since the major language I use is Java, I don't really like the way Python handles private variables. For me, the variable is not actually protected in Python because we can still access it directly even after we set the property of the attribute. In addition, I am confused about how to make an attribute private in python at the beginning but after reading the course note I understand does the function property() works now. Finally, my goal in this course is to get more familiar with recursion. In high school, my teacher only introduce recursion in a shallow depth, and I am not very good in writing recursion so I am hoping to see what I can learn about recursion in CSC148.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment