Learning App for Kids
Part 5 of 1230 quiz questions

What Is Coding? Writing Instructions a Machine Can Actually Follow

Coding is giving instructions to something that will do exactly what you said, even when you clearly meant something else.

The big picture

The whole idea, in one diagram

Coding means writing exact instructionsA child writes a numbered list of instructions. An arrow carries the list to a robot, which carries out every step in order, exactly as written, without deciding anything for itself.youMY INSTRUCTIONS1pick up the cup2walk to the sink3pour the water4put the cup downrun itdoes exactly thatIf a step is missing, the computer will not guess. It just gets it wrong.
  • You write the steps in a language people can read, like Python or Scratch.

  • A translator turns those steps into the numbers a processor understands.

  • The processor obeys them precisely, in order, without ever guessing what you meant.

Why it exists

What problem did it solve?

The problem

To change what a machine did, you rewired it. Later you had to write raw numbers, one instruction at a time, which almost nobody could learn and almost everybody got wrong.

The invention

Languages were invented that let a person write something close to English or to a diagram, plus a translator program that turns it into machine numbers automatically.

What changed

Programming went from a few hundred specialists to tens of millions of people, including children. Every app, game, website and robot in your life was written by somebody typing in one of these languages.

The story

How it started

  1. about 820

    The idea of a step-by-step method

    👤 Al-Khwarizmi, Baghdad

    He wrote out exact procedures for solving problems, in an order anybody could follow without needing to be clever.

    Why it mattered: That is an algorithm, and it is what all code is. The word itself comes from his name.

  2. 1843

    The first program

    👤 Ada Lovelace, England

    She wrote a complete sequence of steps for Babbage's Analytical Engine, including a loop that repeats. No machine existed that could run it.

    Why it mattered: The first programmer wrote the first program for a computer that was never finished, which tells you that coding is really about thinking, not typing.

  3. 1952

    Code that reads like language

    👤 Grace Hopper, USA

    Her compiler turned words into machine numbers. She went on to help create COBOL, a language deliberately written so that non-mathematicians could read it.

    Why it mattered: This is the moment coding stopped being only for mathematicians and started being a skill anybody could learn.

  4. 1972

    The C language

    👤 Dennis Ritchie, USA

    A language fast enough to build an entire operating system with, yet still readable by humans.

    Why it mattered: Enormous amounts of what runs today are written in C or in languages descended from it, including parts of the phone in your pocket.

  5. 1991

    Python is released

    👤 Guido van Rossum, the Netherlands

    A language designed to be easy to read, with far less punctuation and fewer traps than the ones before it.

    Why it mattered: It became the language most schools teach and most beginners start with, and it is now everywhere in science and artificial intelligence.

  6. 2007

    Coding with blocks

    👤 The Scratch team at MIT, led by Mitchel Resnick

    Instead of typing, you drag coloured blocks that snap together. Blocks that would not make sense simply do not fit.

    Why it mattered: It removed the cruellest part of learning to code, where one missing semicolon breaks everything, and let children think about ideas instead of punctuation.

  7. Today

    Code that writes code

    👤 Programmers everywhere, using AI helpers

    Tools now suggest lines of code as you type, and can draft whole sections from a description.

    Why it mattered: They are fast and confidently wrong quite often. Knowing whether the suggestion is right is now the important skill, which means understanding code matters more, not less.

Key people

Who made it happen

  • Ada Lovelace

    1815 to 1852 · England

    Wrote the first program in 1843, including a loop, for a machine that was never built.

  • Grace Hopper

    1906 to 1992 · USA

    Made it possible to write code in words rather than numbers, and helped create a language ordinary people could read.

  • Guido van Rossum

    born 1956 · The Netherlands

    Created Python in 1991, the language most beginners and most scientists now start with.

  • Dennis Ritchie

    1941 to 2011 · USA

    Created C, fast enough to build operating systems and still readable. Most modern languages borrow from it.

  • Mitchel Resnick

    born 1956 · USA

    Led the team that built Scratch, where code is coloured blocks that only snap together when they make sense.

  • Katherine Johnson

    1918 to 2020 · USA

    A mathematician at NASA whose calculations sent astronauts to orbit and back. Astronauts asked her to check the computer's answers by hand.

Step by step

How your typing turns into something a machine can run

  1. 1

    First you plan the steps

    Before any typing, you work out exactly what has to happen and in what order. Most bugs are made here, in the thinking, not in the typing.

  2. 2

    You write it in a language

    You use a language such as Python, JavaScript or Scratch. These are made for humans to read, with strict rules about how things must be written.

  3. 3

    A translator converts it

    A compiler or an interpreter turns your words into machine instructions. If you have broken a rule, this is where it stops and complains, before anything runs.

  4. 4

    The processor runs it, exactly

    Now the machine obeys, precisely, in order. It will not fill in a step you forgot, and it will not notice that you obviously meant something else.

  5. 5

    You find the bugs

    It almost never works first time. Debugging means finding the difference between what you told it to do and what you meant. This is the actual job.

  6. 6

    You improve it and go again

    Working code is the beginning, not the end. You make it clearer, faster or kinder to use, and every real program is rewritten many times.

Remember this one thing

A computer never guesses what you meant. Coding is the skill of being so exact that being misunderstood becomes impossible.

Try it yourself

Play the sandwich game. Write instructions for making a jam sandwich, then have a grown-up follow them like a robot, doing exactly and only what is written. If you did not say open the jar, they cannot open it. This is the fastest way to feel what coding really is.

Your turn

Quiz: how much did you remember?

Quiz time!

10 questions, picked at random from 30. No sign-in and no score is kept. Play as many times as you like, the questions change every time.

Questions kids ask

Questions about coding

  • What is coding in simple words?

    Coding is writing a list of instructions that a computer can follow. The instructions must be exact and in the right order, because the computer will do precisely what you wrote rather than what you intended.

  • What is an algorithm?

    An algorithm is just a set of steps for getting something done, like a recipe or the instructions for tying a shoelace. Code is an algorithm written in a language a machine can run.

  • Which coding language should a child start with?

    Scratch is a lovely start, because the code is coloured blocks that only snap together when they make sense, so you cannot break it with a typing mistake. Python is usually the next step, because it reads almost like English.

  • Do you need to be good at maths to code?

    You need far less maths than most people expect. Coding is mostly about breaking a problem into small steps and being precise. Some areas, such as games and artificial intelligence, do use a lot of maths.

  • What is a loop?

    A loop tells the computer to repeat something. Instead of writing take one step forward a hundred times, you write repeat a hundred times, take one step forward. Ada Lovelace used a loop in the very first program in 1843.

  • What is debugging?

    Finding and fixing mistakes. The name comes from 1947, when a real moth was found stuck inside a machine. Debugging is not a sign you are bad at coding. It is the main part of the job, for everyone.

  • Can AI write code for me now?

    AI can suggest code, and it is often useful and quite often confidently wrong. It cannot tell you whether the answer is right, which means understanding code matters more than before, not less.

  • How long does it take to learn to code?

    You can make something move on a screen in an afternoon. Getting properly good takes years, like an instrument or a sport. The useful part is that the first small win comes very quickly.

Want lessons that are marked and saved?

The free courses run from playgroup to Grade 5, in order, with three difficulty levels.

See the free courses →