Process to pass from problem to code. How did you learn?

后端 未结 13 1785
离开以前
离开以前 2020-11-30 09:40

I\'m teaching/helping a student to program.

I remember the following process always helped me when I started; It looks pretty intuitive and I wonder if someone else

13条回答
  •  没有蜡笔的小新
    2020-11-30 10:09

    I think there's a better way to state your problem.

    Instead of defining it as 'a system,' define what is expected in terms of user inputs and outputs.

    "On a window, a user should select an item from a list, and a box should show him how much it costs."

    Then, you can give him some of the factors determining the costs, including sample items and what their costs should end up being.

    (this is also very much a TDD-like idea)

提交回复
热议问题