#0101 · 方法
动手前先复述任务
写代码之前,先用四行复述这个任务:
1. 要达成什么结果;
2. 输入和输出是什么;
3. 有哪些约束(性能、兼容、不能动的地方);
4. 哪些明确不在这次范围内。
我确认后再开始。
Before writing any code, restate the task in four lines: 1) the result it must achieve; 2) the inputs and outputs; 3) the constraints (performance, compatibility, what must not be touched); 4) what is explicitly out of scope. Start only after I confirm.
小杜
已贴 1,040 张上墙共收到 0 个章