Wednesday, 30 October 2013

Week 7: Linked Lists and Trees

This week we learned about linked lists and creating trees using linked lists. The material is fairly challenging. The tutorial was helpful as usual, and I learned about how to use and implement linked lists.

Saturday, 19 October 2013

Week 5

There were no classes this week: Monday was off for Thanksgiving and the first test took place on Wednesday. The test went well: I liked that we were allowed to bring in a cheat sheet. There was also an exercise this week, which was more challenging than the rest of the exercises. Seeing as it is midterm season, I did not have a lot of time to spend on the exercise, and I ended up not finishing it, which was frustrating. One of the improvements that I would suggest for this course is a little more consistency, in terms of difficulty of assigned work and the amount that the work is worth.

Object-Oriented Programming and Recursion

Object-oriented programming is based on objects. Objects are software entities that contain both data attributes and methods. Objects are created from abstract data types that encapsulate data and functions together. Object-oriented programming is useful because data attributes can be hidden, and access to the data attributes is restricted to the object's methods. Thus they are protected from accidental corruption. Also outside code only interacts with the object's methods. Another benefit of object-oriented programming is object reusability: objects can be used by other programs that need its services.

A recursive function is a function that calls itself. Recursion is a powerful tool for solving repetitive problems. However, recursive calls are less efficient than loops. Each time a recursive function is called, the system must perform several actions (e.g. allocating the memory for parameters and local variables, storing the address of the program location) that are not necessary with a loop. On the other hand, some problems are more easily solved with recursion: if recursion does not slow system performance too much, recursion can be a good design choice.


Reference: Tony Gaddis, Starting Out With Python, 2nd Ed.

From the beginning...

Starting from the beginning, and up until the end of week 4, we learned about object-oriented programming, stacks, inheritance, exceptions, and recursion. I didn't have many problems learning about any of these topics, except for recursion (which I still can't really wrap my head around). 

I've found that the learning style seems to be mainly independent: although the topics are covered in lecture, I need to spend a fair amount of time doing readings and teaching myself content. I would have preferred for there 3 hours of lecture per week instead of 2 so that we could learn about the material more thoroughly in class. The weekly labs are a great way to learn, with the TA there to help you as  you work with your partner through relevant problems. The exercises have also been, for the most part, helpful and at a good level of difficulty. However, I found that the first assignment was far, far too difficult. I started working on it about a week before it was due (which I assumed was reasonable for an assignment worth 8%), but I was unable to finish. I am not sure if this is because assignments are meant to be very difficult or because this was a particularly challenging assignment, but I've learned to start the assignments as soon as they are assigned.

Finally, I think these SLOGs are a good way to let us express our opinions about the course, and also a good way of receiving weekly feedback about how things are going.