What is a source code (or source code)?
Every computer program is written in a programming language such as Java, C/C++, Perl or similar. These programs comprise a few lines up to millions of lines of text, the so-called source code.
The source code, often referred to simply as the "source" of a program, contains variable declarations, instructions, functions, loops and other statements. These explain how the program works. Programmers can also add comments to their source code that explain sections of the code. These comments help other programmers to better figure out what the source code does without having to spend hours deciphering it. The comments can also be helpful to the original programmer. This is especially beneficial if many months or years have passed since the code was created.
Source code and scripts
Short programs called scripts can be executed directly from source code using a scripting engine, such as a VBScript or PHP engine. However, most large programs require that the source code be compiled first, which translates the code into a language that the computer can understand. When changes are made to the source code of these programs, they must be redone for the changes to take effect in the program.
Small programs may use only one source code file, while larger programs may reference hundreds or even thousands of files. Having multiple source files helps organize the program into different sections. Having one file that contains all the variables and functions can make it difficult to find specific sections of code. Regardless of how many source code files are used to create a program, you will most likely not see any of the original files on your computer. This is because they are all combined into one program file or application during compilation.
« Back to Glossary Index