How Code Actually Runs: From Source Text to a Running Program
This is an independent educational guide, not the website of any software vendor or standards body.
koderich.com is an independent, non-commercial field guide to learning programming. It explains how code works, how beginners choose a first language, how to practice effectively, and the vocabulary of software development. It sells nothing, runs no courses, accepts no advertising, recommends no specific paid product, and has no affiliation with the Unicode Consortium, the IETF, the Linux Foundation, or the Open Source Initiative, or any other named organization.
You have written a few lines of code. You press Run. Something happens on the screen. What actually took place between the text you typed and the result you saw? This guide walks through that path step by step. No prior knowledge is assumed. You will meet the key pieces — source code, interpreters, compilers, runtimes, the operating system, network protocols, and open-source licenses — and see how they fit together. The goal is not to make you a programmer today, but to give you a clear mental model of what programming really is, so you can judge tools and courses on their merits.
1. The one idea that explains everything else
A computer does exactly what the instructions say, nothing more. It has no common sense, no intuition, and no ability to guess what you meant. If you tell it to add two numbers, it adds them. If you forget to tell it to display the result, nothing appears. Every surprising behavior of software — a crash, a wrong answer, a page that loads forever — traces back to this: the machine followed the instructions it was given, and those instructions were not what you thought they were. There is no magic and no malice. There is only the gap between what you intended and what you actually wrote.
2. The pieces defined
Source code is the text you write — the instructions in a programming language. An interpreter reads that text and carries out the instructions directly, line by line. A compiler translates the entire text into another form (often machine code) before anything runs. A runtime is the support system that a program needs while it runs: memory management, input and output, and other services. The operating system manages the computer's hardware — files, memory, keyboard, screen, network — and lets your program use them without talking to each device directly.
Illustrative example — Leo writes a three-line program:
name = "Leo"
print("Hello, " + name)
print("This is a test.")
The interpreter reads line 1, stores the text "Leo" under the name name. Line 2 builds the string "Hello, Leo" and sends it to the screen. Line 3 does the same with "This is a test." The operating system handles the actual drawing of characters. This example is illustrative, not real output from any product.
3. A numbered walkthrough
- You write source text in an editor. The editor stores the text as a sequence of characters.
- Those characters are encoded as numbers. The Unicode standard, maintained by the Unicode Consortium, defines how characters map to numbers. For example, the letter 'A' is a specific number. Without a shared encoding, the same file would look different on different systems.
- An interpreter or compiler reads the text and checks its syntax — the grammar of the language. A missing parenthesis or a misspelled keyword is caught here.
- If the syntax is valid, the program is executed step by step. The runtime provides memory and other services as needed.
- The program produces output — text on the screen, a file saved, a network request sent.
- If something fails during execution, an error message points back to a line number in your source text. That line number is your best clue.
4. How programs talk to the network
When a program fetches a web page, it does not send a vague request. It speaks a protocol — a set of rules both sides agree on. Those rules are published as RFCs by the IETF. An RFC is a document that describes exactly how a protocol works: what messages look like, what order they arrive in, and what each response means. Your program might use HTTP, which defines how a client asks for a resource and how a server replies. The details are in the RFCs, not in your code. Your code just follows the rules.
5. Where free operating systems fit
Much of the world's software runs on systems built around the Linux kernel. The kernel is the core of the operating system: it manages memory, processes, and devices. the Linux Foundation hosts the kernel project and many other open infrastructure projects. It provides a neutral home for developers to collaborate. When you run a program on a Linux-based system, the kernel is the layer that carries out the low-level work your program requests. You do not need to know its internals to write code, but knowing it exists helps you understand why some instructions are faster or slower.
6. Open source in plain language
Open source means the source code is available for anyone to read. But reading is not the same as using. A license defines what you may do with the code: copy it, modify it, or include it in your own project. the Open Source Initiative maintains the definition of open source and reviews licenses to confirm they meet that definition. It publishes a list of approved licenses. When you see a license like MIT or GPL, that is a legal document, not a suggestion. Understanding it is part of using code responsibly.
7. A short FAQ
Do I need to understand all of this before writing code?
No. You can start writing simple programs today. But knowing what happens when you press Run will help you debug faster and choose better tools.
What is the difference between an interpreter and a compiler?
An interpreter runs your code directly, line by line. A compiler translates your whole program into another form before it runs. Both are ways to turn source text into action.
Why does character encoding matter?
Because computers store numbers, not letters. If your editor and your program disagree on which number means which character, text becomes garbled. Unicode is the standard that prevents this.
What is an RFC?
An RFC is a document published by the IETF that describes a technical standard, often a network protocol. It is how the rules of the internet are written down.
Is open source the same as free of charge?
No. Open source is about the license, which governs what you may do with the code. You can sell open-source software, and you can use it commercially, as long as you follow the license terms.