How Computer Programming Works
Computer programming is like writing instructions that a computer follows to run a program and perform specific operations. Writing codes mean writing lots of instructions and because of the computer’s speed, you can imagine that there are millions of instructions in a matter of second. The process of writing source code would require expertise in different subjects such as the familiarization of the application domain, and specialization in algorithms and formal logic.
The programming process involves steps which are similar to problem-solving task such as defining the problem, planning the solution, coding the program, testing the program and documenting the program.
The process begins by identifying the input-given data and the output. In planning the solution, the programmers can draw a flowchart to see the step by step solutions to the problem. Others write a Pseudocode, a nonstandard language that permits the programmers to focus on the program logic. Afterwards, the next step is coding the program and translating the logic from either the flowchart or pseudocode to a programming language such as Pascal, BASIC, COBOL, C and FORTRAN. Then, a test is conducted by some experts to prove that a program is correct. The steps involved in testing are desk-checking, translating and debugging. Lastly, documenting the program is the last and necessary process. It is a written description of the programming cycle and information about the programs like the origin of the problem, narrative description, logic tools, descriptions of data record, list of programs, and testing results.
Languages in programming can be ranged from lower to higher which has five generations such as the following:
Machine Language. It is the lowest level of language that represents the data and program instructions. The instructions are composed of sequences of ons which coded with number 1 and offs with a 0. These digits correspond to the on and off electrical states of each type of the computer. Each type has its unique machine language.
Assembly Languages. These are mnemonic codes and abbreviations which are very easy to remember. An assembler program acts as translator to the programmer who uses this type of language in order to convert the assembly language program to a machine language.
High-level Languages. This is a machine-independent language that lets the programmer concentrate on the logic rather than the details of the machine architecture which is required in low-level assembly languages. COBOL, Perl, C, C++ and Java are examples of high level language.
Very High Level Languages. It is a programming language that has a very high level of abstraction and used as a professional programmer tool. These are limited to a specific application and type of task. Therefore, this programming language is referred as goal-oriented type.
Natural Language. Because of the use of natural language in order to access a knowledge base, it is called as knowledge-based system. The most common application is interacting with another database.
When choosing a language, programmers consider several possibilities such as the dictate of work environment, the need to interface with other programs, the suitability for the task, availability of the language installed in the computer and expertise of the programmer in languages.