Tuesday, 17 February 2015

Object Oriented Programming

Object oriented programming is quite fascinating. It certainly is much more challenging than the introductory concepts introduced in CSC108. Instead of relying on the built in classes and functions, we're now creating our own, from the ground up. Instead of keeping track of one object going through simple functions to attain relatively simple goals, we're keeping track of objects going through multiple classes that we designed, possibly multiple instances, class methods, special methods and more. Now, we can create more interactive code that achieves more advanced goals.

    Learning about classes, I initially found them to be a bit annoying and confusing. I thought to myself, "Why can't we just do what we did in 108? What is this self nonsense? Instances? Bleh." But, over time, I realized how important creating our own classes were. They are the building blocks for what we wish to create beyond the limitations of the built in classes of Python. It took me a bit but I eventually got the hang of creating classes.

    The concept of recursion is interesting as I've stated in my previous entry. I still haven't fully gotten the hang of it but it is a bit of a relief to see that other students are struggling a bit with it like I am. Like in this slog, http://samcao918.blogspot.ca/2015/02/week-5-slog.html, this student similarly had trouble with recursion but eventually got over that hurdle and figured out how useful recursion could be. Hopefully, I will understand it better with additional practice over reading week. Any tips for figuring out recursion? I know that we have to figure out the base case and then find a way to keep the function going until it reaches the desired effect, but I'm having difficulty in figuring out exactly how to design past the base case. I've always had trouble figuring out problems like this.

Monday, 9 February 2015

Recursion Tracing

I find recursion to be a very fascinating type of code. The ability to have your code automatically go over itself until your condition is met is incredibly efficient and effective compared to all the different types of loops someone might have to go through otherwise to achieve the same effect! Recursion, combined with list comprehension I think will be a great help to code clarity and brevity.

Going through recursion tracing has not been too difficult. I think going through step by step is important for me to understand the concept fully. However, I think that actually coding recursion will be the real challenge. Recursion coding reminds me of math in a way, where you have to figure out a way to apply math formulas to a word problem. I tried to apply recursion to this week's lab but was unable to fully figure it out, though the question on the lab quiz showed me how it worked. Is there a good way of thinking about this other than trying to break the problem down and trying to code from there? I'll certainly need some more practice!

Monday, 2 February 2015

The First Few Weeks

The first few weeks of this course have been interesting to say the least. To me, there are pros and cons of this course compared to CSC108. I find the concepts in CSC148 a lot more abstract and challenging, which is good. There is a lot more freedom to choose how you approach work. The topics introduced in this course, such as list comprehension, was very welcome. These topics I found were more interesting than the basic concepts introduced in CSC108, especially list comprehension! Being unable to use list comprehension in CSC108 was frustrating at times as it would have made code a lot more streamlined.

    There are some things I miss from CSC108 though, which has led to some challenges. I sorely miss PCRS and access to short video lectures. Those were extremely handy tools to enhance learning. Weekly exercises on PCRS helped a lot with understanding concepts and mastering them. In CSC148, it feels like we're simply thrown in. Personally, I've had some challenges completely grasping classes, though I think I have it mostly down. I shall certainly practice more to try and master it as classes seem to be a very large focus in this course. Speaking of classes, it feels like the learning curve took a sharp turn with the concept focus. It seems like our entire focus is on the creation of classes with some helpful ways of approaching code like recursion whereas it felt like CSC108 barely had any focus at all on classes.

Hopefully, with more practice and extra study time, I'll grasp the material better. Looking through my assignment, I already see things I could improve upon and things I could fix. If only I realized these things during the time I spent working on it!

One more thing, could we please get answers to the additional exercises from the lab sheets? It would really help if I could compare my answers to the correct ones!