Home www.play-hookey.com Wed, 06-23-2021
| Direct Current | Alternating Current | Semiconductors | Digital | Logic Families | Digital Experiments | Computers |
| Analog | Analog Experiments | Oscillators | Optics | HTML Test |
| Programming | Programming Basics | Programming Languages | Levels of Programming Languages |

Programming Basics

Since a computer program consists of a series of instructions for the computer to carry out, plus any necessary fixed data required to perform those instructions, the process of programming consists of defining those instructions and that data. Thus, in order to design a program for a computer, you must determine three basic elements:

At this stage in the game, you're not even working with a computer, except possibly as a word processor so you can write your work to a disk file instead of onto a piece of paper. Either way, however, all of the early stages of computer programming are essentially paper processes.

The reason for this is that you must determine, clearly and in detail, exactly what you want the computer to do before you start telling the computer to do it. Remember that the computer will carry out the instructions you give it, exactly as given. It can't tell what you wanted; it can only do what you said.

Before your new program ever gets anywhere close to a computer, there are several steps you must take. These steps are:

Define the problem.

Before you can tell a computer or even another person what you want to accomplish, you must know it yourself. You must be able to clearly state what the computer is to acomplish or produce as the end result of the activities it will carry out.

Define the solution.

Now that you know what information the computer is to produce as its final output, you need to look at what information you have available and what information you still need, that will apply to that output. You also need to define the equations, logical procedures, or other methods you will need to use to manipulate the raw input data into becoming the final desired output.

Map the solution.

The third paper step in programming is to lay out the solution in its proper sequence. Remember that the order in which actions are taken is just as important as the actions themselves. You need to organize the solution procedure into its proper sequence, taking choices and alternatives into account.

Once you have the problem defined and its solution designed and fully mapped on paper, you are almost ready to start the process of writing the actual program code in some computer language. Before you do, however, you will need to consider the possible languages available to you, and the specific computer platform(s) as well. Different languages are often optimized for different kinds of tasks, so it is important to choose a language that is well suited to the task you have in mind.

Prev: Programming Next: Programming Languages

All pages on www.play-hookey.com copyright © 1996, 2000-2015 by Ken Bigelow
Please address queries and suggestions to: webmaster@play-hookey.com