Programming Fundamentals
Variables, types, control flow, functions, recursion, memory, errors, and testing: the ideas every language shares.
Topics in this field: 11
- What is Programming? — Writing precise instructions a machine can execute, and choosing the data those instructions work on.
- Variables — A name bound to a value in memory. Assignment rebinds or overwrites; scope decides where the name is visible.
- Data Types — The kind of value: integers, floats, booleans, text, and collections. The type decides the operations, the memory, and the pitfalls.
- Conditionals — Branching: run one path or another based on a Boolean expression. The first decision a program can make.
- Loops — Repeat work while a condition holds or for each item in a collection. The source of both power and infinite loops.
- Functions — A named, reusable computation with inputs (parameters) and an output (return value). The unit of abstraction and of testing.
- Recursion — A function that solves a problem by calling itself on a smaller piece. It needs a base case and progress toward it.
- Stack and Heap — Where a running program keeps its data: the fast, automatic call stack and the flexible, longer-lived heap.
- Pointers and References — A value that is a memory address. Pointers let code share, modify, and link data without copying it.
- Error Handling — Deciding what a program does when something goes wrong: raise, return, retry, or stop — and always clean up.
- Testing and Debugging — Checking behavior against expectations, and finding why it differs. Reproduce, hypothesize, observe, fix, lock in with a test.