B.1 Computational Thinking: Specifying Problems and Success Criteria

Welcome to this chapter! Have you ever tried following a recipe that simply said "bake until done" without telling you the oven temperature or how many minutes to wait? It would be nearly impossible to know if you succeeded or failed. In computer science, we face the exact same challenge. Before writing a single line of code or designing an algorithm, we need to know exactly what problem we are solving and precisely how we will measure success.

This chapter is the foundational first step of the computational thinking process. Mastering this will not only help you score top marks on Paper 2 (under Theme B: Computational thinking and problem-solving), but it is also essential for scoring well on your internal assessment: the computational solution.

Note: Later stages of the computational thinking process, such as breaking problems down (covered in "Decomposition and abstraction"), designing step-by-step procedures (in "Algorithmic thinking and algorithm design"), and checking results (in "Testing and evaluating solutions"), all rely directly on the specifications and success criteria you set right here.

---

1. The Computational Thinking Process at a Glance

According to the IB DP Computer Science syllabus, the computational thinking process consists of four connected practices:

1. Specifying problems in terms of their computational context and determining success criteria (this chapter!)
2. Decomposing complex real-world problems into more manageable problems
3. Abstracting problems and generalizing them to enable algorithmic thinking and to develop solutions
4. Testing and evaluating solutions for improvements

Notice that everything begins with specifying the problem. If the foundation is shaky, the final solution will not work as intended.

---

2. Specifying Problems in a Computational Context

In the real world, problems are messy, vague, and often described casually. A client might say: "Our school library checkout system is too slow and messy." That is an everyday complaint, not an actionable computer science problem.

To specify a problem computationally, you must translate vague human needs into concrete technical realities. You need to identify three core computational elements:

• Inputs: What data must enter the system? What formats, types, and sources are involved? (e.g., student ID number as an integer, book barcode as a string).
• Processes: What operations, calculations, or logic must be applied to that data? (e.g., checking if the student has overdue fines, updating the database record, calculating the due date).
• Outputs: What must the system produce or display? (e.g., an updated account status, a confirmation receipt, an error message).

Understanding Constraints and the Computational Context

A computational context is defined by more than just inputs and outputs; it includes the constraints and environment within which the system must operate:

• Hardware limitations: Does the system run on a low-powered handheld scanner, a mobile phone, or a dedicated server?
• Data constraints: What volume of data must be processed? Are there specific ranges or formats required?
• Time constraints: Must the process run in real time, or can it be executed in batches overnight?
• User environment: Who will interact with this system? Do they require an accessible, simple user interface?

Everyday Analogy: Imagine asking a contractor to "build something nice." You could end up with a garden shed or a skyscraper! Specifying the problem means telling the contractor: "Build a 2-bedroom wooden cabin with a maximum height of 6 meters, running water, and solar power." Now they know the scope, the materials, and the boundaries.

Quick Review: Specifying a problem means defining its inputs, processes, outputs, and constraints clearly so it can be solved systematically by a computer.

---

3. Determining Success Criteria

Once you have specified the problem, how do you know when you are finished? How do you prove that your computational solution actually works? This is where success criteria come in.

Success criteria are the specific, measurable standards used to determine whether a computational solution has successfully solved the problem.

What Makes Good Success Criteria?

Success criteria must be measurable and unambiguous. If a criterion is subjective, two different people could look at the same program and disagree on whether it passed or failed.

Let's compare vague statements with measurable success criteria:

• Vague: "The program should be fast."
• Measurable: "The search algorithm must return results from a dataset of 10,000 records within 1.0 second."

• Vague: "The system must handle bad user input."
• Measurable: "If a user inputs a negative value for age, the system outputs the error message 'Invalid age' and prompts for re-entry without crashing."

• Vague: "The program should calculate grades."
• Measurable: "The system calculates the final percentage mark as an integer between 0 and 100, assigns the corresponding letter grade according to the defined grade boundary table, and displays both on screen."

Memory Aid: The 3 "Must" Checks for Success Criteria

Whenever you write or evaluate a success criterion in an exam or in your internal assessment, ask yourself:

1. Must it be observable? Can you see, read, or capture the result?
2. Must it be testable? Can you write a specific test case with sample data to verify it?
3. Must it be precise? Does it specify exact values, thresholds, or outcomes rather than qualitative opinions?

Key Takeaway: Success criteria must never use words like "easy", "good", "fast", or "nice". Replace them with exact numbers, specific behaviors, and verifiable outcomes.

---

4. Connecting Problem Specifications to Solutions

Don't worry if drafting precise criteria feels strict at first! Setting clear specifications and success criteria directly drives the rest of your development work:

• Guiding Algorithm Design: When your inputs, processes, and outputs are defined, writing algorithms or choosing logical structures becomes much simpler.
• Building Testing Strategies: Each success criterion turns into a row in your test plan. If a criterion says, "The system accepts passwords of 8 or more characters and rejects shorter ones," your test plan immediately gains two test cases: a 7-character string and an 8-character string.
• Evaluating the Final Product: When the solution is complete, you evaluate it directly against these original criteria to identify any limitations or necessary improvements.

---

5. Common Mistakes to Avoid

• Confusing the solution with the problem: Stating "The problem is that we need a Python dictionary" is incorrect. A dictionary is a data structure used in a potential solution. The problem is the real-world issue (for example, "The current system takes too long to look up student emergency contact records by their unique student ID").
• Writing subjective criteria: Writing "The user interface looks appealing" cannot be objectively tested. Instead, write: "The interface displays all navigation options on a single menu screen with high-contrast text."
• Ignoring constraints: Forgetting to state hardware, software, or data boundaries leads to solutions that fail when deployed in their intended environment.

---

Chapter Review & Summary

• Theme B context: Specifying problems and determining success criteria is the opening stage of the computational thinking process.
• Specifying a problem: Involves defining the computational context—specifically identifying clear inputs, necessary processes, expected outputs, and operational constraints.
• Success criteria: Objective, measurable targets that establish exactly what the solution must achieve to be considered successful.
• Role in evaluation: Clear success criteria form the basis of all structured testing and final evaluation of the computational solution.