Wednesday, 27 January 2016

Week 3 - It Begins

     This blog will detail my journey through CSC148. It will consist of weekly postings discussing the topics covered in class and my take on them. Let's get started.

Weeks 1-3
     This course is a nice change of pace from "Introduction to Computer Programming". While 108 was focussed on basic coding concepts and python syntax, 148 introduces larger concepts.
     So far we have started with object-oriented programming: objects, encapsulation, inheritance and composition. Coming from a high school background in Java, these concepts are familiar, but there is some "culture shock" looking at how they are implemented in python, specifically encapsulation. Java is very strict about which parts of the program can see what, whereas python has a more lassez faire approach: private variables are not hidden, the client is simply expected not to directly modify them. This was mildly disturbing at first, but then I realized that it was essentially the same thing in practise (and apparently private variables in java aren't so private anyway). I still feel that on large, messy, built-up projects it could cause some frustrating debugging, but I suppose that just reinforces the need to always have good style. Once I get used to the changes, programming in python will probably be much more fluid than in java, and little shortcuts like properties and list comprehensions bolster that.

     Practical knowledge that allows us to implement OOP and ADTs is useful, but my interests are in the theory behind them as well as the algorithms that we'll be studying later in the course, so my future posts will be more detailed.

No comments:

Post a Comment