Friday, January 23, 2009

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.

1:The instructions that must be performed.
2:The order in which those instructions are to be performed.
3:The fixed data required to perform the instructions
_____________________________________________________________________
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.

No comments:

Post a Comment