Tuesday, July 24, 2012

Introduction to OOP

Before we dive in the world of programming, we need to be sure we have a couple of concepts straight in our head.
  • Program
  • Programming Paradigm
  • Programming Language

Program

What is a program?
What you should all know by now, as users, is that a program is something you can run on your computer to do something you want. For example, you can use a program to play videos. They can be seen as "black boxes": input comes in - magic happens - output comes out.
Now that we're going to play the role of programmers (we'd be the ones making those fancy programs, being the wizards holding the wand), we need to be aware of a few extra things. The generic definition of computer program is a bunch of code that the machine can interpret and execute in order to reach a specific goal.
That bunch of code should be written using a programming language, which could be very different from each other because there are different things to think of based on which paradigm they are based on.

Programming Paradigm

Brainy says: A paradigm describes a set of concepts or thought patterns, and particularly in programming it describes a programming style. So a programming paradigm represents the ideas we should consider when we program following that paradigm.
As you know by now, we're going to learn a specific programming paradigm, which is Object Oriented. There are more paradigms such as Procedural, Functional and Logic programming and they all have different ideas behind.

Programming Language

A programming language is what we use to make programs that can run in a computer and has a specific syntax (its form, what defines if a program is correctly written) and semantics (the meaning of the code). Languages can follow more than one paradigm, some are more strict than others on that aspect.
What we'll be using to learn OOP is the Smalltalk programming language because it's purely object oriented and it's really easy to learn. The idea is that once you understand the paradigm and how to use those ideas to make a program, then learning a different object oriented language should be quick and simple :D

On the next post we'll be giving our first steps into OOP, so get ready to have lots of fun!

No comments: