B1.1.1 · Approaches to computational thinking
B1.1.1 · 计算思维的方法
Problem Specification
问题规格说明
Before a single line of code gets written, every real software project starts with a document nobody using the finished app will ever see: a precise description of exactly what problem is being solved, for whom, and how success will actually be measured.
在写下第一行代码之前,每一个真正的软件项目都始于一份最终用户永远不会看到的文档:精确描述究竟要解决什么问题、为谁解决,以及最终将如何衡量成功。
How can we apply a computational solution to a real-world problem? Every statement in this topic comes back to this question, and constructing a problem specification is the very first step in answering it: you cannot design a solution to a problem you haven't precisely defined yet.
我们如何将计算解决方案应用于现实世界的问题?本主题中的每一条考纲陈述都会回到这个问题,而构建问题规格说明正是回答这个问题的第一步:你无法为一个尚未精确定义的问题设计解决方案。
Explainer
讲解
A problem specification pins down exactly what a proposed solution has to achieve, before any design or coding begins. It typically includes six parts: a problem statement, constraints and limitations, objectives and goals, input specifications, output specifications, and evaluation criteria.
问题规格说明在任何设计或编码开始之前,精确界定了拟议解决方案必须达成的目标。它通常包含六个部分:问题陈述、限制与约束、目标与目的、输入规格、输出规格,以及评估标准。
A stakeholder is any individual or group affected by, or with an interest in, the problem and its eventual solution. Identifying every real stakeholder, not just the most obvious one, is what a complete problem specification actually depends on.
利益相关者是指受该问题及其最终解决方案影响、或对其有利害关系的任何个人或群体。识别每一个真正的利益相关者,而不只是最明显的那一个,才是一份完整的问题规格说明真正依赖的关键。
Worked example
示例讲解
Building one, piece by piece
逐步构建一份规格说明
A community sports club's members currently book courts by phoning the front desk, and double-bookings happen most weekends. Watch each of the six parts get built for this exact problem, a rough first attempt followed by a properly specified version.
某社区体育俱乐部的会员目前通过致电前台预订场地,大多数周末都会出现重复预订的情况。请看这六个部分如何针对这个具体问题逐一构建:先是一次粗略的初次尝试,再到一份妥善规格化的版本。
Problem statement: names the actual problem, the people it affects, and what a solution would have to fix.
问题陈述:说明实际的问题、受影响的人群,以及解决方案必须解决的事项。
Constraints and limitations: the real boundaries the solution has to work within.
限制与约束:解决方案必须在其中运作的真实边界。
Objectives and goals: a broad, aspirational objective, backed by specific, measurable goals.
目标与目的:一个宏观、有抱负的总体目标,并由具体、可衡量的分项目标支撑。
Input specifications: exactly what kind of data goes in, in what form, and what a valid piece of that data actually looks like.
输入规格:准确说明输入的数据类型、数据形式,以及一条有效数据实际应呈现的样子。
Output specifications: exactly what the solution hands back once it's done, and how that result is actually shown to whoever's waiting for it.
输出规格:准确说明解决方案完成后返回的内容,以及该结果实际如何呈现给等待结果的人。
Evaluation criteria: clear, specific, measurable standards the finished solution will actually be judged against.
评估标准:清晰、具体、可衡量的标准,最终解决方案将依据这些标准接受实际评判。
The pattern across all six parts: every "properly specified" version replaces a vague word ("better," "well," "isn't working") with something concrete and checkable, a number, a named group, a specific format. That's the actual skill "construct a problem specification" is testing.
贯穿这六个部分的规律:每一个"妥善规格化"的版本,都用具体、可核实的内容(一个数字、一个明确指出的群体、一种特定的格式)取代了模糊的字眼("更好""良好""运作不佳")。这正是"构建问题规格说明"这项技能真正考察的能力。
Check your understanding
检验你的理解
Which of the following is the strongest evaluation criterion for a new library self-checkout system?
以下哪一项是新图书馆自助借还系统最有力的评估标准?
Common mistake
常见错误
RecurringA genuinely documented pattern: candidates identify only the most obvious stakeholder (usually the end user) and miss others whose needs also shape the specification, such as the people who will maintain the system, or those funding it. Leaving a real stakeholder out means their actual requirements never make it into the specification at all, which can mean the finished solution solves the wrong problem for them.
反复出现这是一个真实记录在案的模式:考生只识别出最明显的利益相关者(通常是最终用户),而遗漏了其他同样影响规格说明的人,例如日后负责维护系统的人员,或为其提供资金的人。遗漏一个真正的利益相关者,意味着他们的实际需求根本没有被纳入规格说明,这可能导致最终的解决方案为他们解决了错误的问题。
Only one stakeholder considered: "The stakeholders are the club members who will use the booking system." True, but the front-desk staff who will operate the system daily, and the club's committee who is paying for it, are stakeholders too, each with their own genuine requirements.
只考虑了一个利益相关者: "利益相关者是将使用预订系统的俱乐部会员。" 这没错,但每天操作系统的前台工作人员,以及为此付费的俱乐部委员会,同样也是利益相关者,各自都有自己真正的需求。
Multiple stakeholders, each with real requirements: "Stakeholders include the members (who need a fast, simple way to book), the front-desk staff (who need to see and resolve conflicts easily), and the club committee (who need the solution to stay within budget)." Names several genuinely different groups, each contributing a requirement the specification actually needs to satisfy.
多个利益相关者,各自都有真实需求: "利益相关者包括会员(需要一种快速、简便的预订方式)、前台工作人员(需要能轻松查看并解决冲突),以及俱乐部委员会(需要解决方案保持在预算范围内)。" 列出了几个确实不同的群体,每个群体都提出了规格说明实际需要满足的一项需求。
Revision questions
复习题
Past-paper style. Write an answer, then reveal the marking points and mark yourself.
采用历年真题风格。写下答案,然后展开评分要点给自己打分。
[2]Define the term stakeholder.
[2]定义术语利益相关者(stakeholder)。
Marking points
评分要点
- A stakeholder is any person or group who is affected by the system or has an interest in it.
- Their needs and constraints should be identified and reflected in the problem specification.
- 利益相关者是任何受系统影响或对系统有利害关系的个人或群体。
- 他们的需求和约束应被识别出来,并反映在问题规格说明中。
[3]Explain why an objective needs at least one specific, measurable goal attached to it.
[3]解释为什么一个总体目标需要至少附加一个具体、可衡量的分项目标。
Marking points
评分要点
- Without a measurable goal there is no objective way to tell whether the objective has been met.
- A specific, measurable goal (a number, often with a timeframe) lets the finished system be evaluated against it.
- It also sets a shared expectation with stakeholders about what success means, avoiding disputes later.
- 没有可衡量的目标,就没有客观的方法判断该目标是否已达成。
- 一个具体、可衡量的目标(一个数字,通常带时间范围)使成品系统能够据此评估。
- 它还与利益相关者建立关于成功含义的共同期望,避免日后争议。
[6]A school wants to build a system to reduce the number of lost library books. Construct a problem specification for this scenario, including a problem statement, one constraint, and one measurable evaluation criterion.
[6]某学校想要建立一个系统,以减少图书馆丢失书籍的数量。请为该情境构建一份问题规格说明,包括一项问题陈述、一项限制条件,以及一项可衡量的评估标准。
Marking points
评分要点
- Problem statement: a concise description such as, the school loses too many library books each year and needs a system to track loans and reduce losses.
- One constraint, for example: must run on the school's existing computers, or must be built within the term, or must not store data outside the school.
- One measurable evaluation criterion, for example: the number of unreturned books per year falls by at least 30 percent within the first year of use.
- The statement says what and for whom without prescribing the solution; the criterion is a number that can be checked after the system is built.
- 问题陈述:一段简洁的描述,如,学校每年丢失太多图书,需要一个系统来跟踪借阅并减少损失。
- 一个约束,例如:必须在学校现有的计算机上运行,或必须在本学期内建成,或不得把数据存储在学校之外。
- 一个可衡量的评估标准,例如:每年未归还的图书数量在使用的第一年内至少下降 30%。
- 问题陈述说明为谁做什么,而不规定解决方案;评估标准是一个在系统建成后可以检验的数字。
Flashcards
记忆卡片
Active recall for this statement’s key terms.
针对本条考纲陈述关键术语的主动回忆练习。
Keep this statement’s practice with you
把这条考纲陈述的练习保存下来
Free account: unlock every revision question and flashcard for B1.1.1, and every other IB CS 2027 statement.
免费账户:解锁 B1.1.1 以及所有其他 IB CS 2027 考纲陈述的全部复习题和记忆卡片。