Introduction to Computer Programming


Custom Search

Large speeds of operations and large capacity of storage are some of the most important characteristics of computers. However in order to be useful in everyday life, computers need to be instructed on what to do and how to do it.

Programming is about instructing computers to do things the way you want them to do it. A computer program is a set of basic instructions that the computer follows in order to achieve a well defined task. A programmer is a professional person who writes, tests and debugs sets of computer instructions, called computer programs. These programs are developed using any of the programming languages.

A computer is a set of electronic circuits that use two electric levels: 1 and 0. Of course the instructions given to the computer, in order to execute certain tasks, need to follows certain rules just like the languages human use. The languages used to write computer programs are called programming languages which are then translated into a machine language using the two levels 1 and 0 that the computer understands. A programming language that is closer to a machine language is called low level language. Any programming language that is machine independent and uses natural language items that makes it easy to use is called a high level language.

There are several programming languages that may be used depending on the function of the program to develop: games, animations, robotics, numerical computations, graphing, interactive educational software, etc.

Examples of some of the computer languages are

  • Java (high level general purpose language, with object oriented programming or OOP)

  • Python (high level language for animation and games)

  • C (low level language)

  • C++ (high level OOP)

  • C# (high level OOP with simple syntax)

  • Ruby (high level language for web development)

  • JavaScript (high level language for dynamic website development and games)

Example: Java Language Programming

When using Java language for example, a simple text editor may be used to write a computer program. The following is a Java computer program saved in a text file called
     class FirstExample {public static void main(String[ ] args){
               System.out.println("This is my first program !");

The above program needs to be translated into a language the computer understands and is therefore translated using a compiler using the commands javac as follows.
which produces a file of the form FirstExample.class. When FirstExample.class is run using the command java as follows
        java FirstExample.class
it produces the output
        This is my first program !

Object Oriented Programming (OOP)

In object oriented programming (OOP), classes are created on the basis of objects properties and behaviors. Programmers model objects that are instances of these classes which

  • have descriptive items (called properties)

  • have actions (called methods)

Some of the advantages of OOP are:

  • class definition may be reused in other programs.

  • classes concept allows the definition of any new type of data not previously defined.

References and Books

1 - Programming for the Absolute Beginner 1st Edition - Jerry Lee Ford Jr. - ISBN-13: 978-1598633740
2 - Programming: Computer Programming for Beginners: Learn the Basics of Java, SQL & C++ - 2. Edition (Coding, C Programming, Java Programming, SQL Programming, JavaScript, Python, PHP) - Joseph Connor
3 - C Programming Absolute Beginner's Guide (3rd Edition) 3rd Edition - Greg Perry and Dean Miller - ISBN-13: 978-0789751980
4 - Java: A Beginner's Guide, Sixth Edition 6th Edition - Herbert Schildt - ISBN-13: 978-0071809252
5 - JavaScript and JQuery: Interactive Front-End Web Development 1st Edition - Jon Duckett - ISBN-13: 978-1118531648