Sunday, 1 February 2015

WEEK 4 - First Impressions

Well, I guess you can say that these first weeks were a little hectic - mainly because our first assignment was due this week. Before I get to talking about the assignment, I should probably discuss the material we covered so far.

The first week was essentially a review of the last weeks of CSC108. We looked at the construction of classes, which was straightforward. The second week of class was when we began to look at new topics. While I was familiar with the method __str__, we learned the difference between __str__ and __repr__. Both are very similar as both return string values. However, we learned __str__ returns a string version of self, while __repr__ returns a string representation of self which evaluates to itself. We then talked about Abstract Data Types (ADTs), which include lists, dictionaries, and stacks. As far as we're concerned, we do not necessarily focus on the implementation of these ADTs, but rather what they return and how we call them. The same week we looked at privatizing variables and functions. We do this by adding an underscore ('_') in front of the variable/function. This was completely new to me and surprising as I thought that all code was privatized. To end the week, we looked at another topic that was discussed in CSC108 which was unittests. As you can see, the pace picked up in the second week. The third week was all about inheritance, raising exceptions, and list comprehensions. Inheritance is essentially creating a superclass and giving all its attributes to a subclass. Raising exceptions allowed us to inform users whether they have done something wrong, such as raising a NotImplementedError. As for list comprehensions, we were basically taught about a for loop that is used for lists and can be written in just one line, which is very useful. If you want the topics in detail, I suggest referring to Timothy's sLOG. It is well detailed and quite amusing. In the end, all of these topics came together for Assignment 1.

Honestly, I found the first assignment very overwhelming. We were given the assignment early on in the semester and once I opened it, a boat load of information came hurling towards me, but I picked out the information that was related to the assignment and found it reasonable (as I thought). I thought I could get it done in the first week, but I realized that I needed to learn new material. Even with the new material we learned, the assignment was very challenging. The information provided was very abstract and ambiguous, which I found odd since CSC165 was all about precision. We were given the opportunity to do whatever we needed to do as long as we met the requirements. This was fairly stressful since I was usually given starter code in CSC108. All of these factors attributed to the difficulty in completing this assignment, However, after rereading (and rereading and rereading) the assignment, going on Piazza, and visiting office hours, a lot of key information was given and specified a lot of confusion I, and the majority of people, had.

1 comment:

  1. The assignment was pretty challenging, I agree, but you came out of it with a much better understanding of what it takes to design and implement software from scratch, with nothing more than a set of requirements and your knowledge of Python. Trial by fire!

    ReplyDelete