How to Write Computer Program

Level of difficulty: Intermediate

Computer programming is basically a problem solving technique implemented to deliver specific solutions based on a set of constants and variables associated with the issue at hand. There are basically two types of programming languages, high-level and low-level, wherein high-level languages are those sometimes referred to as human readable or the syntax used can be read and understood by human beings. Low-level languages on the other hand are those which when read can not be readily understood but can be directly interpreted by the computer system. This is why it is sometimes called as machine language. Usually, computer programming takes one specific problem and arrives at a specific solution by breaking it down into smaller but interrelated sets of steps all aimed at resolving the main problem.

Materials Needed:
- Computer
- programming language IDE
- compiler
Step 1
To be able to write a computer program, it is necessary to strengthen the basic skill sets it requires. First is to improve basic math skill because computer programming is mainly giving computational instructions to the machine in binary format. Whether it is text or graphics data, these are ultimately converted into binary form during processing.
Step 2
The next skill set to improve is logic. Computer programming is generally a series of instructions meant to provide a solution. Therefore, even if the correct instruction is given but in the wrong sequence, it is useless. Strong logic skills allow the programmer to put everything in proper order.
Step 3
The ability to plan is another important skill set to develop. Majority of computer programs begin small but eventually develop into something bigger. Having the ability to plan provides the programmer with the necessary skills to design programs that can be updated or upgraded to cater to newer technologies. Many useful programs which lacked efficient planning have all become obsolete.
Step 4
The last important skill set is the basic understanding of both hardware and software environments. A computer system is composed of these two elements. To be able to come up with a functional and useful program, the developer must understand how these components interact and how the instruction codes in the computer program will be executed by both the hardware and the software environments.
Step 5
After strengthening these necessary skill sets, it is important to choose the type of programming language that will be used to create the computer program. For beginners, it is recommended to begin with languages with simple syntaxes.
Step 6
In writing the computer program itself, the first part is always specifying the problem. The computer programmer must make sure that he understands what the problem really is in order to provide the correct solution.
Step 7
The next step is to design an algorithm that will address the problem. This is where everything is broken down into smaller and less complicated sets that when taken together will resolve the initial problem.
Step 8
In this phase, the algorithm is translated into computer codes by following the syntax defined by the chosen programming language. This is an important step because any wrong translation can affect the final program.
Step 9
The last step is the compilation and running of the program. This is where the compiler tool checks if all codes conform to the syntax of the programming language. It however does not necessarily mean that it will follow a logical execution.
Step 10
After finishing the compilation process, the program can be executed to verify if it functions as it was designed to.