Friday, January 30, 2015

First Impressions (Weeks 1-3)

In the first 3 weeks of the course, I learnt a lot of new things. We looked at abstract data types (ADTs): stack, which stores items and allows users to remove the top item or add a new item to the top of the stack, and provides a way to tell whether the stack is empty; queue, which stores items and allows users to remove the item that was put into the queue first (the beginning of the queue) or add a new item at the end of the queue, and like stack, also provides a way to tell whether the queue is empty or not. I can see how ADTs can be extremely useful when trying to solve certain problems, and I am hoping that we can have some fun and get an opportunity to play around with them.

We reviewed the basics of how to define a class, which I had learned in CSC108 last term, then we were introduced to a few new things:

  • The property mechanism, which is used to re-direct access to an attribute in a class so that it must use a method. If your code is being used by other people/clients, making changes to your code can be troublesome for them, so the property mechanism will come in handy. 
  • Inheritance, which allows us to create new classes that add a few features to an existing class, but still represent the same sort of thing. This featured in our first assignment in this course. 
Another thing that we learned was how to deal with exceptions. During CSC108 last term, I had noticed that a lot of the functions I was writing did not account for all the circumstances involved, and nobody ever mentioned anything wrong with that, which bothered me a lot. Finding out that there is a way of dealing with exceptions is really satisfying, because I can now see how I could go back and fix a lot of the things that had bothered me during CSC108. 

All the new things we are learning so far seem fairly straight forward, but from assignment 1, I realized that CSC148 is a lot more challenging than CSC108 was. We were not provided any base code, so we had to start from scratch and plan out the entire program ourselves. I found this really overwhelming, and had a lot of difficulty figuring it out, but once I had a plan set in place, I managed to get it done bit by bit. Looking back at the work I did for assignment 1 amazes me and makes me feel really accomplished because the fact that all these lines of code that I had written actually worked properly makes me feel like I am making progress and improving. 

Overall, CSC148 has been really enjoyable so far, and I am looking forward to learning more. 

No comments:

Post a Comment