Creating Computer Programs
A computer program is a set of commands that tell the CPU what to do.
Software may contain only an executable program file, or it may have several other supporting files such as dynamic link libraries, initialization files, and help files.
An executable file (EXE) is the part of a program that sends commands to the processor that executes the commands in the file. In fact, when you run a program, you are running the executable file. A dynamic link library (DLL) is a partial EXE file, it contains a part of an executable program and does not run on its own;
its commands are accessed by another running program. These files allow programmers to break large programs into small components; it makes the entire program easier to upgrade. DLL files can also be shared by several programs at one time. This feature makes them efficient for program storage. An initialization file (INI) contains configuration information, such as the size and starting point of a window, the color of the background, the user's name, and so on. Initialization files help programs start running or contain information that programs can use as they run. Although initializing files are still in use, many newer programs now store user preferences and other program variables in the Windows Registry. By including
a help file (HLP), programmers can provide the user with PC-based help.
To create a program, using a programming language a programmer creates source code, which is compiled or interpreted to create object code that the computer can understand. Object code, also known as machine code, is the binary language file that tells the CPU what to do.
When you launch a program, the computer begins reading and carrying out its statements. The order in which program statements are executed is called program flow control. When mapping a program, a programmer creates a flowchart.
The steps represented in a flowchart are called an algorithm and usually lead to some desired result.
To perform certain tasks, the actual programming process uses variables and functions. Variables are placeholders for data being processed (e.g. variable Age).
Functions, or mini-algorithms, are discrete sets of code used to perform one task like finding the square root of a number or the average of a set of numbers.