Monday, 23 March 2015

Week 10

This week we learned about mutating binary search trees. Inserting and deleting data from a binary search tree is takes more effort than it would on an arbitrary tree, due to the nature of the tree. Data less than the node goes on the left, greater on the right, so an insert function would have to handle this accordingly. Deleting also takes some effort, since if the node you are deleting has children, you would have to deal with how to take care of the child node. Overall, a fairly straightforward if not annoying concept.

In terms of coursework, we had a test to take on the same day, which covered recursion and recursive data structures. We were given questions that dealt with linked lists and trees and such. Difficulty was fair, as doing prior labs and term tests helped in preparing for this.

Tuesday, 17 March 2015

Week 9

In week 9 we continued learning about recursive data structures, with the introduction of linked lists. A linked list consists of 2 things, a node with data and a child node, and a wrapper showing the front and back of the list. Crawling the list requires you to iterate through each node until you reach the back of the list. Linked lists are pretty straightforward and I had little difficulty learning about them.

Aside from this, there is also the second term test happening this week. I'm not sure how it'll work out with the TAs being on strike and all. The test will be mainly on the recursive data structures we have learned so far. The test shouldn't be too bad, as I am fairly comfortable working with the material.

Sunday, 8 March 2015

Week 8

This week we have learned more about recursive data structures. We learned about binary trees and their uses. Binary trees are a data structure in which each node of the tree contains data and up to two child nodes. The children are ordered such that data with lesser value go on the left while data with greater value go on the right. Uses of this include arithmetic and efficient searching of data. I personally like this type of data structure because it is simple, intuitive and efficient.

Aside from learning about recursive data structures, there is also an assignment due this week. It involves making a game and a strategy for that game that always wins if possible. We have to make use of our past knowledge of classes and recursion in order to finish this assignment, which is a rather difficult one. I feel that completing this assignment will help solidify my knowledge on concepts of object-oriented programming and recursion.

Tuesday, 3 March 2015

Week 7

Recursion is another interesting yet very important concept taught to us in this class. It is a powerful concept that involves a function/method calling itself. It is a tough concept for many people to wrap their heads around, but learning it is very worthwhile, as there are many applications for recursion, even outside of computer science.

Understanding recursion takes a lot of practice. The way we were taught to think about it was to first think about the base case of the function you are designing, what the function returns at the end of the recursive chain, so to speak. After you have designed the base cases, you think about small scale cases of how the function works before the base case. This is the hard part, and requires a ton of thinking. After you get through this step, combine the 2 above steps and you should have a working recursive function.

I feel that I have a good grasp of recursion at this point in the course, mainly due to working on the labs for this course. Tracing recursion was simple enough, but making recursive functions took a lot of practice and thinking, especially for the course's second assignment. Hopefully this practice will pay off in my future as a computer scientist.

Wednesday, 18 February 2015

Week 6

Object-oriented programming is an interesting concept in programming. Being a novice programmer, it was quite strange to use at first, but now I understand the basics of it and can see how it can be useful. From what I understand, the main point of object-oriented programming is to classify the things you're programming as objects, with different objects having different qualities and characteristics using classes and methods. If you want to make changes to an object, you can look at the class that defines the object and make changes there with little chance to mess up the rest of your code.

This course so far has taught me the main concepts of object-oriented programming. Such concepts include classes, methods, objects and inheritance, among others. To summarize based on what I know, classes are what define objects, methods are how the objects work, an object is basically allocated memory and inheritance allows for superclasses that have subclasses which inherit methods from it. We applied these concepts on the first assignment and test for this course, so by now I hope that my understanding of these concepts is satisfactory. 

Saturday, 7 February 2015

Week 5

Recently in this course we have learned about recursion and a few basic applications of it. Although the topic is quite hard to grasp at first, practising and obtaining familiarity of it helped me understand how it works and such. Tracing recursion isn't so bad, but I still need practice in making recursive functions. Hopefully I will be able to fully grasp recursion soon.

Last week we also had our first term test. It covered topics learn in the first month of this course, up to tracing recursion. I think I did pretty good on it, as it was mainly on making classes and methods, which I was familiar with after working on assignment 1. I will continue to work hard in this course to keep this level of confidence going into tests.

Saturday, 31 January 2015

Week 4

The first few weeks of this course were quite a learning experience for me. I came into this course not taking CSC108 and only taking an introductory course on C, so having to learn Python basics as well as the new course material in so little time scared me a little. Going to the course's ramp-up session helped a lot in learning Python, and learning how to think in an object-oriented fashion wasn't too much of a problem, so those fears have been dealt with.

The material covered in the first few weeks of this course mainly dealt with learning classes and objects, introducing us to the concept of object-oriented programming. We learned how to implement these, having to use these ideas in the first assignment of the course. The assignment was rather challenging, as it was the first time I had to program in an object-oriented way, but I feel like I did well on it. Overall the material was fair in terms of difficulty but extremely valuable in the long term as a computer scientist.