Source code
Also known as: codebase, program code
Source code is the set of written instructions, in a programming language such as Python, JavaScript, or C, that programmers create to build software.
People can read and edit it, and it's then compiled or interpreted into a form computers run. Open-source software shares its source code publicly, while proprietary software keeps it private as a trade secret. While source code looks like gibberish to non-programmers, it's often a company's most valuable asset.
Source code, explained at three levels
At home
Source code is like a recipe written in a special language. A computer follows the recipe to make the app you use.
At work
Source code is valuable intellectual property, so access to it should be controlled and backed up.
At home
In a browser, right-clicking a web page and choosing 'View page source' shows its HTML source code.
At work
Source code lives in version control repositories. Organizations protect it with access controls, reviews, secret scanning, and backups, and some use escrow agreements with software vendors.
At home
Open-source code can be inspected by anyone, which builds trust but doesn't guarantee security. In my opinion, popular and well-maintained projects are safer than obscure ones.
At work
Assume source code may eventually leak, so keep secrets out of it. Use least-privilege repository access, audit logs, signed commits, and clear ownership of code written by contractors and AI tools.
Real-world examples
At home
Sophie was curious how a website worked. She viewed its page source and saw the HTML and scripts behind it.
At work
Marcus manages development at a Calgary software firm. He added contract clauses confirming that the company owns all source code contractors write.
How it compares
| feature | Source code | Compiled program |
|---|---|---|
| Readable by | People | Computers |
| Format | Text files | Binary files |
| Can be edited | Easily | Not practically |
| Shared in open source | Yes | Often also provided |
Source code is the written recipe. A compiled program is the finished dish.
For analysts
In vendor contracts, I'd clarify source code ownership and escrow. If a small vendor disappears, access to its source code may be the only way to keep a system running.
History & origin
Early programmers in the 1940s and 1950s wrote instructions in machine code or on punched cards. Higher-level languages such as FORTRAN in 1957 and COBOL in 1959 made source code more readable. In the 1970s and 1980s, companies increasingly kept source code private, prompting Richard Stallman to launch the free software movement in 1983. The 'open source' label was coined in 1998, and platforms such as GitHub later hosted hundreds of millions of code repositories. Leaks of source code, such as from video game makers and tech firms, have shown how sensitive it can be. In my view, source code is both the blueprint and the crown jewels of a software business.