Friday, 18 October 2013

#4 Data Structure

No lecture this week. 

Exercise 4 relates to data structure. The three data orders are created using the analogy of tree structure. It consists a root and two nodes and the two nodes extends further with the same structure. Again this is heavily related to recursion. Seems like recursion is the natural way to do a lot things.

So far I cannot tell how this tree data structure is more efficient than others. Hope I can find the answer next week.

Sunday, 13 October 2013

Object oriented programming and Recursion

When I learned C programming in 1st year of university I noticed it was very difficult to manage a large number of variables and passing them to different functions. This problem is perfectly solved by object oriented programming. By having object oriented programming, each object have certain attributes which can store specific info. In addition, methods of objects are pretty much like functions, but they are perfectly incorporated into objects. Each object does its own thing while working with other objects. It resembles organs in human bodies. While doing its own tasks, it also connects with other organs. A great creation it is.

The way I see recursion is it's like the mathematics. To utilize this powerful tool, you need to be able to work your math through. By interpreting problems mathematically, you can relates variables in a certain fashion. Also you need to come up with base cases. And then you just need to implement your logic in your code to let the computer figure out the solution for you. Great!!!

#3 Recursion

There seems to be a lot of emphasis on recursion lately.
Exercises, assignment and lab are all related to recursion...

Programming is the extremely powerful tool to evaluate recursive structure, although sometimes it's not easy to think the way through.

In assignment 1 step 4 and 5, things were intensively related to recursion. It was pretty much like solving a math problem which can't be generalized by a formula but there is certain rules that follows. It was a tough thinking process but I finally was able to come up with a solution with the help of creating a dynamic memory.

I guess the challenge of assignment 1 is what I have been looking for since 1st year. As an engineering student, I haven't been challenged in such a way for so long. Definitely enjoying the course so far. Looking forward to data structures which will be covered in subsequent weeks.

And here comes the midterm...