向 9 岁孩子解释程序设计是怎么回事

我向我 9 岁的孩子解释程序设计是怎么回事:

  1. 你想做一件事
  2. 你编写代码实现它
  3. 代码无法正确运行
  4. 你修复错误
  5. 当程序正常工作时,你意识到你的想法不对
  6. 你调整想法
  7. 回到第二步

计算机课程和真实世界的差别是:计算机课程只包含第二步到第四步。

原文:

Explained to my 9 yo how programming works:

  1. You have something you want to do.
  2. You write code to do it.
  3. The code doesn’t work.
  4. You fix the mistakes.
  5. When the program works, you realize your idea was wrong.
  6. You fix the idea.
  7. Goto 2.

The difference between CS classes and actual programming is that CS classes only include steps 2 through 4.