Tuesday February 24th, 2015
So for this post, I will give a summary of my understanding of object-oriented programming concepts. But before I get to that, I would like to talk about term test 1, assignment 1, and the upcoming assignment 2. The results for the first term test and assignment were very good, since I got an 84% and 85% respectively. I was quite worried about what mark I would receive for assignment 1, but now after receiving my mark, I cannot complain. I also found the term-test wrapper to be quite helpful with reviewing the test since it asked me to reflect on how I prepared for the test and what I may or may not have done correctly. Hopefully I can keep up the good marks that I have been getting in this class for the rest of the term.
As for my brief summary...
From what I have noticed, I think the purpose of CSC148 is to teach students that everything in Python is an object. Whether that be classes, functions, modules, methods, etc. and they can all be passed as arguments to functions and methods. These things can also be assigned to variables (which are also objects!) and can be passed as arguments to functions and methods as well. Object-oriented programming is using these things for simple arithmetic operations or for complex modules such as in assignment 1. Basically, everything that I have ever done in Python can be considered as object-oriented programming.
When we create our own types or classes, these things are also objects but we are simply manipulating the set of standard types (ie. str, int, bool, etc.) that are already in Python. However, regardless of which we use, we are still programming with objects, hence, we are still object-oriented programmers.
Tuesday, February 24, 2015
Wednesday, February 11, 2015
Wednesday, February 11, 2015
So since my last post, we have written our first term test in this class and are approaching the halfway mark in the semester. I was unable to make it to lecture today so I did not get to see the results of my term test (hopefully they were good *crosses fingers*). We are also supposed to do a review exercise that is attached to the test which is worth 1% of our final grade. I have not seen this review exercise thing yet, but it seems like a great way to review the test to make sure we, as students, can understand our mistakes moving forward. I would love to see my other courses do this as well, plus we get free marks! :-)
In class this week, we learned about trees which is a pretty cool topic. I have been told about them before by my friends who have taken the course before, so I had a very small idea about them. With trees, we can use recursion to go through the tree to find the information or pieces of information that we need. Recursion is still a fairly new topic to myself so I need to make sure I can understand it well before begin messing around with trees. I made the same mistake on both the quiz for lab 3 and the term test when tracing recursive functions. For example:
def m(L):
if isinstance(L, list):
return 1 + sum([m(L) for x in L])
else:
return 1
Trace ca([15, 3, [5, 19], 32]).
*This example was taken from quiz#3, Q3 in T0501 (Fri 11-1)*
When tracing this function, I know that I will get 1 for the first 2 items since they are not lists. Then for the next item, since it is a list, it will be the sum of 2 one's, PLUS another 1 since that is what the code says. I keep forgetting to add this extra one when tracing, or whatever that extra addition should be (ie. on the term test, it was len(L)). So my answer is one less than what is should be.
Hopefully I stop making this mistake, because it is frustrating and hopefully by typing it out like I just did I will not do it again. Hehe :)
So since my last post, we have written our first term test in this class and are approaching the halfway mark in the semester. I was unable to make it to lecture today so I did not get to see the results of my term test (hopefully they were good *crosses fingers*). We are also supposed to do a review exercise that is attached to the test which is worth 1% of our final grade. I have not seen this review exercise thing yet, but it seems like a great way to review the test to make sure we, as students, can understand our mistakes moving forward. I would love to see my other courses do this as well, plus we get free marks! :-)
In class this week, we learned about trees which is a pretty cool topic. I have been told about them before by my friends who have taken the course before, so I had a very small idea about them. With trees, we can use recursion to go through the tree to find the information or pieces of information that we need. Recursion is still a fairly new topic to myself so I need to make sure I can understand it well before begin messing around with trees. I made the same mistake on both the quiz for lab 3 and the term test when tracing recursive functions. For example:
def m(L):
if isinstance(L, list):
return 1 + sum([m(L) for x in L])
else:
return 1
Trace ca([15, 3, [5, 19], 32]).
*This example was taken from quiz#3, Q3 in T0501 (Fri 11-1)*
When tracing this function, I know that I will get 1 for the first 2 items since they are not lists. Then for the next item, since it is a list, it will be the sum of 2 one's, PLUS another 1 since that is what the code says. I keep forgetting to add this extra one when tracing, or whatever that extra addition should be (ie. on the term test, it was len(L)). So my answer is one less than what is should be.
Hopefully I stop making this mistake, because it is frustrating and hopefully by typing it out like I just did I will not do it again. Hehe :)
Tuesday, February 3, 2015
Tuesday, February 3rd 2015
Today is the day before the first tern test of this course. I am not sure what to expect, but I do feel ready, especially after all the labs and assignment 1. I must say, I found assignment 1 to be very challenging, definitely the hardest assignment out of all of my first year computer science courses thus far. I was uncomfortable with all the freedom that was given to us to make the classes to run the game because I felt like I did not know enough about classes yet. Coming from a course like csc108, there were guidelines as to what was specifically expected of us, which was something that I became accustomed to. In this assignment, we were asked to make classes that could run the game Subtract Square. the only thing that we were told to do were what classes needed to be made. Even though I have had alot of practice with creating classes in lectures and in labs, I still found it difficult to make the classes that would run the game, which is why I do no think that I did very well on this assignment.
As for how the rest of the course has been going, I have found the lectures to be very helpful and I am learning a lot but just listening to Danny talk and code. The labs have been going very well since my partner and I have been able to complete them all so far, and I have done well on all the quizzes so far. Hopefully the other two assignments will go better and I will try to work harded to prepare myself for those assignments.
Today is the day before the first tern test of this course. I am not sure what to expect, but I do feel ready, especially after all the labs and assignment 1. I must say, I found assignment 1 to be very challenging, definitely the hardest assignment out of all of my first year computer science courses thus far. I was uncomfortable with all the freedom that was given to us to make the classes to run the game because I felt like I did not know enough about classes yet. Coming from a course like csc108, there were guidelines as to what was specifically expected of us, which was something that I became accustomed to. In this assignment, we were asked to make classes that could run the game Subtract Square. the only thing that we were told to do were what classes needed to be made. Even though I have had alot of practice with creating classes in lectures and in labs, I still found it difficult to make the classes that would run the game, which is why I do no think that I did very well on this assignment.
As for how the rest of the course has been going, I have found the lectures to be very helpful and I am learning a lot but just listening to Danny talk and code. The labs have been going very well since my partner and I have been able to complete them all so far, and I have done well on all the quizzes so far. Hopefully the other two assignments will go better and I will try to work harded to prepare myself for those assignments.
Subscribe to:
Posts (Atom)