Friday, March 4, 2016

Week 7 Slog: Halfway through the semester

We are halfway through the semester now. So far, the main topics we learned about are inheritance, Abstract Data Types(ADTs), linked lists and recursions. The midterm covered inheritance and ADTs so I know most people already know what they are. Therefore, in this slog, I will be talking about the newest topic we learned, which is recursion.

When I first heard about the word recursion, it reminded me of induction. This is because, when I was learning about weak induction and strong induction in Calculus II, the professor would often say that to check if its a strong induction, you need to see if the sequence is recursive. At that time, I didn't really fully understand what that meant. However now, I finally understand what recursion means. Recursion is a function that calls itself until it is forced to stop. What this means is that it will have an exit code which will make it stop, however until then it will call itself. Usually, a recursion function will have two or more conditions. One condition will return a value directly, if the condition is met, without using any recursion like an exit code. The other condition/s will be the main part of recursion where it will break the input into small parts and solve it one at a time. The function will call itself over and over again until the small parts are solved. In the end it will combine all the answers and return it.

Also recursions are very similar to loops. Sometimes it's more time efficient and easier to read than loops. Therefore, it is a great substitute for loops in certain situations. 


Sunday, February 7, 2016

Week 4 in CSC148

This week in class, we continued learning about stacks and ADTs. Last week, I had a little bit of trouble understanding stacks however after re-reading the slides and codes, it made more sense. During this week's lecture we also got introduced to linked list. Linked lists are a set of elements where there is a link to go the next element or it could also back to the element before it. I found the concept to be fairly easy to understand. However, since our tutorial focused on stacks this week, I didn't get the chance to look at it again this week. The exam is next week, so I have been preparing for it by studying all the lecture notes, looking over the codes we did in class , and redoing the labs. Hopefully I will be able to do well on the exam. To other students reading this, good luck on the exam. 

Wednesday, January 27, 2016

The beginning of my SLOGs: Week 1

Hi, I am a student at University of Toronto taking Computer Science II or otherwise known as CSC148. In this blog, I will be writing about my experiences in this course every week. In the first week, the lecturer went over the course syllabus. In this course, we will be learning about Abstract Data Types(ADTs), recursions, exceptions, designs and efficiency. As someone who has never taken any computer science courses in high school and only did Computer Science I, I have no idea what some of these topics are, such as ADTs, recursions and exceptions, therefore I am very excited to learn about these. I am also excited to learn how to make my code more efficient as I had trouble with that in Computer Science I. One thing I hope for is that the assignments and labs relate to real life situation because I feel that if the questions are related to real life problems I will be more motivated to do it. My goal by the end of this semester is to master all these techniques and be able to apply them to different exercises, assignments, as well as personal projects.