What Is Programming?
A program is a machine doing a job you wrote down once so you never have to do it by hand again. The clearest version of this lives inside Minecraft. A redstone door is a program. You set the inputs (a pressure plate, a lever, a daylight sensor), you wire up the logic (an AND gate from two torches), and the output is the piston that pulls the iron block out of the way. You walk away. The contraption keeps doing its job forever, exactly the way you spelled it out, never bored, never forgetting a step.
The first person to write down a program for a machine that did not yet exist was Ada Lovelace, in 1843. She was working with Charles Babbage, an English mathematician who had designed a mechanical computer the size of a small house called the Analytical Engine. The machine was never finished in their lifetimes. Ada wrote a set of notes describing how it could compute Bernoulli numbers, step by step, by feeding it punched cards. Those notes are recognized today as the first algorithm meant for a machine. She also wrote, in the same notes, that the machine would only ever do exactly what we knew how to order it to do — it could not invent. That sentence is still the rule. The machine never invents. You spell out the steps. It runs them.

A redstone door has three parts every program has. Inputs come in (the pressure plate fires a signal). Logic decides what to do with them (the AND gate only opens the door if both the pressure plate and the lever are on). Output goes out (the piston retracts). When you write code, you are wiring the same three parts in your head. The hard part is breaking the job into steps small enough that the machine can do each one without thinking. The machine cannot guess. The machine cannot fill in what you forgot. If you forget to tell it to close the door, the door stays open forever.
Try the smallest possible version of writing a program. Not in code — in English. The job is to make a peanut butter and jelly sandwich. Write the recipe down. Be honest about every step.
1. Get out two slices of bread.
2. Open the peanut butter jar.
3. Put peanut butter on one slice.
4. Open the jelly jar.
5. Put jelly on the other slice.
6. Press the slices together.That looks fine to a person. To a machine it is broken. Step 1 does not say where the bread is. Step 2 does not say to pick up a knife first. Step 3 does not say how much peanut butter, or which side of the bread. There is a famous classroom exercise where a teacher takes a recipe like this from a student and follows it as a robot would: stands there holding the closed jar, because the recipe never said "use the knife to scoop." The class learns the lesson in 30 seconds. The machine does what you said, not what you meant.
Now ask the same recipe to make 100 sandwiches. Read it again with that in mind. Step 1 changes from "get out two slices of bread" to "get out 200 slices of bread." Step 3 becomes "spread peanut butter on slices 1, 3, 5, 7… all the way to 199." You can feel the missing thing here. You want a way to say "do this same step, 100 times, with the count going up each time." That missing thing is called a loop, and we will write our first one in a few lessons. For now the point is that you noticed you needed it. That noticing is half the job.

In 1952 a Navy officer named Grace Hopper got tired of writing programs as raw 1s and 0s. The computers of her time, like the UNIVAC I, only spoke binary. To add two numbers you typed out the exact pattern of switches the machine needed. Grace's idea was that humans should write in something close to English, and a second program — she called it a compiler — should translate the English into the 1s and 0s. Every other programmer in the room told her the idea was impossible. Computers, they said, only do math. They do not translate language. She built it anyway. The first compiler shipped in 1952. The Python you are about to learn exists in a direct line from her decision. You will type words. A program will translate those words into something the chip can run. You never see the 1s and 0s. That is the gift Grace fought for.
The way programmers think about a job is to break it into things and actions on those things. A sandwich is a thing. Spreading is an action. A slice of bread is a thing. Pressing is an action. The pressure plate is a thing. Firing a signal is an action. Most of this site is going to live inside that pattern. We will use simple words at first — things and features and actions — and later, in the lesson called Object-Oriented Programming, you will learn the proper names: objects, attributes, methods. Same idea. New labels.
Twenty years after Grace Hopper, in 1972, the Dutch computer scientist Edsger Dijkstra gave a talk at the ACM's Turing Award ceremony called "The Humble Programmer." His point was that programs almost always do something different from what their writer intended, and the only defense was for the writer to admit, up front, that their head was too small for the job. The machine is brutally literal. The programmer has to be even more careful than that. Dijkstra's talk is the reason every working engineer today writes a recipe down on paper before they touch a keyboard. The thinking is the work. The typing is just dictation.
You wrote a recipe. You can feel the hole where the loop should go. The recipe does not run on anything yet — it is words on a page. The next lesson opens up the box that recipes actually run inside. Time to look at the machine.