Introduction to Programming

The ideas behind every programming language, before picking one.

ConceptualbeginnerBeginner-friendlyGuide only -- no course yet

Overview

Introduction to Programming is the mental model underneath every language: what a variable, a function, and a loop actually are, and how a computer executes instructions one step at a time. Learning this first makes any specific language easier, because you're translating a concept you already understand rather than learning to think from scratch.

What it is
A set of universal concepts -- variables, control flow, functions, data -- that show up in nearly identical form in every programming language.
Why it's used
Because jumping straight into a language's syntax without this model means memorizing patterns instead of understanding why they work.
Where it fits
Before any specific language course -- these concepts aren't taught as their own standalone course here (they're concrete in the JavaScript Fundamentals and Python Fundamentals courses instead), but understanding them first makes either easier.

Core concepts

  • Variables and values
  • Control flow (conditionals, loops)
  • Functions and reuse
  • Data structures (lists, key-value pairs)
  • Reading error messages

Example

A variable (count) tracks state, a loop repeats while a condition holds, and each pass changes the variable so the loop eventually ends -- the same shape exists in every language, just with different syntax.

let count = 0;
while (count < 3) {
  console.log("Step " + count);
  count = count + 1;
}

Common use cases

  • Deciding which language to learn first
  • Understanding error messages in any language
  • Recognizing the same pattern (a loop, a conditional) across different codebases

Project ideas

  • Trace through a short program on paper before running it, predicting the output
  • Rewrite the same small program (e.g. a number-guessing loop) and identify which parts are 'the same idea' across two different languages

Official references