# Source code

> The human-readable text that programmers write and that a program is built from.

- Level: Basic
- Topics: Software
- URL: https://tidbit.legios.com.ar/source-code/
- In Spanish: [Código fuente](https://tidbit.legios.com.ar/es/source-code/)

**Source code** is the set of text files where programmers write a program, in a programming language like Python, Java or JavaScript. It is meant to be read by people: it has names that make sense, comments that explain decisions, and a structure split into files and folders. All the source code of a product together is often called its **codebase**.

What you install on a phone or a laptop is usually not the source code but the result of building it: a compiler or other tools turn the text into a form the computer runs quickly and that is very hard for humans to read. That is why having the source code matters. With it you can understand exactly what a program does, fix it, change it or rebuild it; without it you mostly cannot.

Companies usually treat their source code as a valuable secret. **Open source** projects do the opposite: they publish it so anyone can read, reuse and improve it, under a license that sets the rules. Either way, source code today almost always lives in a version control system like Git, which keeps the full history of who changed what and when.

## An analogy

The architect's plans for a building. Living in the house does not require them, but if you want to know where the pipes run, or add a floor, you need the plans.

## Keep in mind

- Readable text, written by people in a programming language.
- It is built (compiled or packaged) into the program that users actually run.
- Having the source lets you inspect, fix and change a program.
- Usually kept in Git; published openly in open source projects.

## Go deeper

- [Source code on Wikipedia](https://en.wikipedia.org/wiki/Source_code)
- [Compile (MDN glossary)](https://developer.mozilla.org/en-US/docs/Glossary/Compile)

## Related terms

- [Programming language](https://tidbit.legios.com.ar/programming-language/): A precise, written language people use to give instructions to a computer.
- [Python](https://tidbit.legios.com.ar/python/): A popular programming language known for being easy to read and quick to write.
- [JavaScript](https://tidbit.legios.com.ar/javascript/): The programming language that runs inside web pages and makes them interactive.
- [Compiler](https://tidbit.legios.com.ar/compiler/): A program that translates source code into instructions a computer can run directly.
- [Open source](https://tidbit.legios.com.ar/open-source/): Software whose code anyone can read, use, change and share.
- [Git](https://tidbit.legios.com.ar/git/): A time machine for code: every change saved, by whom and why.
