Source Code

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.

Updated March 13, 2023 by Brian P.

quizTest Your Knowledge

What kind of program stores user data in a small file called a cookie?

A
Web browser
0%
B
Voice / video chat client
0%
C
Image editor
0%
D
Email client
0%
Correct! Incorrect!     View the Cookie definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Source Code on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.