Tuesday, 7 April 2015
The End.
Is it me or did this term went by really really quickly? I remember my first CSC165 lecture like it was yesterday, although I do think it was due to the strike happening and there was lots of stuff going on with that which really made the term feel super short. I just want to say great job to everyone for making it this far, props to Danny as well for being such an awesome instructor, really a job well done. I guess the toughest part of this course was just recursions, trying to visualize it and implement it was all very tricky. But the lectures, labs, handouts, and assignments all did a great job complementing each other in regards to course material nicely. Looking back, I so much more confident in my programming skills than I was before and that's a really great feeling to have. From classes, subclasses to trees, recursions, and linked lists, this course has been a fun challenge, with a nice progression rate, great continuation from CSC108, and great professors, this course has just been great all around. Also, this course has made me feel more passionate about programming than before, which is funny considering how much I hated computer science in grade 11. I guess this is goodbye, I hope everyone has a great and safe summer and good luck on finals!
Blast from the past
In this post we're gonna take a quick look back at one of my old post and just discuss a few things. So the two posts I'm actually going to talk about is Recursions, recursions.. and Object-Orientated Programming. Now I chose these two posts because really I have learned quite a lot over these few weeks and now with my newfound experience I can see things from a different standpoint.
So first off, in Recursions, recursions.., even though this was a short post, reading back on it I can immediately say that I feel much more confident in handling recursions. And the key to that is lots and lots of practice. And with the Test 2 results back, I can say that recursion is definitely much less daunting than it seem back then, and I'm sure many of my fellow classmates all feel the same way. Reading from a handful of blogs posted, I can tell that if we did Test 1 now we'd all ace it, no problem.
Now, onto Object-Orientated Programming. So the reason why I wanted to talk about this was because how CSC165 has changed my train of thought. I've actually been learning Java on Code Academy and it really is the same as Python considering they are both OOP, and it has been a breeze so far. Creating a game in assignment 1 definitely has me thinking differently. Now, whenever I'm playing a game, I think oh how would this look like in code? It just makes the topic that much more fascinating and I can't wait to learn more about programming so I could really apply these skills in real life and even possibly create a game of my own.
So first off, in Recursions, recursions.., even though this was a short post, reading back on it I can immediately say that I feel much more confident in handling recursions. And the key to that is lots and lots of practice. And with the Test 2 results back, I can say that recursion is definitely much less daunting than it seem back then, and I'm sure many of my fellow classmates all feel the same way. Reading from a handful of blogs posted, I can tell that if we did Test 1 now we'd all ace it, no problem.
Now, onto Object-Orientated Programming. So the reason why I wanted to talk about this was because how CSC165 has changed my train of thought. I've actually been learning Java on Code Academy and it really is the same as Python considering they are both OOP, and it has been a breeze so far. Creating a game in assignment 1 definitely has me thinking differently. Now, whenever I'm playing a game, I think oh how would this look like in code? It just makes the topic that much more fascinating and I can't wait to learn more about programming so I could really apply these skills in real life and even possibly create a game of my own.
Review on Week 9
The week of Binary Search Trees, or BST for short. Well this is basically the Binary Trees that Danny showed us a few classes back with a small twist, where similar to the Binary Trees, there can only be a maximum of 2 children nodes per node. However, the right child node is always larger than the node's value and the left child node is always smaller than the node's value. The only tricky part for this week was the delete function in the BST code due to the many conditions that we have to check. But as Danny said, writing down the steps and illustrations definitely make it a lot simpler to implement the body. Here's the function I was talking about:
As you can see his notes really helps make sense of everything and makes implementing it a breeze.
On a side note, Test 2 was this week and it went really well which is really good news. I hope everyone did as well too. Let's just hope that the final would go as well as this!
As you can see his notes really helps make sense of everything and makes implementing it a breeze.
On a side note, Test 2 was this week and it went really well which is really good news. I hope everyone did as well too. Let's just hope that the final would go as well as this!
Review on week 8
Week 8 is the week of Linked Lists. Now I find linked list not as challenging as recursion was, and still is, to me. You see with linked list, drawing out the chain really helps visualize the function and helps figure out on what needs to be done, from changing the size or setting a new back value, drawing a picture definitely help with making sure nothing is missed. For example:
This really shows where the front is, what the next value is, what the back is and the size! This just shows how illustrating the problem can really help with problems.
However walking along the list can be quite tricky though, if the proper procedure is not carried out, the resulting linked list won't be anywhere near what we really want. But again, I want to say that Danny has been fantastic so far with his explanations, he does a really good job giving us a visual image with his explanation as well as answering questions. Also, he definitely moves at a very comfortable pace, allowing me to easily understand everything. This is what he showed in class:
And now reading this the second time, I find it a lot to understand!
On another note, Assignment 2 was due this week, and the TA's went on strike. Minimax was really tough and without the TA's and the 2 hour lineup for office hours, I'm just glad my group had a working one, albeit not a perfect one. At least Danny said he'd be more lenient so hopefully my group still gets a decent mark. The way I see it, the strike may prove to either a blessing or a curse for us students..
This really shows where the front is, what the next value is, what the back is and the size! This just shows how illustrating the problem can really help with problems.
However walking along the list can be quite tricky though, if the proper procedure is not carried out, the resulting linked list won't be anywhere near what we really want. But again, I want to say that Danny has been fantastic so far with his explanations, he does a really good job giving us a visual image with his explanation as well as answering questions. Also, he definitely moves at a very comfortable pace, allowing me to easily understand everything. This is what he showed in class:
On another note, Assignment 2 was due this week, and the TA's went on strike. Minimax was really tough and without the TA's and the 2 hour lineup for office hours, I'm just glad my group had a working one, albeit not a perfect one. At least Danny said he'd be more lenient so hopefully my group still gets a decent mark. The way I see it, the strike may prove to either a blessing or a curse for us students..
Review on Week 7
Just before reading week, Danny introduced us to trees and drew us one using a Turtle. This week, we go further in depth and really define a tree, from its roots to its leaves. We also defined pre-order, in-order, and post-order search when traversing a tree, which is really straightforward with this illustration:
In-order:
Pre-order:
Now to actually traverse the tree in the code to search for the right nodes or alter them can be very complicated, but it can be done using recursion. Recursion is so simple yet so complex at the same time, like tracing out a tree is so simple to us humans, yet for a computer it can be quite tricky! It does require lots of scribbling and mapping stuff out with pen and paper. I really find the handouts to be useful in helping me understand the lecture material better and it engages me so my mind doesn't wander off. And I think with practice makes perfect and soon recursion would be a piece of cake!
However the lab did seem to be a challenge for me as I got stuck at the second function. I couldn't figure out, for the life of me, how to build a list recursively as my method would pass define the list as empty every time it passes through the function recursively. But after some help from the TA, I finally got it to work and learned something new, which is always great!
In-order:
Post-order:
Pre-order:
Images taken off http://en.wikipedia.org/wiki/Tree_traversal
Now to actually traverse the tree in the code to search for the right nodes or alter them can be very complicated, but it can be done using recursion. Recursion is so simple yet so complex at the same time, like tracing out a tree is so simple to us humans, yet for a computer it can be quite tricky! It does require lots of scribbling and mapping stuff out with pen and paper. I really find the handouts to be useful in helping me understand the lecture material better and it engages me so my mind doesn't wander off. And I think with practice makes perfect and soon recursion would be a piece of cake!
However the lab did seem to be a challenge for me as I got stuck at the second function. I couldn't figure out, for the life of me, how to build a list recursively as my method would pass define the list as empty every time it passes through the function recursively. But after some help from the TA, I finally got it to work and learned something new, which is always great!
Monday, 16 February 2015
Object-Oriented Programming
To start off on this topic, I actually had to do a little research on the definition since I wasn't exactly sure what to write about. Doing a quick search on wiki, I found that object-oriented programming (OOP), is based on data structures, and procedural code, which is our methods and functions. So how OOP works in the grand scheme of it all is the objects are basically pieces of gears that work together. For example, in assignment 1, we had the parent classes which had methods that provided the general structure for different kinds of games and the subclass which inherited the general methods from the parent class and also included the methods for Subtract Square and its AI. And together, they produced a fully functional Subtract Square game. A thing to note is that since the methods in the parent classes aren't specific to any games, it usually passes an exception. This exception allows the parent class to have the general structure without having any procedural code, since you need to have code according to a specific game, which is located in the subclass. Some functions that don't belong to a class are called module-level functions. These type of functions operate independently from any other class but may use functions from other classes. Usually these are helper functions that make our lives easier by implementing these helper functions instead of having to code the same lines over and over again. That's basically what OOP is and I hope to learn about the other OOP languages such as C++ and Java in the future.
Recursions recursions..
Recursions are definitely one of the trickier topics so far in this course. Not only is it hard to keep track of the arguments and parameters as you try to visualize the process, knowing when to implement it is also a challenge in itself. On the test, I lost majority of my marks on the recursion section which is a good indication that I need to brush up on my recursive skills. The labs are quite helpful when it comes to doing so, which I have to pay extra attention to for the next test. Another thing I find really helpful is the handouts that Danny does with us in class. I find that I am able to understand things better via demonstrations or examples shown in class and these handouts also causes me to engage in class and think about the topic at hand. I think with the handouts, labs, and a little bit of review, the next test shouldn't be too much of a challenge!
Monday, 2 February 2015
First Impressions! (Weeks 1 - 3)
Introduction to Computer Science... what a ride it has been already within the first 4 weeks! We had a malfunction with the projectors, resulting in what could've been no more than a 240p resolution, but that was fixed and now we have three bright screens glaring back at you, MS3153 has been a pain of a room but I guess I'll have to just make do. Danny is also a very interesting instructor, he definitely puts in the effort to learn students' names and get to know them, he carries a very approachable demeanour and his teaching style is very colourful with his hand gestures and in his documents you can really see it in his writing as well. He's a good instructor in my book, which you can't say about many instructors at this university.
Anyways, enough of my ranting, the course so far has been smooth sailing, this course literally picked up from where CSC108 left off so definitely what the instructors told us about having a solid background IS key. Classes and subclasses were definitely intimidating at first, but with the labs and assignment 1 forcing us to make use of them, they are now much more easier to comprehend. Speaking of which, assignment 1 was lots of fun to work on especially since to me it feels like you are piecing pieces of puzzles together (the classes and subclasses in this case) to complete a bigger picture (the game with an AI). Although I did procrastinate and ended up putting it off until the final week and almost had to work on this daunting assignment alone, not to mention I also had a midterm on the same day it was due! But good news is, I managed to form a group of three with two other individuals and hand it in on time and also had time to study. My teammates really pulled through for me there
The first term test is approaching quickly with only a few days to go! Tests are usually nerve wracking but we also get an aid sheet too, which is a huge plus and a confidence booster. I'm sure it's a piece of cake for everybody but I just want to get it over and done with! And with that being said, it's back to studying for me... Such is the life of a U of T drone.
Anyways, enough of my ranting, the course so far has been smooth sailing, this course literally picked up from where CSC108 left off so definitely what the instructors told us about having a solid background IS key. Classes and subclasses were definitely intimidating at first, but with the labs and assignment 1 forcing us to make use of them, they are now much more easier to comprehend. Speaking of which, assignment 1 was lots of fun to work on especially since to me it feels like you are piecing pieces of puzzles together (the classes and subclasses in this case) to complete a bigger picture (the game with an AI). Although I did procrastinate and ended up putting it off until the final week and almost had to work on this daunting assignment alone, not to mention I also had a midterm on the same day it was due! But good news is, I managed to form a group of three with two other individuals and hand it in on time and also had time to study. My teammates really pulled through for me there
The first term test is approaching quickly with only a few days to go! Tests are usually nerve wracking but we also get an aid sheet too, which is a huge plus and a confidence booster. I'm sure it's a piece of cake for everybody but I just want to get it over and done with! And with that being said, it's back to studying for me... Such is the life of a U of T drone.
Thursday, 22 January 2015
Why geeks should write.
Whenever an assignment was handed out in high school that involved writing, it never failed to make me resent my teacher for forcing us to do such an gruesome task. But no matter how much I hated writing, 15 year old me was too naive to realize that writing is an invaluable asset to have as a student. Unlike learning a topic in biology that you will never use after your high school career, writing proves to be useful as long as you live, from writing reports as a professional, letters or emails, or even posting a post in a forum online. These all require good writing skills to convey your message across in a meaningful manner and to avoid misunderstandings. Therefore, answering the question "Why geeks should write." seems very trivial to me.
However, there are a number of people who thinks that a minimal writing skill should suffice for someone in computer science. After all, we all decided to enrol in a non-humanities course to try and avoid writing papers consisting of thousands of words, where just the thought of that makes me tremble. But as a geek in computer science, writing should be just as vital, especially when you are coding and a third party has to appraise your code or is going to use it. Writing a concise doc string is crucial as it allows the third party to clearly understand what is going to happen and what happens "under the hood", especially if you're working for a software company and many people are going to come across your code. Now, if your code is sloppy and not concise, it may cause lots of misunderstandings and confusion, resulting in an explanation from your behalf. That would be really troublesome, and you have to face the wrath of confused clients or coworkers, which can be really terrifying. And if that's not good enough of a reason to write, what is?
However, there are a number of people who thinks that a minimal writing skill should suffice for someone in computer science. After all, we all decided to enrol in a non-humanities course to try and avoid writing papers consisting of thousands of words, where just the thought of that makes me tremble. But as a geek in computer science, writing should be just as vital, especially when you are coding and a third party has to appraise your code or is going to use it. Writing a concise doc string is crucial as it allows the third party to clearly understand what is going to happen and what happens "under the hood", especially if you're working for a software company and many people are going to come across your code. Now, if your code is sloppy and not concise, it may cause lots of misunderstandings and confusion, resulting in an explanation from your behalf. That would be really troublesome, and you have to face the wrath of confused clients or coworkers, which can be really terrifying. And if that's not good enough of a reason to write, what is?
Subscribe to:
Posts (Atom)




