Sunday, February 9, 2014
Week4
Recursion is not a new thing but actually everyone who's never known it before really need a long time to get used to it. Most people like to read a recursive function by tracing it step by step, using a stack or something like that. Of course, it is the easiest way to do it. But we still got other ways. Because of the recursiveness, we can try to understand the basic part of a recursive function, and then repeat it over and over in our mind to get to the final result.
Sunday, January 26, 2014
Object-oriented programming
we talked about object-oriented programming in the 2nd week of class
the basic definition of object-oriented programming is quite abstract and vague. I could not understand it clearly so I read a series of materials about the definition of “programming paradigm” and what it represents. I want to conclude it here by using simple and clear words.
The word “object” basically represents a concept that we (designers) use attributes and associated procedures to represent any thought, phenomenon, or in simple words, thing . The “objects” are usually instances of classes, also able to be used to interact with other applications or computer programs. They have some real meanings that are not abstract and easy for designers and users to apprehend, such as , points , cups or clients.
The first goal of OOP is, of course, to increase understanding.
There is a huge gap between users and developers in other programming paradigm, such as, functional or logic paradigm. Developers used to talking about database, subroutines or other unreadable structures all the time. Before the age of OOP, the programs were so impenetrable that most of readers(users) had to read a program by tracing it step by step. For example,the notorious “GO TO” instruction witnessed the darkest time of programming paradigm for both developers and users. OPP has extremely lessened the the distance. Rather than focusing on logic or functions, OPP gave a brand new way to “program” our thoughts. We build objects that represent real stuff in our daily life. It essentially merges abstract data types with structured programming and divides systems into modular objects which own their own data and are responsible for their own behavior.
Subscribe to:
Posts (Atom)