Monday, March 24, 2014

Trees

The topics after recursion, is a brand new list type called trees. From the lectures, we have learned that trees are lists that consist of different parts like root, node and leaf. However, the most important part that I feel is the fact the Trees are actually recursive other than ordinary lists which are just ordered the way how you stuck an element inside it. This property of trees is very beneficial towards data storing, because the way that trees are implemented helps user to find an exact element so much quicker and is very organized in the way that if some parts are missing it can restored easily based on the rest.  Personally, in this stage i find Trees are pretty complicated for me to understand, especially using recursion to build different method for it. The reason why that I find it hard is because, Trees combines the knowledge of data structure and recursion, and this is quite mind bending which I'll spend more time to understand in the future.

Saturday, March 8, 2014

Third entry

Continuing from week 3 , we went deeper into recursion and learned all different kinds of recursion structure. Recursion is the act of calling itself inside the function, this helps us as a programmer to write code much more efficient and easier for others the understand. For example, if u want to find the sum of a list using the methods from beginning,  we might have to find the sum of individual  elements and store it at a place then add them up.However, by using a recursion method we can find all the sum for each element at once and it will shorten the code by a lot. My biggest problem for now, is to trace a given recursion and how to discover the base case for some kind of required method. I guess i just need to practice and see more kinds of recursion until i can manage it well.

Friday, February 28, 2014

Second entry

This is the second entry of my SLOG, for a long time from the first one. There were many new concepts and it is starting to get a bit challenging. The first thing that I would like to talk about is the inside touch of different classes, method and modules that exist in python.
During week 3 we learned that the easiest way to copy a class and modifying is by using an inheritance. The inheritance has all the same properties as the original class but it could be change by accessing the function and modifying the context in it. One interesting factor of inheritance is when u change the base class the subclass will also be affected but changes made in subclass will only affect itself.


Further on week 3, we started to learn all kind of exception and how it is being raise. Personally I fell like is a pretty straight concept, the only thing that need some attention is the clause try :   -----------      except :  ------- . Code under try, whenever an exception happens the program ignores anything else under the error line and jumps into the except part.

Thursday, January 23, 2014

Object-Oriented Programming


From the 3 weeks of lectures, I have learned how to design and program in an object-oriented perspective and starting to understand a little bit more of how recursion works. I really love the concept of programming in a way of creating and manipulating objects, this helps me to relate programming to real life problem more easily and helps me to create programs that are more organized and logically. The most challenging part until now it’s definitely to think of programming recursively. The fact of calling a function itself is kind of mind bending for me and I might need to put some extra effort in this field for the further weeks.

My lectures went pretty well for these weeks but I still feel like we should have 3 lectures per week rather than 2, so that we could learn about the material more thoroughly in class. Tutorials are pretty helpful for answering unsolved problems since we have shorter lecture time, but I still prefer to have a little bit more of exercise, especially independent works.