learning-picostack

Programming

What it is

Programming is deciding now what you want to happen later.

It’s what you do now so that what you want to happen later will happen later.

It’s a manifestation of your will. What you want to happen will happen.

How you do it

You reduce your will to language. You use your words to describe what you want.

Your words describe what you want to happen later. You write them while you are programming.

The words you wrote are called a program.

The language you use to write the words is a programming language.

When it’s later

Your program will become the will of something later. You will see to that.

When what you want to happen will happen it will happen because your program is running.

It will start to happen when some event occurs.

That event will cause your program to start running. It will run until your will is accomplished.

Will your program stop?

That is a good question.

That is called “the halting problem“.

It depends on how you wrote the program. It depends on what you wanted to happen.

Exercises

  1. Think of some examples of programming, and write about them. Hint: someone wants something to happen later and thinks about it now
  2. What might go wrong? Consider this example, “Mom wants the dishwasher loaded after supper.” Give some examples for each of these things that might go wrong:
    1. The programmer (Mom, right?) isn’t totally sure about what they want to happen
    2. The programmer doesn’t write very clearly or precisely
    3. The “something” (a family member) that (who, right?) later tries to run the program makes mistakes
    4. Can you think of other things that might go wrong?
    5. Will the program stop?
  3. Write a program and give it to a sibling to run. Decide what you would like the sibling to do at a later time, and write down instructions. When you ask them to “run” your program, you would expect that they would do what you imagined them doing as you were writing the program.