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 |


Just the mention of programmers and programming conjures up images of groups of people, all with about 8 years of strenuous college work behind them, sitting at machines with a keyboard at one end and a pile of punch cards at the other. Or, if you watched the movie Tron, perhaps your mental picture is of a number of people sitting in little cubicles, all typing on terminals and hoping the "Master Control Program" will permit them to complete their work.

Back in the real world, programming just plain doesn't have to be like that. Programs can range from the ridiculously simple to the hideously complex, with all possible conditions in between. So, let's start by defining just what a program is and what it means, and then we can look at what you might have to do with it.

A program is a list of instructions, together with any fixed information required to carry out those instructions. This applies to computers, of course, but also to any other subject that involves fixed instructions.

Consider a recipe book. Each recipe is a program of its own. It has a list of ingredients (the fixed data) and a list of instructions detailing exactly what to do with those ingredients. When you follow a recipe, you are executing that program.

Consider directions for traveling from here to there. "To get to the Community Center, travel East on Main Street from this intersection. Turn left at the fifth traffic signal and go two miles. The Community Center will be on your right, and there is a large sign out front." Once again, we have here a series of directions which define a list of actions to take, with the essential fixed data required to follow the instructions.

Some machines are designed with one or a few fixed programs already built in. For example, a washing machine allows you to set the desired water level and temperature, pick one of perhaps four possible wash cycles, and start the action going. Of course, you also have to add detergent and the clothes to be washed, but the actions of the washing machine itself are already completely defined and cannot be changed. This washing machine, then, is dedicated to its task and cannot be reprogrammed to perform any other tasks.

Some more modern machines are partly dedicated. For example, a microwave oven today is dedicated to the task of heating whatever is placed inside it. However, it is up to the user to specify, or program, the length of time, the power level, possibly a continuation at a different power level, and perhaps a temperature probe. In a similar fashion, modern ovens can be set to simply bake or to broil, or they can be set up to delay for a preselected time, cook the food that is in them for a preselected time, and then turn off or else drop down to a minimum "keep warm" temperature. And the jokes about programming VCRs are unending.

A computer, unlike washing machines, microwave ovens, and VCRs, is a general purpose device. It is not pre-programmed to take any specific action other than to initialize itself when you turn it on. Once you've turned it on and have your command prompt or graphic desktop on the screen, you must tell the computer what to do -- it won't do anything else by itself.

Although it is always necessary to tell the computer what to do, there are many ways available to do this. Some methods are long and involved; others are quite simple and direct. This group of pages will provide an introduction to programs and programming methods.

Next: Programming Basics

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