Your route · 0 of 17 done
MODULE 00 · PROGRAMMING BASICSStep 1 of 8About 20 min

What a program is

By the end of this step you'll know what a program is, why there are so many languages, and how to use AI to learn instead of to skip learning.

A program is a recipe

A program is a list of instructions a computer follows, in order, exactly as written. Like a recipe, but for a cook with no common sense: it does precisely what you wrote, even when what you wrote is silly.

That's the whole job of programming: writing instructions clear enough for something that takes you completely literally.

Why so many languages?

A programming language is a set of words and rules for writing those instructions. There are hundreds. They exist for different jobs, but the core ideas are the same in nearly all of them:

  • values: pieces of information (a price, a name)
  • variables: names for those values
  • lists: several values in order
  • loops: doing something for each item in a list
  • decisions: doing something only when it's true
  • functions: a named set of steps you can reuse

That's the next four steps. Learn those six ideas once and a new language is mostly new spelling.

Here's the same tiny program in both languages this course uses:

PythonJavaScript
Show a messageprint("Hello, Ridgeline")console.log("Hello, Ridgeline");

Different spelling, same idea: show this text.

Try it

Press Run in either box below. Then change the message to your own name and run it again.

Python · runs in your browser

Output

Press Run (or Ctrl+Enter) to see the output here.

JavaScript · runs in your browser

Output

Press Run (or Ctrl+Enter) to see the output here.

Notice the small differences. Python ends a line with nothing; JavaScript usually ends it with ;. Python says print; JavaScript says console.log. The computer is strict about these: try deleting a quote mark and running it to see what an error looks like. Errors are normal. Every developer sees dozens a day.

Use AI as a tutor, not a ghostwriter

AI can write all of this module's code in seconds. If you let it, you'll finish quickly and learn nothing, and the first time something breaks you'll be stuck. So use it the other way round:

  1. Ask it to explain an idea in plain words, with a tiny example.
  2. Write the code yourself.
  3. Ask it to review your code and explain anything it would change.
  4. Ask "why?" until you could explain it to a friend.

Copy this into any AI chat (ChatGPT, Claude, Gemini, all fine):

Prompt
I'm a complete beginner learning to program. Explain what a variable is, in plain words, with one tiny example in Python and the same example in JavaScript. Then give me a small exercise. Don't solve it for me. When I paste my answer, review it kindly.

Your turn

Make the program print two lines: your name, and the name of a product you'd buy from an outdoor shop.

    Next: Values and variables