A girl and a robot thinking together

Let’s think it through · Start with a story

The girl asks the robot to “tidy up the table,” but the robot does not know where the books belong. A wish has to become steps that can actually be carried out.

Try imagining you are the robot: follow only the instructions that were written down. Do not silently fill in requirements that were left unclear.

Break down the process

Follow the numbered steps, then explain them in your own words
  1. Identify the goalBooks with books, pens with pens
  2. Write clear stepsPick up a book and put it on the shelf
  3. Check and repeatIf books remain on the table, continue

Programming means expressing the rules for solving a task in a language a computer can process.

“Tidy up” does not say what objects to move or what actions to take. “Put every book on the table back on the bookshelf” is closer to an executable instruction. A real program would also need to explain how to recognize a book and control the robot’s movements.

01What exactly is programming?

Programming means first figuring out how to solve a problem, then writing the steps as a program a computer can execute.

For example, to make a computer add two numbers, a person needs to specify: read two numbers, add them, and output the result.

Define the goal

What problem are we solving?

Design the steps

In what order should we do things?

Write a program

Express those steps in a programming language.

02How do people tell computers what they mean?

A person can say, “Sort these scores from highest to lowest,” but a computer will not guess the exact method on its own.

A person’s goal→Clear steps→Computer executes them

Programming is therefore a kind of “translation”: turning a human goal into steps that are precise enough to carry out.

03Why do we need programming languages?

The CPU ultimately executes machine instructions, but writing machine instructions directly is difficult and error-prone.

Programming languages provide a way to express logic that is easier for people to read and write, such as C++:

int c = a + b;

04Programming is more than “typing code”

Real programming usually includes understanding the problem, designing data and steps, writing code, testing, finding bugs, and making changes.

Understand the problem

What are the inputs and outputs?

Design a method

How can we reach the result step by step?

Write the code

Express the method precisely.

Test and revise

Find errors and keep improving.

05Why must a computer follow rules?

Every statement, condition, and piece of data in a program has a precise meaning. A computer will not fill in the logic just because it thinks “you probably meant this.”

That is where programming trains your thinking: turning vague ideas into rules that are checkable, executable, and repeatable.

06How does a program run after it is written?

Different languages are executed in different ways. For C++, a common process is:

Source code .cpp→Compile and link→Run the executable

Later articles will explain compilation, input and output, and bugs.

What you have learned

  • Programming turns a method for solving a problem into a clear, executable program.
  • A computer does not guess what people mean; it processes data according to explicit rules.
  • Programming languages help people express program logic, which still has to be transformed into an executable form.
  • Programming involves more than typing code: it includes understanding, designing, testing, and debugging.

Your turn

Write instructions for a partner to take three blocks from the table. If they pick up two at once, did they break your rule?

Have an answer? Click to see the explanation

If you only said “take three blocks,” you did not specify how many to take at a time. “Take one block at a time, and repeat three times” is clearer. Notice the ambiguity, then add a rule.