Sunday, April 5th, 2014
This post will be my last post for my CSC148 SLOG, containing my last impressions on the course.
Well, this is it. The course has finally come to an end, with only the final exam left which will be written on Tuesday, April 28th, 2015, which is a little more than three weeks from today.
Overall, as a computer scientist, CSC148 has introduced me to a different way of viewing computer science as a whole. After taking CSC108 last term and doing pretty well, I thought that computer science was going to be very similar to how CSC108 was throughout the rest of my degree at the University of Toronto. However, CSC148 taught me that I have a lot of freedom in terms of coding whenever I am working on an assignment, project, etc. In CSC108, I feel that we were very limited in the things we could do since it is more of a beginner course. We were never allowed to use things like pass, break, etc. in python. In this course, I have learned a lot more cool things in python such as recursion and trees that I had no idea existed back in my CSC108 days. This only make me more excited to see what I will learn in upper year CSC courses and in other programming languages.
However, the strike did make this term feel a little shaky since we did not get to use every opportunity possible to learn more things with the TAs in labs. The experience of working on the lab exercises in an actual computer lab with the TAs makes a huge difference compared to working on them at home. However, I felt Danny and Diane did an excellent job with helping the student as much as they could, whether it be in office hours or on the piazza discussion board.
I guess my last task for this course is to study for the final exam. I am somewhat nervous since I did not do as well as I would have liked to on term test 2, but hopefully I can pick it up and finish the course on a strong and positive note. Thank you to whoever has been reading my SLOG posts, and best of luck to myself in my future computer science endeavours.
Sunday, April 5, 2015
Sunday, April 5th, 2015
In this post, I will quickly revisit a post that I made earlier in the year. Specifically, I will revisit my post about recursion (posted on March 3rd, 2015).
I have had a lot of experience with recursion since it was first introduced to us in the course, whether it be with term test 2, the assignments, or the lab exercises. One of the most common uses of recursion is for tree traversals. When traversing through a tree, you can use recursion to keep visiting each node, whether it be inorder(left, value, right), preorder(value, left, right), or postorder(left, right, node). This can be done until you find the node(s) you are looking for, and can perform some sort of function on them. I find recursion to be particularly useful in this scenario since it would be incredibly awkward to traverse the tree using another method such as a for/while loop.
I still struggle with using recursion since the functions we have to implement are becoming a little trickier to determine what the base case is. I particularly found it tricky to use recursion in the minimax algorithm for assignment 2.
I remember when recursion was first introduced in the course and we spent a week or two just tracing functions. It is pretty cool to see how my understanding of this concept has developed as the course has gone on.
In this post, I will quickly revisit a post that I made earlier in the year. Specifically, I will revisit my post about recursion (posted on March 3rd, 2015).
I have had a lot of experience with recursion since it was first introduced to us in the course, whether it be with term test 2, the assignments, or the lab exercises. One of the most common uses of recursion is for tree traversals. When traversing through a tree, you can use recursion to keep visiting each node, whether it be inorder(left, value, right), preorder(value, left, right), or postorder(left, right, node). This can be done until you find the node(s) you are looking for, and can perform some sort of function on them. I find recursion to be particularly useful in this scenario since it would be incredibly awkward to traverse the tree using another method such as a for/while loop.
I still struggle with using recursion since the functions we have to implement are becoming a little trickier to determine what the base case is. I particularly found it tricky to use recursion in the minimax algorithm for assignment 2.
I remember when recursion was first introduced in the course and we spent a week or two just tracing functions. It is pretty cool to see how my understanding of this concept has developed as the course has gone on.
Sunday, March 15, 2015
Sunday March 15th, 2015
In the past weeks we have completed both assignment 2 and term test 2. I found assignment 2 to be pretty difficult, especially with trying to implement strategy minimax. I think that I understood the idea of the strategy and the approach that we were supposed to use, but I still struggled heavily with implementing it. Danny did post something on the piazza page that summarized what we had to do, so I ended up following that. Hopefully, I can find out what I did right/wrong but I guess we will have to wait and see until the strike ends.
As for term test 2, I thought it was a very fair test. The three questions that were asked covered the three main things we have talked about in class since the last test: traversing through trees, binary search trees, and linked lists. Once again, we will have to wait until the strike is over in order to get our marks since there are no TAs who will mark them.
I think that the idea of linked lists is very interesting. A linked list is, when you look at it from the bigger picture, a list of objects that are nodes and are connected in a sequence. This means that every object has a current value and a next value, and that next value has a current value and next value, and so on. The list itself only has instance variables front, back, and size. That means in order to access objects within the list, you have to walk through the list by constantly looking at each node's next value, and that next value's next value (I hope that makes sense to whoever is reading this). The back instance variable's next value refers to None, since it is the end of the list. Also, the linked list has a size, depending on how many objects are in between the front and back. This is a very interesting concept to me, but I do not really understand a practical reason for sorting objects in this manner. Perhaps we will figure out in the coming weeks.
We are about to begin the third week of the strike, and I really hope it ends soon. We have not had any labs which I really value towards my learning, especially in this course. Labs are where I get to work with my partner and TA and practice the material that we have learned in lecture. Working on the labs alone at home is a lot more difficult, so hopefully we can all get back in those labs soon and do some computer science! :)
In the past weeks we have completed both assignment 2 and term test 2. I found assignment 2 to be pretty difficult, especially with trying to implement strategy minimax. I think that I understood the idea of the strategy and the approach that we were supposed to use, but I still struggled heavily with implementing it. Danny did post something on the piazza page that summarized what we had to do, so I ended up following that. Hopefully, I can find out what I did right/wrong but I guess we will have to wait and see until the strike ends.
As for term test 2, I thought it was a very fair test. The three questions that were asked covered the three main things we have talked about in class since the last test: traversing through trees, binary search trees, and linked lists. Once again, we will have to wait until the strike is over in order to get our marks since there are no TAs who will mark them.
I think that the idea of linked lists is very interesting. A linked list is, when you look at it from the bigger picture, a list of objects that are nodes and are connected in a sequence. This means that every object has a current value and a next value, and that next value has a current value and next value, and so on. The list itself only has instance variables front, back, and size. That means in order to access objects within the list, you have to walk through the list by constantly looking at each node's next value, and that next value's next value (I hope that makes sense to whoever is reading this). The back instance variable's next value refers to None, since it is the end of the list. Also, the linked list has a size, depending on how many objects are in between the front and back. This is a very interesting concept to me, but I do not really understand a practical reason for sorting objects in this manner. Perhaps we will figure out in the coming weeks.
We are about to begin the third week of the strike, and I really hope it ends soon. We have not had any labs which I really value towards my learning, especially in this course. Labs are where I get to work with my partner and TA and practice the material that we have learned in lecture. Working on the labs alone at home is a lot more difficult, so hopefully we can all get back in those labs soon and do some computer science! :)
Tuesday, March 3, 2015
Tuesday, March 3rd, 2015
So I talked about using recursion to go through trees 2 posts ago, but I have not talked about recursion specifically. So in this post, I will talk about the deceivingly beautiful concept of recursion.
Three weeks ago, I was not sure how I felt about recursion. I was very uncomfortable with the concept of it and was not sure if I would ever learn to become accustomed to it. However, as the weeks went by, I began to realize how useful it can be for solving problems. I mean, creating a function that calls itself in the body is honestly mind-blowing. I like to think of it as function-ception (a function inside of a function, for those who have not seen the amazing film Inception (2010)).
A recursive function is a function that calls itself. Any function that uses recursion can also be created by using iteration. However, recursion makes the function concise and better looking, where as iteration can make the function long, complicated, and ugly for other computer scientists to read. In order to ensure that recursion will work, you must figure out a base case (for example, k = 0) and find out if you can solve the base case of your problem. If it works, you can increment the base case value (ie. take k = 0 + 1, so k = 1) and see if it still works. Eventually, your function will work for any case (ie. k >= 0) and you can assume it will work for all cases. Thus, recursion is your friend here. This concept of seeing if the function works for a base case, and then incrementing is called induction. In short, creating a function that calls itself, (ie. a recursive function) makes solving problems in computer science a whole lot easier.
We have been using recursion for the past 3 weeks in class and in labs which have both been very helpful for my understanding. Writing recursive code can get a little tricky for myself but working on the lab exercises with my partner has also been helpful. Unfortunately, labs may get cancelled this week due to the TAs strike that is going at this very moment. Hopefully it ends soon so that I can continue going to labs and develop my understand of recursion and computer science!
So I talked about using recursion to go through trees 2 posts ago, but I have not talked about recursion specifically. So in this post, I will talk about the deceivingly beautiful concept of recursion.
Three weeks ago, I was not sure how I felt about recursion. I was very uncomfortable with the concept of it and was not sure if I would ever learn to become accustomed to it. However, as the weeks went by, I began to realize how useful it can be for solving problems. I mean, creating a function that calls itself in the body is honestly mind-blowing. I like to think of it as function-ception (a function inside of a function, for those who have not seen the amazing film Inception (2010)).
A recursive function is a function that calls itself. Any function that uses recursion can also be created by using iteration. However, recursion makes the function concise and better looking, where as iteration can make the function long, complicated, and ugly for other computer scientists to read. In order to ensure that recursion will work, you must figure out a base case (for example, k = 0) and find out if you can solve the base case of your problem. If it works, you can increment the base case value (ie. take k = 0 + 1, so k = 1) and see if it still works. Eventually, your function will work for any case (ie. k >= 0) and you can assume it will work for all cases. Thus, recursion is your friend here. This concept of seeing if the function works for a base case, and then incrementing is called induction. In short, creating a function that calls itself, (ie. a recursive function) makes solving problems in computer science a whole lot easier.
We have been using recursion for the past 3 weeks in class and in labs which have both been very helpful for my understanding. Writing recursive code can get a little tricky for myself but working on the lab exercises with my partner has also been helpful. Unfortunately, labs may get cancelled this week due to the TAs strike that is going at this very moment. Hopefully it ends soon so that I can continue going to labs and develop my understand of recursion and computer science!
Tuesday, February 24, 2015
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.
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.
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.
Thursday, January 22, 2015
Hello!
Welcome to my slog for CSC148! My name is Rocky and in this slog I will regularly write posts about my experiences in this computer science course.
For my first entry, I am asked to write about why I think geeks should know how to write...
In my opinion, writing skills are something that everyone should have, whether they are a geek or not. This is because at some point, or points, in one's life, they will be required to write something for a multitude of reasons. Knowing how to write could be the difference between getting a job from Google, getting a good grade on that English essay, or simply to send a message to a friend through e-mail or text.
Knowing how to write is something that could very much come in handy for a geek. Even though they may be a "geek", they still have to apply for jobs and write papers in school. It is still a vital skill even to them. Also, knowing to write can help with social skills as well for a geek. Since most geeks are known to be socially awkward, if they can learn how to eloquently put their thoughts on paper, then they can definitely transfer that to real life interactions.
Welcome to my slog for CSC148! My name is Rocky and in this slog I will regularly write posts about my experiences in this computer science course.
For my first entry, I am asked to write about why I think geeks should know how to write...
In my opinion, writing skills are something that everyone should have, whether they are a geek or not. This is because at some point, or points, in one's life, they will be required to write something for a multitude of reasons. Knowing how to write could be the difference between getting a job from Google, getting a good grade on that English essay, or simply to send a message to a friend through e-mail or text.
Knowing how to write is something that could very much come in handy for a geek. Even though they may be a "geek", they still have to apply for jobs and write papers in school. It is still a vital skill even to them. Also, knowing to write can help with social skills as well for a geek. Since most geeks are known to be socially awkward, if they can learn how to eloquently put their thoughts on paper, then they can definitely transfer that to real life interactions.
Subscribe to:
Posts (Atom)