Program Design and Development
| English | Chinese | Pinyin |
|---|---|---|
| process | 过程 | guò chéng |
| development process | 开发流程 | kāi fā liú chéng |
| iterative | 迭代的 | dié dài de |
| prototype | 原型 | yuán xíng |
| test | 测试 | cè shì |
| incremental | 增量的 | zēng liàng de |
| program requirement | 需求 | xū qiú |
| Pseudocode | 伪代码 | wěi dài mǎ |
| comment | 注释 | zhù shì |
| Refining | 改进 | gǎi jìn |
Coding is a process, not one burst
- Writing a program is a process 过程, not a single burst of typing.
- Skipping design and coding right away usually wastes time.
- Experienced programmers follow a repeatable development process 开发流程.
- Best of all, the process loops — you improve a little each time around.
Good practice is to start coding immediately, skipping design.
Skipping design usually wastes time — plan first, then code.
The iterative cycle
- A common cycle has four stages: investigate, design, prototype 原型, test 测试.
- Investigate: understand the problem and the users — what inputs and outputs matter?
- Design the structure, build a rough prototype, then test it with many inputs.
- The process is iterative 迭代的 and incremental 增量的: repeat, improving a little each pass.
The iterative development cycle
Development loops through investigate, design, prototype, and test — improving the program a little on each pass.
Order one pass of the development cycle.
Investigate → design → prototype → test, then loop back.
A process that repeats its stages, improving a little each time, is ______.
Iterative and incremental development loops to refine the program.
Planning tools
- A program requirement 需求 is a specific thing the program must do — list them first to stay focused.
- Pseudocode 伪代码 is a plain-language sketch of the logic, written before real code.
- It reads like English but follows a program's step-by-step shape, so a team can agree on the plan.
Pseudocode for a guessing game: pick a secret number → ask the user for a guess → if it is too high or too low, say so and ask again → repeat until the guess is correct. No exact syntax, just the plan.
Pseudocode is:
It reads like English but follows a program's step-by-step shape.
A comment in source code is:
Comments explain tricky code to human readers.
Refining a program after testing is a normal, expected part of development.
A first version is rarely the final one.
Keeping it understandable
- A comment 注释 is a note in the source that the computer ignores but humans read.
- Teams also keep a development log recording their thinking.
- Key mindset: a first version is rarely the final one.
- Refining 改进 a program after testing is normal and expected, not a failure.
Programming is an iterative development process: investigate → design → prototype → test, looping to improve a little each pass. Plan with clear requirements and pseudocode, keep the code readable with comments, and expect to keep refining — a first version is rarely the last.