A Concise Introduction to Computer Programming
By Professor Anna Gourdji
There is an important difference between being a computer user (also known as an "end user") and a computer programmer (also known as a "developer"). The majority of people who use computers at work or at home, (and classified as "end users") are mainly interested in getting a job done. That job could be typing a letter, preparing an invoice, entering information into a database, drawing a picture, playing a game, accessing a web site, and lots more. In order to accomplish any of these jobs, the user must start an application program such as a word processor, spreadsheet, or other such program. It is the job of a group of specially trained professionals to create those application programs. These individuals are the "developers," otherwise known as computer programmers. Their job is to write the code which instructs the computer exactly what to do by communicating with the machine in a language it understands.
The end user never needs to talk directly to the machine. When starting up a computer, the user is presented with an interface that simplifies communication between the human and the machine. On the majority of computers sold today, this interface is the operating system known as "Windows." But beneath this pretty interface lurks a machine consisting of billions of microscopic electronic circuits and switches. The programmer must issue the instructions that access those tiny circuits and switches.
The computer is nothing but a machine which obeys the orders of the human who tells it what to do. This is tricky, because the computer will do EXACTLY what it is told. It will proceed to execute the instructions given by the human, but if one of the logical steps is incorrect, the results will not be as expected. The programmer has a problem to solve and he must know how to communicate with the computer in a precise language it understands. Since the computer consists of logical circuits, the programmer must learn to think logically and come up with a series of decisions that will ultimately lead to the solution of the problem. Each of the billions of microscopic electronic switches can be set to either ON (1) or OFF (0) with nothing in between, causing the circuits to follow a specified order until they reach a destination that leads to the problem solution. This is what makes the computer a binary digital system. Machine language consists of a series of 0's and 1's and that is all the computer really understands. Everything you tell the computer to do is either on or off, yes or no, true or false, one or zero, with nothing in between. However, talking to the computer using only zeros and ones is very difficult for humans to do, so high-level languages were devised which use a more understandable syntax.
A number of different high-level programming languages exist which translate the specific syntax of that language into the machine language of zeros and ones. This syntax consists of vocabulary, punctuation, and strict rules of grammar which must be learned and followed by the programmer. There are hundreds of such high-level languages, each with its own syntax. Some computer languages you might have heard of include BASIC, Java, C, and C++, among others. Most programmers learn several languages but may specialize in one or two.
A series of instructions, called "code," is typed into a text editor using the precise syntax of a particular programming language. Each line of code indirectly tells the computer which direction the circuits should take by specifying which switches to turn on or off. Each switch represents a decision point based on a condition which causes the instructions to branch into one of two directions. If a certain condition is true, it goes one way; if false, it goes the other way. The programmer's job is to set up a series of conditions leading to decisions that will cause the computer to branch to the correct destination. A complex program can involve millions of such decisions.
Writing a computer program is a lot like solving a math problem. Essentially, you need to know what information must be given at the outset, what information must result at the conclusion, and what computational processes must be done in order to arrive at those results. The programmer must be able to track all the decisions and branches the computer makes and follow the thread of logic. The sequence of instructions is important as a line placed in the wrong location can produce incorrect results. Programming is a highly intensive activity but extremely satisfying and rewarding for the person with the right qualifications.
| |