This week is READING WEEK! Yeah~
And also Happy Valentine's Day and Happy Chinese New Year~
2015年2月14日星期六
2015年2月13日星期五
Week 6: Object Oriented Programming PLEASE MARK THIS!!!

As I understood in last week's Object Oriented Programming(OOP) lectures, OOP is a programming method that our programmers define our data in terms of objects. In OOP programming languages like Python and Java, lots of basic things are referred as objects: a list, a function, a class... And for more information, here is exactly what OOP is.
And the interesting thing is within these objects, there are different attributes and properties that can pass down or change by other objects. And there is a famous example that geeks uses a lot to explain the upper things: the dog picture.
A dog has attributes or as the picture says, properties such as its color, height, length, weight, etc. Every dog in the world has these properties, but how do we introduce the dog you have, the unique one called Rayne? We know it has gray, white, and black fur, its eye color is blue and brown... Yes, we use the methods to feed those values in to the properties of "every dog" to describe or introduce an unique one. And these unique objects with values in them are usually called classes.
The primary concept of OOP is the inheritance relationship between two separate classes. OOP's inheritance allows the programmers link these separate classes together, and pass down one's data and value to another: the class that passes the value is called a super class(mother class), and the class that receives the value is called a sub class(child class). And with the help of OOP, coding can be much easier, since the sub class inherits all the methods and properties from the super class.
Since OOP is such a good way to analyze data and different classes, I believe I will try my best to understand more about this effective and efficient method.
2015年2月8日星期日
Week 5: A Tough Week...Well to Me
I would rather call this week "CS test week" because I had both CSC165 and CSC148 mid term test1 on Tuesday and Wednesday.
I spent tons of my time reviewing CSC165 material because this is a totally new course to me; I think I did this test well, but since I did spend much time on CSC148 so I wasted lots of time during my test on the first few easy questions and did not have enough time to finish the last question. I will definitely review 148 more carefully from now on.
And this week we've started learning about recursion and how to trace a function while it runs. And I have been told that recursion is a very important skill in coding, like it will show up again and again in the following years.
Recursion is a fun topic to me. As Diane shows during the lecture by letting the students using the same method to divide a stack of playing cards in to half. Divide one stack of card is easy for one person to finish, but if there are a thousand stacks on the desk, this only worker will be really bored to spend months to finish the job. It is the same as we analyze our data bases when we are coding, it can be hard, boring, and requires lot of time. However, with the recursion method, this worker can only cut this deck into two stacks once and pass the rest of his job to other people, and when they finish their part, they can also pass the rest to more workers; and when all workers finish their job and there are not further jobs need to be done, they can pass their finished jobs back to the upper level workers, and finally all the finished jobs will be collected and analyzed by the first worker. This is way faster and easier, also more precise to be done.
I hope I can learn more advanced methods like recursion and then coding can be more faster and easier for me...
I spent tons of my time reviewing CSC165 material because this is a totally new course to me; I think I did this test well, but since I did spend much time on CSC148 so I wasted lots of time during my test on the first few easy questions and did not have enough time to finish the last question. I will definitely review 148 more carefully from now on.
And this week we've started learning about recursion and how to trace a function while it runs. And I have been told that recursion is a very important skill in coding, like it will show up again and again in the following years.
Recursion is a fun topic to me. As Diane shows during the lecture by letting the students using the same method to divide a stack of playing cards in to half. Divide one stack of card is easy for one person to finish, but if there are a thousand stacks on the desk, this only worker will be really bored to spend months to finish the job. It is the same as we analyze our data bases when we are coding, it can be hard, boring, and requires lot of time. However, with the recursion method, this worker can only cut this deck into two stacks once and pass the rest of his job to other people, and when they finish their part, they can also pass the rest to more workers; and when all workers finish their job and there are not further jobs need to be done, they can pass their finished jobs back to the upper level workers, and finally all the finished jobs will be collected and analyzed by the first worker. This is way faster and easier, also more precise to be done.
I hope I can learn more advanced methods like recursion and then coding can be more faster and easier for me...
订阅:
博文 (Atom)

