I decided to revisit my first blog for CSC148 Why Geeks Should Write. For the purpose of not only to make comments on my earlier self, but to also reflect on my entire slog writing experience. When we first received the slog assignment, I came to realize how much our professor wants us to realize the importance of writing that he decided to gave us such topic. Through all these entries we have done in the past 3 months, I think I am quite convinced that these slogs does help improve my performance in this class. When I wrote the first blog, I was a lot more focused on how writing relates to coding itself in a way that we should write out the solution or algorithm of a problem into English then translate it into code. I did not however, relate writing to the slog itself.
I still agree with my views from 3 months ago because writing is a good way to sort a problem, but I would like to enrich these views and open a new perspective. In the beginning of the term, we were required to hand in a form that records our opinion on the helpfulness, interestingness, and many others aspects of writing a slog. I am pretty sure most people, including myself disliked the idea of keeping an updated blog every week. It sounded tedious and it didn't seem like it served much purposes in our learning of computer science. But in the end, I turned out to really like slogs. These slogs did not just help me improve the ability to communicate and to break down a problem into words, it served as a session for me every week to review the material that was covered in class then to deeply reflect upon it. The slog had me spending even more time researching for other materials online to better understand the concepts. I actually found myself enjoying this process of learning other approaches to the topics learned in class. After all, I am glad I kept up with slogs because it definitely served a greater purpose than what I was expecting.
Sunday, March 29, 2015
Impression of week 9 - Test Cases
After completing the second assignment, our professor started the week off with some unittest exercises that tested the minimax strategy from the assignment, which we all struggled with at some point. In CSC108, we have done some unittest which checks if the actual function gave the desired output, and these unittests are definitely more descriptive than the doctests that we would usually import. The unittests we learned in this class have the same general idea. We carefully chose test cases that will give us more information on whether the minimax strategy worked with the subtract square game, such as whether the computer chooses a guaranteed winning move, or a random move if there are no winning moves. I found this lecture quite interesting because we were able to review some tree concepts and look at the condition of each move in the games to see if it's a winning move or not, and if there are no winning moves for the current value, how does that really tell us whether minimax is working or not. And the answer is, it doesn't tell us precisely if minimax is working or not because perhaps a random strategy would produce the same move as minimax. In this case, it is critical to learn to choose proper test cases.
Sunday, March 15, 2015
Mutating BSTs
This week we further extended our understanding of binary search trees(BTS) by looking into some methods that mutates these trees. Just to remind ourselves, a BTS has comparable nodes and satisfies the restriction that the left sub-tree contains only nodes with data less than the parent node(node.left < node. data), and the right sub-tree contains only nodes with data greater than the parent node(node.right > node.data), also keeping in mind that each node has no more than two children. With these in mind, we talked about insert, and delete methods in lecture. These methods are recursive, and we had first implement the base case where it is simple enough that it does not require recursion, then the more complicated cases where recursion is needed.
Unfortunately, we lost all labs and tutorials due to TA strike. I had CSC165 test a day before the test for this course and it was nevertheless a stressful week especially without the TA's reinforcements on some of the core materials. Now that the two computer science tests are done, and the two assignments that corresponds to the two courses finished just the week before the tests, I am glad I made it through. I thought the both tests were fair as they reflect the amount of time and effort we put in preparing for them. With two other mid-terms coming up this week and the week after, I have came to realized how important it is to develop a good study habit so that we are able to better manage our time. And looking back at myself, I have definitely improved in utilizing my time more efficiently compared to when I first entered the university. With these in mind, I am prepared to battle through remaining school year.
Unfortunately, we lost all labs and tutorials due to TA strike. I had CSC165 test a day before the test for this course and it was nevertheless a stressful week especially without the TA's reinforcements on some of the core materials. Now that the two computer science tests are done, and the two assignments that corresponds to the two courses finished just the week before the tests, I am glad I made it through. I thought the both tests were fair as they reflect the amount of time and effort we put in preparing for them. With two other mid-terms coming up this week and the week after, I have came to realized how important it is to develop a good study habit so that we are able to better manage our time. And looking back at myself, I have definitely improved in utilizing my time more efficiently compared to when I first entered the university. With these in mind, I am prepared to battle through remaining school year.
Impressions of Week 7 – Linked Lists and Assignment 2
In this week’s
lecture, we started covering linked list data structures and some of its properties.
Linked list consists of group of nodes, which together represents a sequence
and each data element in the list contains a link to its successor. In class,
we implemented list and linked list classes that consist of numbers and kept track of its size, back, and front of the list. We also touched upon concepts
that mutate the linked list as we add or delete items from its data. One way I
would like to think about linked list is with this fun idea. Let’s make
a list of all the things we do in the morning. We can call the list my morning, and brainstorm all the activities
we do during this time. Some of possible activities are: wake up, brush teeth, shower, do homework, comb hair, eat breakfast, go
to class, motivate self, and get
dressed. However, these activities are not in the actual order I do them in
the morning. For example, I brush my teeth before I shower, I shower before I
do homework, and I comb my hair after I get out of the shower. Linked list will allow us to organize and put
them in a sequence in a much simpler fashion by putting in some “arrows”. Now
our list will have a structure like this:
This is the structure of our linked list. Each of the activity above is called a node, and we have 8 nodes. These nodes all have a data value and a reference to the next node. Here, our first node (front) is brush teeth and we can proceed by following the linkages to the next node shower, then to the next comb hair and so on. Finally we reach a node with a data value with no reference to another node which then tells us we have reached the end of the list; go to class is the last node (back) of this linked list called my morning.
This week was also a busy week as assignment 2 was due on Thursday. My partner and I struggled on starting on the assignment but eventually we developed a plan. We decided to find a way to produce the game board first, and implement the following methods that allow the user to input the size of the game board. Next, we thought of how we want the game to proceed as we take the player’s input of X and place it on the board. We then brainstormed how to check for the winning condition. Lastly, we completed minimax. This was a challenging assignment as we got our program to work with minimax right before the deadline. My partner is a better programmer than me as he had much more experiences in coding in various platforms, and he was able to lead me through the assignment and help me understand the concepts. Nevertheless, I am happy that it is working and done with.
Sunday, March 1, 2015
Subscribe to:
Comments (Atom)
