Thursday, January 23, 2014

Week 3: Object-Oriented Programming

          I can't believe that it's already been 3 weeks into CSC148. Those weeks have absolutely flown by. As a first impression of the course, it definitely feels like there will be many tears to be shed down the road. Because of the fact that I took CSC108 years ago and that I had no programming background prior to CSC108, it was difficult to quickly learn the new material taught in class.

         In terms of the actual structure of lectures, I am thoroughly please at how Danny introduces new concepts. Although I felt that the lectures, in which Classes were discussed, were a bit hard to understand, I'm glad that students have access to materials online. Another positive feature of CSC148 itself pertains to the Sense of Community that is manifested due the nature of the structure of the course. Peers are encouraged to lend a helping hand, when possible, by posting and answering questions on Piazza. I find this especially useful since I took CSC108 quite a while ago.

          Pertinent to Object-Oriented Programming, I completely forgot what a Class was before e1 was released. Upon reading part 2 of e1, I let out a huge sigh as I didn't understand most of the key words. "Instance", "constructor", "__init__" were such words. However, I was thankful that Danny provided us with a link that explained Classes and the various components involved. In the end, thanks to said link,  I was able to trudge through the exercise without TOO much difficulty.

       It was helpful in understanding the concept of Classes to think of it with concepts that I was already familiar with. For example, I knew from CSC108 that str was "type" in Python and contained many useful methods that can be used to alter strings. One can think of String as being a Class and that the functions defined under this String Class are the methods that we've grown to use and love, such as 'startswith()', 'splitlines()', etc. The most difficult aspect about classes for me personally is the notation. It takes some getting used to to type out lines of code in the format self.name.

No comments:

Post a Comment