Latest Post

6/recent/ticker-posts

What is Computer Programming?

Computer Programming is the art of writing useful, sustainable and extensible source code that can be interpreted or compiled by a computer system to accomplish a significant task. Computer programming can be carried out in one of a number of languages, from a higher-level language to direct writing in low-level machine code (that is, the code that most directly controls the computer's hardware specifications) to microcode writing (which directly controls the computer's electronic components).

Program development involves steps similar to any problem-solving task. There are five main elements in the programming process:

  • Defining the problem
  • Planning the solution
  • Coding the program
  • Testing the program
  • Documenting the program

We will discuss each of them separately.

Defining the problem

Suppose, as a programmer, you are contacted because your services are needed. You meet with users in the customer's organization to analyze the problem or with a systems analyst who describes the project. Specifically, the task of defining the problem is to identify what you know (data provided by the input) and what you want to obtain (output - the result).Eventually, you produce a written settlement that, among different things, specifies the kind of input, processing and output required. This is not a simple process.

Planning the solution

Symbol flowchart and correspondence flowchart Two common ways to plan the solution to a problem are to draw a flowchart and write a pseudo-code, or possibly both. Essentially, a flowchart is a pictorial illustration of a step by step technique to a problem. It consists of arrows that represent the direction the program takes and boxes and other symbols that represent actions. 

What is computer programming?

It is a map of what your program will do and how it will do it. The American National Standards Institute (ANSI) has developed a popular set of flowchart symbols. How they can be used in a simple flow chart of a common everyday act - preparing a letter to be sent by mail. Pseudo-code is a non-standard language similar to English that allows you to declare your solution more accurately than in plain English, but with less precision than necessary when using a formal programming language. Pseudo-code allows you to focus on the logic of the program without having to worry about the precise syntax of a specific programming language. However, the pseudo-code is not executable on the computer. We will illustrate this later in this chapter, when we focus on language examples.

Coding the Program

As a programmer, your next step is to code the program, that is, express your solution in a programming language. You will translate the logic of the flowchart or pseudo-code - or every other tool - into a programming language. As we have already noted, a programming language is a fixed of rules that offers a manner to educate the computer on which operations to perform.

There are many programming languages: BASIC, COBOL, Pascal, FORTRAN and C are a few examples. You may end up working with one or more of them. We will discuss the different kinds of languages ​​in detail later in this chapter. Although programming languages ​​operate grammatically, a bit like the English language, they are much more accurate. To make your program work, you must follow exactly the rules - the syntax - of the language you are using. 

Of course, using the language correctly is no guarantee that your program will work, more than speaking grammatically correct English means that you know what you are talking about. The point is that the correct use of language is the necessary first step. Therefore, your coded program must be coded, probably using a terminal or personal computer, in a way that the computer can understand.

One more note here: programmers often use a text editor, which is more or less like a word processing program, to create a file that contains the program. However, as a beginner, you will probably want to write the program code first on paper.

Must Read It: What are the uses of Computers? 

Testing the program

Some specialists insist that a well-designed program may be written correctly the first time. In fact, they claim that there are mathematical ways to prove that a program is correct. However, the world's imperfections are still with us, so most programmers get used to the idea that their newly written programs are likely to have some errors. 

This is a little disheartening at first, since programmers tend to be precise, careful, detail-oriented people who take pride in their work. Still, there are many opportunities to introduce errors into programs, and you, like those who came before you, are likely to encounter several of them. Eventually, after coding the program, you must prepare to check it on the computer. This step involves these phases:

Checking the table

This phase, similar to proofreading, is sometimes avoided by the programmer who is looking for a shortcut and is eager to run the program on the computer after writing. However, with careful checking, you can discover several errors and possibly save time in the long run. When checking the table, you simply sit down and mentally plot, or check, the logic of the program to try to ensure that it is viable and error-free. 

Many organizations take this phase a step further with a step by step, a process in which a group of programmers - their colleagues - analyze their program and offer suggestions in a collegial way. 

Translating

A translator is a program that (1) checks your program's syntax to ensure that the programming language has been used correctly, providing you with all syntax error messages, diagnostic calls, and (2) then translates your program into computer shape I can understand. 

A by-product of the process is that the translator informs you if you have misused the programming language in any way. These kinds of errors are called syntax errors. The translator produces descriptive error messages. For example, if in FORTRAN you misspell N = 2 * (I + J)) - which has two closing parentheses instead of one - you will receive a message that says: "PARENTHESIS WITHOUT MATCHING". (Different translators can provide different words for error messages.) Programs are most commonly translated by a compiler. 

A compiler translates your entire program at once. The translation involves its original program, called the source module, which is transformed by a compiler into an object module. Pre-recorded programs from a system library can be added during the link / load phase, which results in a loading module. The charging module can then be run by the computer. 

Debugging

A time period used considerably in programming, debugging method detecting, locating and correcting bugs (errors), usually by running the program. 

These bugs are logic errors, like telling a computer to repeat an operation, but not telling it how to stop repeating. At this stage, you run the program using test data that you create. You should plan your test data carefully to make sure that you test all parts of the program.

Post a Comment

0 Comments