Talking about Object_Oriented Programming, I would like to say that almost everything, such as objects and classes, that we have learned though this course except recursion helps us understand the Object_Oriented Programming well, which is short for 'OOP'. OOP is the way of programming in order to design the application more focusing on using objects rather than logic. In Object_Oriented Programming, we don't care much about how the logic goes between input and output, what we mainly care about is the objects that were mentioned in this application.
I remembered that at the beginning of this course, we were learned abstract data types (ADTs) in python including classes, attributes, methods, etc. According to the course notes, "an ADT speci es the intended meaning of the data it stores, and the operations it provides on that data". The stack is an typical example explaining what we basically do with ADTs with some general features of ADTs. A stack, obviously is the object and pop, push and is_empty are methods used to manipulate the stack. Also in our first assignment, we use OOP concepts to make a game with five classes. Our first step is always to find out objects and operations needed by this object.
Inheritance is also a concept which is important and beneficial to understand OOP. Sometimes, we only have general features which does not satisfy some specific requirements. Employee, as an example that was taught in class, is the general object ( parent class). However, we have different kinds of employees under that parent class like hourly employee and salaried employee, which are named child classes used to implement the parent class. As a result, hourly employee and salaried employee share the same features as employee but have their own attributes on the other hand. This method is so helpful so that we don't need to overwrite the same code under a class.
In a conclusion, understanding Object_Oriented Programming concepts is pretty important to us because it is the basic stuff we need to know in order to make a further move into computer science. After I summarize the OOP concepts by looking over the whole thing from the course notes, I feel like this part of knowledge is much clearer to me. If we have something not familiar with, reading course notes over and over again might be a good way to get through.
Monday, 16 February 2015
Sunday, 8 February 2015
impressions of tracing recursion
Tracing recursion is my favourite part in this course so far. It is pretty interesting and for me, it is kind of easy to trace the output through looking at the code that is given. Everytime I see the code, thinking that how magical it is that the function itself goes into its own body code. I've seen the slog from http://sl0gforcsc148.blogspot.ca/, and there is a conversation which I totally agree with that goes like this:
Student: "How do I learn recursion?"
Teacher: "You have to know recursion to understand recursion..."
In order to understand how the body of function works, you have to understand what the whole function does. And then , useing a smart way with only a few lines to illustrate something which goes to unknown even to infinity.
Although I love the way tracing recursion does, there is still one thing I'm worried about. I have no idea how to start if I'm asked to write a recursion by myself. We did the lab exercise in week 4 and there was a part asking us to write a code of recursion which confused me a lot. I know it won't be long to ask us write the recursion code by ourselves, so I still need more practice on that in order to fully understand the recursion part.
Teacher: "You have to know recursion to understand recursion..."
In order to understand how the body of function works, you have to understand what the whole function does. And then , useing a smart way with only a few lines to illustrate something which goes to unknown even to infinity.
Although I love the way tracing recursion does, there is still one thing I'm worried about. I have no idea how to start if I'm asked to write a recursion by myself. We did the lab exercise in week 4 and there was a part asking us to write a code of recursion which confused me a lot. I know it won't be long to ask us write the recursion code by ourselves, so I still need more practice on that in order to fully understand the recursion part.
Sunday, 1 February 2015
Impression of first few weeks...
It has been four weeks since winter semester started. I was quite busy and tired during past few weeks even though a series of tests haven't come yet. It is much busier than last semester partly because I take six courses in total this semester, but mostly because the courses that I take are more difficult, especially CSC148. Every week there is only two hours' lecture plus two hours' lab for CSC148 but it covers more staff than CSC108. Besides, it is quite different than what I used to think.
When I first came to the lab, I got frustrated a lot. What I used to is basically implementing a class that has been given or understanding the code written by others. To tell the truth, I have totally no idea what should I do to design a class by my own through looking at the instruction even though I was learnt ways and several examples during lectures. It was the first time I realized that I supposed to work harder on that.
Thankfully, I get familiar with the course materials through reviewing the lecture slides and even Rampup slides. But I'm still worried about the oncoming test. Hopefully, I could survive after the test.
When I first came to the lab, I got frustrated a lot. What I used to is basically implementing a class that has been given or understanding the code written by others. To tell the truth, I have totally no idea what should I do to design a class by my own through looking at the instruction even though I was learnt ways and several examples during lectures. It was the first time I realized that I supposed to work harder on that.
Thankfully, I get familiar with the course materials through reviewing the lecture slides and even Rampup slides. But I'm still worried about the oncoming test. Hopefully, I could survive after the test.
Sunday, 25 January 2015
Why geeks need to know how to write
I started to write slogs for the course CSC165 last semester totally because they counted for marks. And to tell the truth, I've never had such a habit writing slogs every week recording what have been done and what am I worried about. So when I first heard that we need to write something every week, it was really a bad news to me. However, after 12 slogs have been done, I have to say that keep writing slogs is kind of beneficial to me, not only in the way of writing skills but also in the way of understanding the course material itself. And I think it is also one of the reasons why geeks need to know how to write.
Not only in computer science, but also in other fields of study, geeks need to record what they have done so far so that they can move on to the next part based on those things they just got. What's more, we don't have such a strong brain to memorize all of the stuff we've learned and mistakes we've made. Therefore, it actually a good idea to write down those things as "With the log you’re building a record, a stream of evidence about the bug." and "But in light of fresh evidence, it becomes the key that unlocks the problem and points to a fix. "--Adventures in Debugging-Keeping a Log.
For the course CSC148, we again need to write slogs. But this time would be a little bit different to me because it is not only for marks but also for improving.
----
Not only in computer science, but also in other fields of study, geeks need to record what they have done so far so that they can move on to the next part based on those things they just got. What's more, we don't have such a strong brain to memorize all of the stuff we've learned and mistakes we've made. Therefore, it actually a good idea to write down those things as "With the log you’re building a record, a stream of evidence about the bug." and "But in light of fresh evidence, it becomes the key that unlocks the problem and points to a fix. "--Adventures in Debugging-Keeping a Log.
For the course CSC148, we again need to write slogs. But this time would be a little bit different to me because it is not only for marks but also for improving.
----
Monday, 1 December 2014
Week #12
This is the last week before the class ends and it will be my last slog which is needed to hand in. What we learnt this week is about countability and computability and most interestingly, induction, which is another method used in proof. Since I've already learnt about induction at the beginning of MAT137 and we did a lots of practice at that time. It much easier for me and much clearer to me when I listened to it as the second time. In my opinion, induction is quite useful to solve questions with variable n, which is uncountable as long as this method is actually in your head.
Although the term test result really frustrated me these days, there is a good news happens to me, which is I got a full mark on my second assignment, which surprised me a lot. I can't even imagine that I can get any full mark in university because courses in university seem much more difficult than high school. But I did it! I suddenly feel like maybe I can do better than I used to do by changing my mind of these courses. And it actually encourages me to prepare well on final exam.
I see many amazing slogs on the course website especially slogs from http://www.reddit.com/r/journeythrough165/. I think keep writing slogs every week is a good habit because it can actually record your mental journey through this semester.
Here is a proof using induction :
I see many amazing slogs on the course website especially slogs from http://www.reddit.com/r/journeythrough165/. I think keep writing slogs every week is a good habit because it can actually record your mental journey through this semester.
Here is a proof using induction :
Sunday, 23 November 2014
Week #11
This week is the last second week before the class ends, plus there is a fall break with two days off on Monday and Tuesday, which makes me excited. Although this week doesn't cover too many things, what we learnt, again, makes me confused. I heard that this is the last chapter for this course, which i think is also the most difficult part. Basically, what we need to do is to prove non_computable function and computable function using reduction, which is something related to halting function. I still have no idea about it until I see the course note from course website. I can understand the example that was given and structure is clear to me. But that it, I don't think I can solve the same type of question by myself. I really hope that there will be more examples with solutions on this type so that I could have a deep understanding. The following question is the one appears on the course note, which I think is pretty typical. At least, I think we can figure out the structure of same type of questions after understanding this example.
I also check other students' slog like http://davidhanslog.blogspot.ca/to see if we have the same problem on halting problem.And yes! Many people are confused by this kind of problem.
The following is an example using induction:
I also check other students' slog like http://davidhanslog.blogspot.ca/to see if we have the same problem on halting problem.And yes! Many people are confused by this kind of problem.
The following is an example using induction:
Sunday, 16 November 2014
Week #10
This week, the second term test result has come out, which frustrated me. I remember that when I first
saw the test paper, there were only three prove questions and it seemed like i
had done them before because it looked familiar. But actually, like the last test,
I spent too much time on the first two questions and when I moved on to the
last question, I realized that I didn't have enough time to finish. After the
test, I heard that the second question is the most difficult and the last one
is pretty easy. But what I did is just opposite because I get a full mark of proof
on questions two but get 0 on question three.That looks ridiculous. The most regretful thing is that the question that I get 0 is the one that appears on assignment2 which is just due before the test. Although I use a more complicated way to solve it in assignment , I should have done it on the test.I felt like I could have enough time to finish it, then I was so careful to do first two that I forgot the time, which is the main problem. Also, I always think that what if I get more familiar for the stuff that is tested, this result may not happen to me.
It has already been two tests, and only one final left. I can't loose chance to get high mark next time, so I really need to look everything carefully and get familiar with the whole bunches of knowledge that I have learnt in this course.
problem solving:
if we want to prove something equal, we have to show as following:
problem solving:
if we want to prove something equal, we have to show as following:
Subscribe to:
Posts (Atom)




