Thursday, January 23, 2014

SLOG 1: Object Oriented Programming (OOP)

        Today I'm going to talk about Object Oriented Programming (OOP). Unlike Procedural Programming, the paradigm that has been used widely till 1980s, OOP focuses on the creation of objects that contain both data and functionality. Objects, the instances of classes, are used with other objects to build up programs. Objects interact with each other using methods. Some of the most popular examples of OOP languages are: Python, C++, Java, PHP.
       One of the main characteristic of OOP is that, it emphasizes on data rather than procedures. The paradigm puts sets of methods into classes, making them easier to use and implement into other classes.  Another upside of class-based programming is that, it provides brevity. A program including hundreds of lines can be broken down to pieces, which makes it more organized and thus easier to understand. Overall, OOP provides more flexibility, comprehensibility and concision.


Recursion

     Means defining something by itself, usually multiple times. It's used for calling the same function over and over again until the goal is achieved. The main upside of recursion is that, it allows us to code the program more efficiently. We can cut down 100 lines of program to less than 10 using recursion.