What is "programming"
Programming is coding, modeling, simulating or presenting the solution to a problem, by representing facts, data or information using pre-defined rules and semantics, on a computer or any other device for automation.
Instructions for this lesson
editContents
editProgramming is the art and science of translating a set of ideas into a program - a list of instructions a computer can follow. The person writing a program is known as a programmer (also a coder).
The exact form the instructions take depend on the Programming Language used. Languages run the spectrum from very low level like Machine Language or Assembly, to a very high level like Java. Lower level languages are more closely tied to the platform they are targeted for, while Higher level languages abstract an increasing amount of the platform from the programmer.
In other words, low level programming languages represent the instructions in a manner that resembles more closely the way the computer actually works. High level languages do resemble more the way the human mind works. Each type is a good fit depending on the particular case. Whenever speed and resource consumption are important, low level languages can provide an advantage since they cause much less "translation" and are less generic, thus causing less load on the computer[1]. High level languages have much more abstraction and thus are better suited for tasks where maintenance and complex design is required.
After a programmer has finished writing the program, it must be executed. Traditionally, some languages (like Basic) are interpreted, while others (like C) are compiled prior to execution. Interpreted languages are executed "on the fly" at run time, while compiled languages have a separate compilation step that must be completed prior to running. Compilers are able to make certain optimizations that are unavailable to interpreters.
The program may fail to compile or execute due to syntax errors. These are errors caused by doing something that is unknown or illegal according to the language they have used. These errors have to be corrected before the program will execute.
If the program runs, the programmer must then verify that the program is working as they intended it to. When things don't go as the programmer intended, the error is said to be a bug. To eliminate bugs, the programmer goes through a process called debugging, where he tries to isolate and fix the source of the problem.
Notes
edit- ↑ However, given advances in modern compilers and the complexity of the underlying systems, a high-level language paired with advanced compiler can often produce more efficient executable code than an alternative hand-coded in an lower-level language.