Source code is text written in a programming language that contains a program's instructions. Source code files are human-readable plain text files that include variable declarations, functions, loops, and other statements that tell a program what to do. Some programs only need a few lines of source code, while others may consist of millions of lines.
Software developers usually follow several common conventions when writing source code to make complex code easier to read and modify. For example, developers should name variables in a way that describes their purpose, and also use a consistent method for indenting code blocks that clearly separate functions. Developers also typically include comments to explain sections of code. Comments help other programmers (and even the original programmer in the future) understand what each code element does.
Short programs in some programming languages are known as scripts; these programs may be run directly from the source code using a scripting engine, like VBScript or PHP engine. However, most programming languages require that a developer compiles a program's source code before it can run. Compiling translates source code into binary machine code, stored as executable files that the computer can understand and run.
A program's source code may be kept in a single file or distributed across many interlinked files. Breaking source code into several files helps keep a program's functions organized by their purpose. Many programmers use an Integrated Development Environment (IDE) to write and manage their source code files. An IDE typically includes a code editor, a version control system, a runtime environment, a debugger, and a compiler. These tools make it easier for a developer to write code, test it, find and fix bugs, and compile it for distribution within a single program.