Friday, February 20, 2015

Week 6, summary of object-oriented programming

    I have been killing time this reading week sleeping all day long and i think my IQ will decrease in a decent speed if i keep doing that. So today when i finally decide to open up some school relative stuff i notice that i forgot to update my slog last week. This week is so joyful at the beginning and painful at the end! 
    Back to the topic, this week I will be summarizing the concept of object_oriented programming which i will refer to as OOP in this slog. To start, OOP is a concept of programming which will save programmer's a lot of time writing duplicated code by using super class and sub class. For example, if I want to write some code that organize all humanity into a database, i would create a super class that contain's general feature's of human (i.e gender, height) and sub classes like student, teacher, engineer. This type of programming style would save a lot of time writing code and would be very useful when we try to sort a groups of people in different arrays. To conclude, OOP is a very useful concept in programming with any language since it is efficient, clear (no more then 1000 line of code in one class), and time saving. 

here is a slog that i gave feedback on.
http://hrmvp94.blogspot.ca/2015/02/summary-of-object-oriented-programming.html?showComment=1424472113007#c3219334510117734120

Sunday, February 8, 2015

week 5, midterms and queue ADT

    Lots of things happened after a harsh and stressful week of midterm and i guess i will start off my new week with another update of my slog. I had three midterms this week and the outcome was terrible for two and unknown for one, the unknown one is the csc148 midterm which i felt pretty confident off but since the mark is still not posted, i will talk about it next time. This week we only have 1 lecture because of the midterm and the professor gave us an example on how the stack ADT works, a example on how stack can be use to check if parentheses are correct. Talking about the use of ADT, in this week's lab exercise introduce to more use of stack and also introduced to a new ADT queue. The use of queue is very clearly explained and i can think of a few example of how queue would be useful right now, for example, a coffee shop line up, a MOBA game would use queue to search for opponent given the fact that you line up first. Maybe there is also a lot of applications that uses stack but the use of queue seem more clearer to me at a daily bases. To conclude, things that i found new this week would be the professor introducing the use of stack and the concept of how a queue works and both are pretty straight forward concepts.

Sunday, February 1, 2015

week 4, recursion

    As stated on topic of this week, we started to learn the concept of recursion in python, and it is a very interesting way of solving problem which can only be done by computer. From my understanding of recursion, it is a method of solving problems recursively by breaking a single problem into many single parts and solving them one by one. Furthermore, the first example that our professor gave us when we started recursion is the sum_list method. 
    The function of this method is to sum up all elements of a given list and the elements in it's sub-list. The body of this function can really gave people a headache for those who first seen how recursion works, because the functions calls itself within the function which seems mind blowing! The time for getting how this method works for everyone is different, some people might think about this for days and months or even years and still can't get how recursion work, but this really depend on how everyone's mind work. For me, the word recursion was first heard when i am studying computer science in high school and at the end of the year, our teacher gave us a peek on how recursion works with it's recursive case and terminal case, she even put this on the final exam! This concept i understood in days and i guess a "normal" geek can also do so.
    To conclude, since i already know how recursion worked this week's lecture wasn't that abstract for me and the practical also went smoothly.