This is my last blog entry for CSC148, and I'm surprised how fast this term went by. Nevertheless, I enjoyed the slog writing experience a lot more than I expected. It served as a review session for me every week to go through the materials taught in class, and then to deeply reflect and summarize them. The idea of keeping an updated slog is definitely something I will consider for my future classes, because it's great for keeping track of course concepts, and it also encourages me to think deeply the reason why we learn them.
For me when it comes to writing, I want there to be a true purpose. I also wish to imprint and open up different ideas and perspectives to whoever is reading them, let it be my fellow classmates or other readers. Otherwise, it would just appear like I was trying to get the slogs over with, and it would be quite boring to read. I like to take my time with these things, so that I can develop a clearer purpose whenever I write an entry for slogs, and in the end, I actually found myself looking up more resources to grasp other ways and perspectives to understand a problem or concept. Some of these concepts include recursion, trees, and listed list data structures. I especially had a hard time understanding and correctly implementing recursive functions, because a different and difficult concept, but it is quite powerful. What helped me was just to assume the function itself works then go ahead and implement the function body. The labs provided great practices and it was unfortunate we lost 4 labs due to the TA strike.
Overall, I enjoyed CSC148 and the challenges that arose on assignments and class materials, I have definitely learned a lot. I wish everyone the best of luck on their finals!
Sunday, April 5, 2015
Sunday, March 29, 2015
Revisiting My First Blog Post
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.
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.
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
Sunday, February 15, 2015
Object-Oriented Programming
Now that reading week is coming up and we are half way through the course, it is a good time to reflect upon the concept of Object-Oriented Programming (OOP). In CSC108 last term, we only skimmed OOP by introducing classes and some basic methods. At first, I did not fully understand the true purpose of creating these classes and methods, however, after completing assignment one and the mid-term, I have gained a much better understanding. I especially came to realize how OOP takes programming as a problem-solving process where careful application and the break down of problems is required. Like I mentioned in my previous post, being able to break down a problem into manageable pieces and solving it by properly implementing classes and methods may be the hardest process yet. This is something that I still need to master as I had no idea how to even start assignment one at first.
Furthermore, there are three crucial components of OOP that must be understood - classes, objects, and inheritances. An object is an instance of class. For example, "hi" is an instance of the class str. A class is a representation of a type of object. In other words, we can say that it is the blueprint or template that describes the object. Inheritance is a very powerful concept where classes inherit a state and behaviour from their superclasses. One way I like to think of OOP is with the following model. First, let's take our hand as an example. The hand is a class and our body has two objects, the left hand and right hand. In this case, grab, push, and touch are applicable methods to the class. We can also implement a class called foot, which can inherit some (touch, push) but not all (grab) methods and behaviours from the superclass hand.
The term is half done and I think I have gained a much better understanding of OOP. I look forward to return from reading week to see what the course has in store.
Furthermore, there are three crucial components of OOP that must be understood - classes, objects, and inheritances. An object is an instance of class. For example, "hi" is an instance of the class str. A class is a representation of a type of object. In other words, we can say that it is the blueprint or template that describes the object. Inheritance is a very powerful concept where classes inherit a state and behaviour from their superclasses. One way I like to think of OOP is with the following model. First, let's take our hand as an example. The hand is a class and our body has two objects, the left hand and right hand. In this case, grab, push, and touch are applicable methods to the class. We can also implement a class called foot, which can inherit some (touch, push) but not all (grab) methods and behaviours from the superclass hand.
The term is half done and I think I have gained a much better understanding of OOP. I look forward to return from reading week to see what the course has in store.
Sunday, February 8, 2015
Recursion Recap
In this week’s class, we started to dig deeper into recursion functions, which I mentioned in my last post. This was a challenging concept to grasp at first. After practicing a lot of tracing exercises for recursion in class and in tutorial, I have definitely gained a better understanding of this function. When a recursion function is called, the function clones itself to make copies of its code, local variables, and parameters. There was an interesting example of recursion I came across while reading online. Imagine that the surfaces of two mirrors are exactly parallel with each other, then the nested images that occur are a form of infinite recursion. However, recursion doesn’t necessarily make the code run faster, nor does it use less memory, but it sure makes our code simpler and more concise.
In this week’s tutorial, we were able to do some exercise problems associated with stacks. I was able to implement my own recursion function to solve the problems and was surprised when it worked. My function gave the right results according to the examples assigned. However, I came to realize that I do not have a concrete understanding of recursion because I struggled while implementing them.
In the mean time, I am looking forward to reading week which is when I have more opportunities to review this topic.
In this week’s tutorial, we were able to do some exercise problems associated with stacks. I was able to implement my own recursion function to solve the problems and was surprised when it worked. My function gave the right results according to the examples assigned. However, I came to realize that I do not have a concrete understanding of recursion because I struggled while implementing them.
In the mean time, I am looking forward to reading week which is when I have more opportunities to review this topic.
Sunday, February 1, 2015
Impression of First Few Weeks
With utterly no experience in the field of computer science, CSC108 was the only computer science course I took in my first term. Python is the first program I used to learn the basics of programming. Now, just entering the second term of my university career, I was anxious to walk into the broad classroom of CSC148. CSC148 is a different experience than CSC108 because the teaching style and expectations are quite different, thus it seemed a little bit intimidating. There was not a lot of material covered in the first few weeks of class, but the lessons were very rigorous and required a deeper level of understanding. We began learning about classes which was slightly touched upon in CSC108, so I wasn’t confident going into this topic. During lectures, I had a general understanding of the concept that was being taught. I definitely had a disadvantage compared to those who are more experienced with computer science. But I am not discouraged to learn and improve my skills in the field of coding. Some new topics I found interesting that was covered in lecture were the short-hand techniques and the turtle function, which I have never seen before. The assignment really tested our understanding of classes, subclasses, and inheritance and made me come to the conclusion that trying to break down a problem and know exactly where to start is by far the toughest part of this course so far.
We recently started to cover recursion which is a challenging concept. The tutorial really helped me gain a better understanding of how recursion works, but I am still in the process of learning how to properly implement these functions.
The test is coming up soon and, I am very nervous to see if I really do have a concrete understanding for the main concepts of this course. Good luck y’all!
We recently started to cover recursion which is a challenging concept. The tutorial really helped me gain a better understanding of how recursion works, but I am still in the process of learning how to properly implement these functions.
The test is coming up soon and, I am very nervous to see if I really do have a concrete understanding for the main concepts of this course. Good luck y’all!
Saturday, January 24, 2015
Why Geeks Should Write?
You get it or you don't. That's the myth about computer science.
People often say if you're really good in the field of mathematics and you're logically oriented, computer science shouldn't be too much of a challenge. However, are these the only, necessary skills? I firmly believed in this generalization, but my thoughts have changed quite a bit. When it comes to people like us, we rarely describe ourselves as "writers". But with the story I am about to tell you, I just might change your point of view.
In my first CSC148 lab, I thought I was going to finish this lab alone because I didn't know anyone. Thankfully, a girl asked to partner up with me - we both seemed pretty clueless at first. She took out her laptop, and I was surprised to see that she had already finished the entire lab exercise. She told me she loves to code and finished it at her leisure. I was also told that she almost completed assignment 1 for CSC148, which no one I know had started at the time. Since she was already finished, she helped me better understand the concepts that were covered in this exercise. Thanks to her I finished early and we had time to chat. I found out that she is in third year, majoring in English. However, she realized she wanted to do a computer science minor. She said she hates math and that she was never good at it. Yet she enjoys to code and solve problems because she believes it's like English. We are advised to write out our problems and translate it into code. This is exactly what she does. Being the English major she is, coding in computer science is easy for her. I never realized that there is such a strong correlation between language and coding. Ouuuu an epiphany.
Maybe calling us "geeks" is being too naïve because not all of us are smart enough to realize that computer science isn't simply just math and logic, but a language.
Why not have a taste of both sides?
Subscribe to:
Comments (Atom)


