How Is a Computer Program Made?
-
Understanding Computer Programs
-
Computer programs are essentially a series of instructions, either to components of the operating system, or the operating system's Application Programming Interface (API). Most programs are written with a computer programming language, such as C++, C, Assembly. There are two types of programming languages: high-level and low-level. Essentially, the goal of all these languages is to create a binary executable that performs the function intended. All programs that run on an operating system operate through libraries or pure binary code.
Compilers and Editors
-
Compilers and editors are both essential to creating a program. Without the editor, you cannot write the instructions for the program. Without the compiler, the program cannot exist. Compilers perform the job of interpreting the input from the code files that a programmer writes and create object files. They use a linker to link these files into one well-organized executable output. All low-level programming languages create programs in this manner. Some low-level programming languages include C, C++, ASM (Assembly), and Delphi (without using its standard libraries).
-
Runtimes and Libraries
-
For high-level programs, you might not end up with a purely binary result. The result might not even be compiled. Some high-level programming languages include Java, C#, and J#. C# and J# both utilize the Microsoft .NET Framework. This framework acts as a runtime, which, by definition, is a set of libraries that act as a mediator for the program. Programs utilizing .NET Framework are not binary. They are compiled in a totally different way, so that the runtime library can work with the programs. This "wrapping" of code is what makes high-level languages what they are. The Microsoft .NET Framework runtime library is called CLR (Common Language Runtime). Java programs operate in a similar manner but use the Java Runtime Libraries.
Interpreted Languages
-
Web programming languages for the most part are known as interpreted languages. A good example of an interpreted language is PHP. An interpreted language is a programming language that does not compile in any manner. An editor is used to make the script, and an interpreter looks at the code and throws out an output based on what the code specifies. In large-scale applications, interpreted languages slow down the program. Developers should never use interpreted code for large-scale applications, since every action in such a program would need to be interpreted byte by byte through the runtime environment and the program would take a very long time to perform its tasks.
Since browsers are essentially just HTML interpreters, Web programmers do not have a choice in the matter of choosing not to use an interpreted language. However, this does not mean that Web programming cannot be made more efficient. PHP code can be improved by shortening the code for a specific task if the integrity of the task is not compromised.
-