Computer Programming (Encyclopedia of Public Health)
Computer programming has evolved from the development of programs that run on big mainframe computers to ones that run on desktop personal computers (PCs) and small local area networks. Individuals working in public health, therefore, have had to become versed in a variety of different PC applications, such as Access and SPSS. They are charged with the responsibility of determining which programs available on the open market are the best suited to the individual needs of a specific health agency. Decisions are based on the information required to be stored and accessed and the skill level of the staff that will utilize the programs. These individuals are then charged with updating and maintaining these systems for optimum performance.
(SEE ALSO: Biostatistics; Information Systems; Information Technology; Statistics for Public Health)
Programming (Encyclopedia of Business and Finance)
Within the context of information systems, the term programming is understood to mean computer programming, which is the process of writing computer programs. A computer program is a detailed, step-by-step set of instructions that is executed by a computer in order to perform a specific task or solve a specific problem. A computer can perform a wide variety of tasks, including arithmetic calculations, text formatting, and submission of documents to the printer to be printed. However, the computer hardware does not perform these tasks by itself. It needs specific instructions on how to go about performing each specific task. It is these task-specific sets of instructions that are referred to as programs.
Computer programs are written in a variety of programming languages. These languages fall into two broad categories: low-level programming languages and high-level programming languages. Low-level programming languages are so named because they are closer to machine language than to human language; that is, it is easier for the machine (computer) to understand them than it is for humans. Machine language is made up of a series of 0's and 1's. Each 0 or 1 is known as a bit (short for binary digit). A group of eight bits, known as a byte, represents one character(i.e., a number or a letter). For example, the number 2 is represented as 00000010 and the letter B as 01000010 in the American National Standards Institute (ANSI) code for character representation inside a computer. There are other coding schemes besides the ANSI standard, such as the American Standard Code for Information Interchange (ASCII) and IBM's Extended Binary Coded Decimal Interchange Code (EBCDIC). Each of these standards represents characters in a slightly different way. Such binary representation of characters is the only thing that the computer can directly "understand" and execute.
In the early days of computer programming, programmers wrote their programs directly in machine language. The time-consuming and painstaking nature of this process led to the development of assembly language, which uses alphabetic mnemonics (rather than binary digits) to write programs. For example, an assembly-language instruction to load the number 5 into a computer's accumulator is: LDA 5. This is more readable than a string of 0's and 1's. A special program called an assembler translates assembly-language instructions into machine-language instructions. Assembly language is machine-specific and is used to directly manipulate activity at the hardware level. Therefore, it is still considered low-level.
Further technological advances led to the development of high-level programming languages such as COBOL (COmmon Business Oriented Language), FORTRAN (FORmula TRANslator). BASIC (Beginners' All-purpose Symbolic Instruction Code), PASCAL, PL/1, and C. These languages are described high-level because they are closer to human language than to machine language. In these languages, the number 2 and the letter B are coded in the program exactly as they are written. Similarly, the following is a valid line of program code in some high-level languages: SUM NUM1 NUM2. A special program, known as a compiler or an interpreter (depending on the programming language) translates the high-level program code into machine language before it is executed.
CATEGORIES OF PROGRAMMING
There are two main categories of programming, systems programming and applications programming. Systems programs are more likely to be written in low-level programming languages, while applications programs are written almost exclusively in high-level languages.
Systems Programming Systems programming involves writing programs that enable a computer to carry out its basic internal functions as well as some other specialized functions. Examples of systems programs include operating systems, device drivers, and utility programs.
An operating system, which comes as an essential and necessary component of any computer system, is a complex set of programs that coordinates activities inside a computer and ensures the proper and efficient use of all the computer's resources. Among its basic functions are scheduling and running multiple jobs inside the computer, managing storage space, enforcing security (e.g., through password verification), and detecting equipment failure. Through its actions, the operating system enables a user to access the computer's hardware and software components. Examples of operating systems include DOS, Windows 95, Windows 98, Windows NT, Macintosh System 8, UNIX, OS/2, and VAX VMS.
Device drivers are those programs that identify particular devices to a computer and enable the computer to correctly use those devices. For example, a mouse driver program helps a computer identify the mouse attached to it.
Utility programs (or utilities) are programs that perform such specialized tasks as reorganizing data on disks, recovering lost data, recovering from system crashes, and detecting and removing computer viruses.
Applications Programming Applications programming refers to the process of developing programs to be used for specific applications, such as a business application (e.g., computing benefits to be paid to different employee classifications) or an academic application (e.g., determining who qualifies for which scholarship, based on specified eligibility criteria). Programming such applications usually requires the programmer to specify the precise logic that would be required to solve the given problem. There are a number of stages in the applications programming process, including problem statement, algorithm development, program coding, program testing, and program documentation.
Problem statement: The programming process begins with a clear, written statement of the problem to be solved by the computer. The importance
of this step cannot be overemphasized. A poorly articulated or poorly understood problem statement will result in the wrong solution being developed for the problem at hand. There should also be a statement of the conditions that would determine when the problem has been solved. All known and relevant facts should also be stated at this stage, as well as any necessary assumptions to be made in the program.
Algorithm development: Once the problem has been clearly stated and all the requirements have been understood, the next step is to develop the program logic necessary for accomplishing the task. An algorithm is defined as a logical sequence of steps that must be performed in order to accomplish a given task. There are some tools available to help the programmer develop the algorithm for a given problem. The two best-known and most widely used ones are the flowchart and pseudocode. Both of these are language-independent, focusing primarily on logic flow rather than the syntax of any particular language. A flowchart uses standard flowcharting symbols to visually represent the flow of program logic. Pseudocode, on the other hand, often looks like actual program code, but it is not, since it does not follow any particular language's syntax. The term pseudocode means "false code." Unlike flowcharting, in which standard, universally accepted symbols are used, there are no set standards for writing pseudocode. Figures 1 and 2 illustrate the use of a flowchart and pseudocode, respectively, to depict the logic needed to add up all the even numbers between 2 and 100, inclusive, and print the resulting total.
Program coding: When the programmer is satisfied with the efficacy of the logic developed in the preceding step, it is time to convert that logic (in either flowchart or pseudocode form) to the specific syntax of the programming language that will be used. At this stage, the programmer adheres strictly to all of the syntax requirements for coding the logic as well as other aspects of the program.
Program testing: The coded program is next checked for errors. At least two types of programming errors must be checked for, namely, syntax errors and logic errors. The presence of syntax errors indicates that some syntactic rule(s) of the programming language has (have) been violated. Syntax errors are detected when the program is compiled (the compiler identifies all such errors within the program). They must be corrected before the program can be successfully executed. Even when all the syntax errors have been corrected, there is the possibility of logic errors. Logic errors arise when the desired logic is incorrectly specified in the program, thereby resulting in an erroneous output. An example is a program that makes students with failing grades eligible for academic scholarships when, in fact, they should not be. In computer terminology, any error in a programyntax or logics known as a bug. The process of correcting these errors is known as debugging.
Program documentation: The programming process is complete when the program has been
fully documented. The documentation can be either incorporated into the body of the program itself (in-line documentation) or it can be a completely separate document (external documentation). Frequently, it is both. Good documentation typically includes the following: a statement of the program's objective(s); descriptions of any input or output records or files needed to run the program; a complete definition of all data names used; and an explanation of the underlying logic, preferably with an accompanying flowchart. Pro gram documentation greatly facilitates program maintenance, which is the periodic modification to, or update of, the program in order to keep it current. This is especially important if the person maintaining the program is not the same one who wrote it.
APPLICATIONS PROGRAMS ON THE MARKET
There is a wide array of programs and compilers on the market today, in the form of various software packages. Compilers for all the major programming languages mentioned above are available on virtually all computing platforms. Most of these commercial packages, such as Visual Basic, Visual C, and Micro focus COBOL, have "visual" front-ends to their programming environments, which makes it easy for programmers to design user-friendly programs for their clients.
Berlioux, Pierre, and Bizard, Philippe. (1986). Algorithms: The Construction. Proof, and Analysis of Programs, trans. Annwyl Williams. New York: Wiley.
Dodd, Kenneth N. (1969). Computer Programming and Languages. New York: Plenum.
Flores, Ivan. (1971). Assemblers and BAL. Englewood Cliffs, NJ: Prentice-Hall.
Iliffe, J.K. (1972). Basic Machine Principles, 2d ed. New York: American Elsevier.
Knuth, Donald E. (1997). The Art of Computer Programming, 3d ed. Reading, MA: Addison-Wesley.
McCracken, Daniel, and Golden, Donald. (1990). Simplified Structured COBOL with Microsoft/Microfocus COBOL. New York: Wiley.
Parsons, June J., and Oja, Dan. (1998). Computer Conceptsomprehensive, 3d ed. Cambridge, MA: Course Technology.
Washburn, Dale W. (1970). Computer Programming: A Total Language Approach. New York: Holt, Reinhart & Winston.