Saturday, 28 March 2015

WEEK 11 ~ Looking Back...

     


   
     One more week and we are done! In the past ten weeks we have covered these topics:

1. Abstract Data Types (i.e. general concepts of built-in functions, methods, graphs, queues, stalks.)
2. Classes and Subclasses (i.e.  general concepts of OOP, inheritance, special methods)
3. Test Cases (i.e. doctests, unittests, assertions, raising errors)
4. Intro to Recursion (i.e tracing)
5. Intro to Tree class and methods (i.e. general concepts, BTNodes, implementing recursion)
6. Binary Search Trees (i.e general concepts, inorder/preorder/postorder)
7. BST Mutations (i.e insert and delete methods)
8. LinkedLists (i.e. general concepts, LTNodes, iteration, mutation)
9. Sort methods (i.e. bubble sort, selection sort, insertion sort, quick sort, merge sort)
10. Raising Errors (i.e. NotImplementedError, AssertionError)

     Looking back I realize I know more conceptually than I do when I start implementing it in code (as seen through doing the labs) and this discrepancy has been consistent throughout the term (thus the quote above by Donald Knuth). In fact, I need more practice in a bulk of these topics strictly because of my overconfidence that I understand the concept. Every week I have been telling myself enough practice will help me improve - which it has - but without help on the labs it's been really hard to keep up. My answers differ from the one's in the lab solutions and, often times, from the answers taken up in class. The only advice I have for myself at this point is to continue doing as much as I can alone and then asking for help when I am really stuck.

     Particularly, my biggest problem is still recursion. Between weeks 6 and 7 I thought I had finally nailed recursion after doing the labs and class exercises on my own but as the weeks went on and the BSTs and LinkLists got more complex I started to get stuck on recursion again. I did refresh my knowledge of recursion, trees, and general classes before our second midterm on week 9 - which I had some confidence going into (having made silly coding mistakes here and there) - but without our marks for that test and the last assignment I do not know where I am at. Some of the topics above have been covered in Intro to Programming last semester but this course is a big jump from that.

    I've noticed - from reading other blogs - that I lot of other students have also had a hard time with the assignments as I have and have consequentially spent more time working on the assignments than on lab exercises. It has also been hard for the bulk of us to work without the help our TAs because of the strike, but I still do recognize that a lot of students work together outside of class to get work done. This is something I should consider doing because I've mostly been working alone this term and nevertheless I do see that I improve when I work with others.

     On that note, I'll end off by saying that we are at the last stretch of the course and if there is any good time to make a change in personal work ethics it is right now. It's worrisome to think the course is pretty much over and this last assignment and exam is the my final chance to bring my marks up. Nevertheless, I'm sure we can all do it.

     Cheers

Sunday, 22 March 2015

WEEK 10 ~ Assignment 2 Overview & Assertion

     The second assignment was taken up this week and we were able to see examples on strategy minimax. This helped clarify the bugs we were having trouble with when we were doing the assignment. It did help to take it up in class instead of just the feedback online because other students got to ask questions and share their ideas about their strategies.

     In addition to reviewing the assignment we were also introduced to the assertion which, when used well, can help make coding and debugging easier. We implemented assertion on previous functions which helped show it's practical use to an extent. I will still need some more practice debugging and a bit more clarification on how to implement it before I start the assignment.

     Cheers.

Saturday, 14 March 2015

WEEK 9 ~ BSTs & LinkedLists

     

     Working with BSTs and LinkedLists are actually quite interesting. I noticed from doing the labs that there are many ways for iterating over the same trees and still getting the same results. However, this also means that the order in which the trees are iterated over effects the order of the results. This part was a bit challenging for me when working with BSTs. It was challenging for me to return the nodes of a tree in order from smallest to largest (or vice versa) without using the sort method. The only method I can think of is iterating over the nodes until the smallest is found (and then returning it in a list) and then re-iterating over the tree in the same way until all the nodes are listed from smallest to largest. 

     For LinkedLists it was a tad bit harder than just working with BSTs. This is only because we are working with two classes at the same time; LLNode and LinkedLists. Being able to add in new nodes using LLNode is helpful but I still tend to mix up some of the objects between the two classes (self.value and self.data). 

     Nevertheless, there are so many ways to mutate a LinkedList and I hope to be able to master the techniques shown in class for this week (i.e. insert and delete). 

     Cheers
   
     P.S It's the ultimate Pi Day today!!! 3.14.15 !!!

Friday, 6 March 2015

WEEK 8: Here We Go Again...


     Okay, this week did not go as planned. I hoped to be able to finish my work early and review lecture material so that I can do this week's lab. Unfortunately, that didn't work out. Instead, I gave most of my attention to the latest assignment that was due yesterday. My partner and I didn't meet the assignment requirements thoroughly but we got as much done as we could with the time that was available to us. Next week is the last midterm and and I hope to improve my mark for that.

     Only four more weeks of classes left and I hope to make the best of it. The work is piling up between all my classes so time management is key. First things first, I'll do this week's lab and then start reviewing for the midterm. 

     All the best to those in the same boat as me. Hard work pays off. 

     Cheers