Understanding Components and
Before we can begin programming we must first understand
basic computers, what they are, and what they do. There are two major
components of the computer system, the hardware and the software. It is
assumed that if you are interested in programming you are already aware of the
hardware. In fact, seeing as how this is all appearing on the internet, it
is also assumed you are aware of the internet and how it basically works.
That being said much of what is here is going to appear to be of the most
simple nature but it must be understood in order to go into programming
Computer hardware in and of itself is useless without the instructions in software, much like your stereo is useless without the music on the CD you play in it. You can buy software with the instructions or you can write your own instructions and save it to the hard drive or some other storage device You can enter the instructions through any devices you use for data but usually you will write your instructions using the keyboard and store them on disk, usb stick, cd or your hard drive.
You write your software in a programming language. That language may be basic, Pascal, Cobol C++ etc. There are hundreds of such languages to choose from. The most popular for general use are the Microsoft packages of Visual Programming languages that come in Visual Studio, and C++. There are also programs that are primarily used for writing programs for use on the internet like PHP, JAVA and Pearl. Some programmers write in only one language while others use several different languages as needed for the task at hand.
Each language has its own rules governing the use of words and punctuation. These rules are called the languages Syntax. The syntax differs with each language you learn but as you become more involved in programming you will find many similarities between them. The basic logic of programming however will remain nearly the same despite the language you select.
Every computer runs on circuitry that has millions of on-off switches controlled by series of 1's and 0's representing on and off. Each programming language uses a piece of software to convert its instructions in that series of 1's and 0's called machine language. The language translation software is called a compiler or interpreter and it tells you if have uses a programming language incorrectly by using incorrect syntax. Therefore syntax errors are usually fairly easy to find and correct.
Different languages choose between compilers and interpreters. A compiler translates the program you write before it is loaded into your computer whereas an interpreter translates the program as it is running. By; nature the compiled program will usually be smaller in size and run faster than an interpreted program. You the programmer do not choose which the language will do. It is built into the language and is one of the factors that programmers take into consideration when deciding which language. to use.
For a program to work
properly, you must give the computer its instructions in a particular
sequence. You must not leave out any instructions and you must not
put in extraneous instructions. This is how you develop the logic
of your program. A simple illustration of this concept is to show
a person how to make a cake. Suppose you gave them the following
Obviously following this recipe would most likely in up in disaster. It is out of sequence and it has instructions that do not belong in the recipe. It would be much easier to find an error of misspelling of eggs than it would be to find out that the wrong number of eggs was specified.
The above example could have been written in French, German or Spanish instead of English. In the same way the program can be written in any programming language but the logic required would be the same in a different language wither spoken or programming.
ŠKurburski Web Solutions
May 5 2006