Monday, August 16, 2010

Introduction to the Programming Concept

As usual, before we start doing our program, we have to know the concepts exist in programming. We have to know what is program, programming and programmer.

So Program is a set of instruction that tell computer what to do. Means, the instruction will allow you to control your computer, making it do what you want it to do. In another words (much more complete definition), the program is written as a series of  human understandable computer instructions that can be read by a compiler and linker, and translated into machine code so that a computer can understand and run it.

Then, what  is a programmer? A programmer is a person who is writing codes or instructions to the computer to make computer do what sould it do.. :-).... I call this process as a computer programming. Not yet understand what a is meaning of programming? Hmmm...

Ok, the computer programming actually is a process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new. Then, the purpose of programming is to create a program that exhibits a certain desired behavior. Hmmm.. looks easy hmm???

Programming languages can be used to create programs that control the behavior of a machine, to express algorithms precisely, or as a mode of human communication. C++ is a programming language. It needs a compiler to make computer understand what programmers wrote. A compiler turns the program that you write into an executable that your computer can actually understand and run. So in doing C++ programming, you need C++ compiler such as Microsoft Visual C++, Borland C++ or else.

Regarding to http://www.cprogramming.com/tutorial/lesson1.html , Each of these compilers is slightly different. Each one should support the ANSI/ISO standard C++ functions, but each compiler will also have nonstandard functions (these functions are similar to slang spoken in different parts of a country). Sometimes the use of nonstandard functions will cause problems when you attempt to compile source code (the actual C++ written by a programmer and saved as a text file) with a different compiler. These tutorials use ANSI/ISO standard C++ and should not suffer from this problem (with sufficiently modern compilers). Note that if you are using an older compiler, such as TCLite, you should read check out some compatability issues.


Lets leave about C++ compiler for a while, we look at the basic concepts of programming first. I just cover for some concepts when we are doing programming. These are integrity, clarity, simplicity, effiiciency, modularity and generality.

Integrity is the accuracy of the calculations since it will be meaningless if calculations are not carried out correctly.

Clarity means the overall readability of the program, with particular emphasis on its underlying logic. If a program is clearly written, it should be possible for programmer to follow the program logic with ease.

Simplicity refers to the clarity and accuracy of a program are usually enhanced by keeping things as simple as possible, consistent with the overall program objectives.

Efficiency is concerned with execution speed and efficient memory utilization.

Modularity refers to breaking down the program into a series of identifiable subtask that enhances accuracy and clarity of a program and facilitates future program alterations and
 
Generality is to make a program to be as general as possible, within reasonable limits. A considerable amount of generality can be obtained with very little additional programming effort.
 
Ok, enough for this entry. Next issue, I will write about the components of program structure and the steps in doing programming..

No comments:

Post a Comment