This is the last week of the semester. We learned about how to determine the runtime of a function in terms of big oh notation. We should firstly determine the inner-most function's runtime and then calculate the outer function. Then, multiply them together. On Wednesday, we looked at abstract data type queue that we implemented before's efficiency and application of abstract data type such as linked list.
The challenge of this week is the third assignment. It is less complicated than the second assignment, but it is not really simple because every function requires recursion. Some function needs more than one helper functions. Luckily, my partner is good at thinking recursively. We used gather list helper function for some function, which is not allowed. We had to do some modification when we thought we were done.
The semester is over, I hope I can do well in the final exam. After all, it weighs the most.
CSC148H courSe LOG
Thursday, April 2, 2015
Friday, March 27, 2015
Revisit Why Geeks Should Write
After revising the my first post of this blog about why geeks should write, I still believe geeks should have the habit of writing regularly and writing is really important for everyone. Firstly, writing help people remember things. A good brain cannot compare with things that are recorded solidly. Secondly, writing is a process of reviewing the past and improving in the future.
Now, I even agree this more. During the process of reading my previous post in order to write this post, I read all of my previous post. I found when I recorded things about that week, I always wrote down things that I was not satisfied and tried to made things right in the next week. I would make effort completing the goal made last week. In fact, writing can make people more organized. Writing can make one get to know oneself more. People can be more sure about what is helpful to do.
Moreover, writing is a kind of practice of logical thinking. People need to think about what to write first and what to write follow the above. The effort of trying to make the writing make sense require one's logical thinking. Good logical thinking is helpful for solving problems.
Keeping a record of life is really helpful. At least I know what I did and learned in this semester. In the process of reading my own posts, I am aware of what I learned each week and found some material that I am now not sure about. Then, I can do some review to enhance my understanding. People are unable to remember everything. Writing helps achieve that.
Also, writing is also a way of sharing. From reading others' blog, I learned about how they understand the course material, how they solve the difficulties, and their trick for study the course, etc. It is a way of presenting yourself to other and communicating.
Writing is necessary for everyone.
Now, I even agree this more. During the process of reading my previous post in order to write this post, I read all of my previous post. I found when I recorded things about that week, I always wrote down things that I was not satisfied and tried to made things right in the next week. I would make effort completing the goal made last week. In fact, writing can make people more organized. Writing can make one get to know oneself more. People can be more sure about what is helpful to do.
Moreover, writing is a kind of practice of logical thinking. People need to think about what to write first and what to write follow the above. The effort of trying to make the writing make sense require one's logical thinking. Good logical thinking is helpful for solving problems.
Keeping a record of life is really helpful. At least I know what I did and learned in this semester. In the process of reading my own posts, I am aware of what I learned each week and found some material that I am now not sure about. Then, I can do some review to enhance my understanding. People are unable to remember everything. Writing helps achieve that.
Also, writing is also a way of sharing. From reading others' blog, I learned about how they understand the course material, how they solve the difficulties, and their trick for study the course, etc. It is a way of presenting yourself to other and communicating.
Writing is necessary for everyone.
Thursday, March 19, 2015
courSe LOG Entry 8
We learned about how to implement strategy minimax and test the code this week. I did not pay much attention to the lecture because I implemented the strategy in my own way by using recursion and I think it is not that necessary. On Wednesday, we learned about testing minimax strategy. We learned about how to calculate the probability of not finding the error by using unites.
The strike is still not over. Therefore, I have no help with the lab questions. I think this week's lab questions are a little bit confusing.
The marking about the second term test and assignment 2 is still not done. I hope I can get the mark as soon as possible so that I can feel more relief.
The third assignment just came out. I feel that this course is really intense. We have slog and quiz every week if there is no strike. There was the second term test right after the second assignment. Now, there is the third assignment. I hope I can do well this time.
The strike is still not over. Therefore, I have no help with the lab questions. I think this week's lab questions are a little bit confusing.
The marking about the second term test and assignment 2 is still not done. I hope I can get the mark as soon as possible so that I can feel more relief.
The third assignment just came out. I feel that this course is really intense. We have slog and quiz every week if there is no strike. There was the second term test right after the second assignment. Now, there is the third assignment. I hope I can do well this time.
Thursday, March 12, 2015
courSe LOG Entry 7
We only had one lecture this week because of the second term test. During the lecture, Danny showed us how to implement binary search tree's insert and delete method. The method for tree type inevitable relates to recursion so that it is tricky to implement these method. The insert method is fairly easy to understand. However, there are a lot of different elif condition for delete method. I had trouble understanding where the node is removed. I still have trouble understanding the function when I look back some times afterwards.
I thought the term test would be the biggest challenge this week, but I am satisfied about it. The reason why I thought it would be challenging is because the test covers tree and linked list. Implementing functions for tree involves recursion and recursion is one of the hardest parts of this course. However, the test is easy. The first question is basically giving you the points. It is a question about the basic definition of tree. The second question is about implementing a function for tree that is similar to a lab question. I put the lab question onto my aid sheet. It is not a problem at all. The last question is about linked list. Iteration is more straight forward than recursion. I am relatively good at writing iteration because I tend to use a lot of iteration in computer science assignment.
Sadly, TAs are still on strike. We do not have lab this week. The lab handout is shortened this week because of that. I fear my knowledge about this week's material is not that strong without the help of lab.
I thought the term test would be the biggest challenge this week, but I am satisfied about it. The reason why I thought it would be challenging is because the test covers tree and linked list. Implementing functions for tree involves recursion and recursion is one of the hardest parts of this course. However, the test is easy. The first question is basically giving you the points. It is a question about the basic definition of tree. The second question is about implementing a function for tree that is similar to a lab question. I put the lab question onto my aid sheet. It is not a problem at all. The last question is about linked list. Iteration is more straight forward than recursion. I am relatively good at writing iteration because I tend to use a lot of iteration in computer science assignment.
Sadly, TAs are still on strike. We do not have lab this week. The lab handout is shortened this week because of that. I fear my knowledge about this week's material is not that strong without the help of lab.
Thursday, March 5, 2015
courSe LOG Entry 6
What we learned this week is linked list and iteration. Linked list is similar to list except its every adjacent element has connection with each other. Linked list does not use variable list to store the value. It only stores the first and the last element of the list. The element is stored into an abstract data type called LLNode. It can show which element is after this element. Since LLNode can connect an element with the element after it, we can access the all the value in linked list by using iteration.
What I enjoyed this week is that Danny gives a lot of advise about doing assignment 2. Although it is vague and not in detail about code, it still helps. He spent first half of the class on helping assignment 2.
It is obvious that assignment 2 is challenging as Danny spent so much time explaining it and even sent an email to us to give us some hint. There are several tricky part for this assignment. First, it is how to determine the winner of the game tippy. In order to win, you need to form your piece in an z shape in a tic-tac-toe plate. This requires a lot of if statement and thinking. Second, it is the rough outcome function. It is a sleeper function because we do not need to use it for assignment 2. It is useful in next assignment, though. Third, it is the minimax strategy. To implement minimax strategy, we need to first calculate the score the player gets at a particular point and then recommend moves for the player. I created a helper function to calculate the score and suggest moves in the main function by calling the helper function. The calculation of score requires recursion. It is really tricky because you need think what will happen in the future to implement a correct recursion.
Because of the strike of TAs, we do not have lab this week. I tried to do the lab exercise by myself, but I am not sure with my answer without my partner and TA. I hope the strike to be over soon.
What I enjoyed this week is that Danny gives a lot of advise about doing assignment 2. Although it is vague and not in detail about code, it still helps. He spent first half of the class on helping assignment 2.
It is obvious that assignment 2 is challenging as Danny spent so much time explaining it and even sent an email to us to give us some hint. There are several tricky part for this assignment. First, it is how to determine the winner of the game tippy. In order to win, you need to form your piece in an z shape in a tic-tac-toe plate. This requires a lot of if statement and thinking. Second, it is the rough outcome function. It is a sleeper function because we do not need to use it for assignment 2. It is useful in next assignment, though. Third, it is the minimax strategy. To implement minimax strategy, we need to first calculate the score the player gets at a particular point and then recommend moves for the player. I created a helper function to calculate the score and suggest moves in the main function by calling the helper function. The calculation of score requires recursion. It is really tricky because you need think what will happen in the future to implement a correct recursion.
Because of the strike of TAs, we do not have lab this week. I tried to do the lab exercise by myself, but I am not sure with my answer without my partner and TA. I hope the strike to be over soon.
Friday, February 27, 2015
Summary about Abstract Data Type
An abstract data type is a new type of data used to store some information and have some operations on that information by using object oriented programming techniques. It is like creating a new type of variable used to store information. List, dictionary, tuple, etc. are all abstract data type that Python has already created for us. What we learned in the class is how to create a new type of abstract data type and its operations.
First, we created an abstract data type called stack. The property of a stack is similar to a list. It can store several items. It has a operation of removing the top item of the stack. It also has a operation of pushing item to the top of the stack. It can also tell if the stack is empty. Since the property is pretty similar to list, we can use list to create this abstract data type. All we need to add is pushing the item to the top and checking if the stack is empty functions.
Second, we practiced another abstract data type that is similar to stack called queue during a week's lab. It is similar to stack, but the difference is that it pushes item to the bottom of the queue and remove item from the bottom.
Third, we learned about ADT called tree. It is a type of ADT that stores a series of data that have relationship with each other. It can have a lot of operations and most of its operations involve using recursion. That's what makes this type of abstract data hard.
The picture is an visualized example of a tree data type. It looks like a tree grows some leaves.
Overall, programming world are full of abstract data type. A program is built by abstract data type. They are used to store information and provide operations for the program. The core of programming is the use of abstract data type and their interactions. So, creating a mature abstract data type is essential for the convenience of programming.
First, we created an abstract data type called stack. The property of a stack is similar to a list. It can store several items. It has a operation of removing the top item of the stack. It also has a operation of pushing item to the top of the stack. It can also tell if the stack is empty. Since the property is pretty similar to list, we can use list to create this abstract data type. All we need to add is pushing the item to the top and checking if the stack is empty functions.
Second, we practiced another abstract data type that is similar to stack called queue during a week's lab. It is similar to stack, but the difference is that it pushes item to the bottom of the queue and remove item from the bottom.
Third, we learned about ADT called tree. It is a type of ADT that stores a series of data that have relationship with each other. It can have a lot of operations and most of its operations involve using recursion. That's what makes this type of abstract data hard.

The picture is an visualized example of a tree data type. It looks like a tree grows some leaves.
Overall, programming world are full of abstract data type. A program is built by abstract data type. They are used to store information and provide operations for the program. The core of programming is the use of abstract data type and their interactions. So, creating a mature abstract data type is essential for the convenience of programming.
Sunday, February 15, 2015
courSe LOG Entry 4
We learned about a new abstract data type called tree this week. The concept of tree is fair to understand. The methods of this data type requires recursion. I have been having a fever this week so that I am not really in a good condition for studying. I can understand the concept of tree and I am able to understand why using those recursions.
I basically did nothing in this week's lab. I was really sick and dizzy. I cannot read things so that I just sit there and wait until quiz. I am not sure if I did the quiz right.
Some marks came out this week. I am satisfied with my mid-term and assignment 1 mark. I am not satisfied with my SLOG mark. I should do better in writing the SLOG, but my body condition this week really frustrates me so that my brain was unclear. I will do better in next slog.
I basically did nothing in this week's lab. I was really sick and dizzy. I cannot read things so that I just sit there and wait until quiz. I am not sure if I did the quiz right.
Some marks came out this week. I am satisfied with my mid-term and assignment 1 mark. I am not satisfied with my SLOG mark. I should do better in writing the SLOG, but my body condition this week really frustrates me so that my brain was unclear. I will do better in next slog.
Subscribe to:
Posts (Atom)