What is a program?
You know what a file is. You know that files are dormant until something reads them.
A program is a special kind of file: instead of holding a photo or a song, it holds instructions — a long, precise recipe written in a language your computer’s processor understands. Apps like Chrome, Spotify, Word, your text editor, the terminal itself — every one is a program file sitting on your disk somewhere.
A photo gets displayed. A song gets played. A program gets run.
The file vs. the running thing
This is the second big mental-model unlock (the first was “files are dormant”).
There are two different things, and English uses the same word for both:
- The program — the file on disk. Spotify the file. Doesn’t do anything when you’re not using it.
- The running program — a live, working copy of those instructions, currently executing. Spotify the window playing music.
The technical word for the running copy is a process. You don’t need to use that word, but you do need to feel the difference.
One program, many running copies
Because the running copy is separate from the file, you can have many copies running at once from the same program file.
Open Chrome. Open another Chrome window. That’s one program file, two running things. Open the same text editor twice. One file, two processes. The file on your disk isn’t duplicated — the computer just loaded its instructions into memory twice.
This is why your computer can slow down even though you “only have one app.” You might have forty running copies of things.
Closing vs. quitting
When you close a window, sometimes the program is fully gone — and sometimes it keeps running in the background. (On Mac this is especially common: closing a window doesn’t quit the app. You have to Quit it to stop the running copy.)
The program file is always there on disk. The running copy is what comes and goes.
What’s next
Files, folders, apps, processes — you have the cast of characters. Now: how do you point at a specific file when there are millions of them? With its address. That address is called a path.