VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

How Singapore Education Works | Computing and Finding the First Point Where a Program Goes Wrong

Three learners review open books together at a classroom table, with stacks of textbooks, stationery and a whiteboard in the bright room.

A program runs without crashing but gives the wrong result. A student changes several lines, tries again and hopes the next version works. Debugging becomes more useful when each change answers a question about what went wrong.

In school Computing, tracing and testing can turn a disappointing output into evidence. This guide follows a small fictional scoring rule without depending on a particular programming language or assuming every school offers the same Computing course.

Methodist Girls’ School’s Computer Studies page includes designing, testing and debugging among its computing practices. Its programme is school-specific. The exercise below is independent eduKate guidance, not an assessed assignment or an official syllabus checklist.

CHAPTER 1 OF 5

1. Write the intended behaviour before changing anything

Back to contents

Imagine a fictional program awarding a badge to a player who earns at least 10 points. A score of 9 should not earn the badge; scores of 10 and 11 should. These examples make the rule concrete.

Now suppose the program awards the badge only when the score is greater than 10. It may appear correct for many inputs while mishandling exactly 10.

Before editing, record the input, expected output and actual output for the failing case. “Score 10 should earn a badge, but the program says no” is a specific problem statement.

Separate what the program is intended to do from what the student assumes it does. The task brief, not the current code, defines the requirement.

If the requirement itself is unclear, clarify it. Debugging cannot establish which of two ambiguous rules the teacher intended.

Contents · Next chapter

CHAPTER 2 OF 5

2. Trace a small case step by step

Back to contents

Use the tracing method taught in class. Follow the relevant value through the program and identify the decision that produces the unexpected result.

In the badge example, compare the condition with the wording “at least”. The boundary value is included by the requirement but excluded by a strict greater-than comparison.

That gives a reason to inspect the comparison rather than unrelated parts of the program. The first useful change is the one supported by the trace.

Students should distinguish a syntax problem from a logic problem. A language may reject malformed instructions; valid instructions can still implement the wrong rule. The kind of evidence needed differs.

Parents do not need to know the language to ask, “What did you expect here, and what happened instead?” That question helps the student make their own reasoning explicit.

Contents · Previous chapter · Next chapter

CHAPTER 3 OF 5

3. Change one suspected cause and test again

Back to contents

Make a focused revision. In the fictional example, the comparison must include the threshold. Then rerun the test that previously failed.

A passing result at 10 is encouraging but incomplete. Check 9 and 11 as well, because a change should preserve the intended behaviour on either side of the boundary.

Use the task’s permitted input conditions. Do not quietly change the requirement or exclude an inconvenient valid case to make a test pass.

Keep a brief record of the change and its reason. A student should be able to explain the correction without relying on the fact that the screen now looks right.

If several lines are changed simultaneously, it becomes harder to identify which change fixed the problem or introduced another one. Focus keeps the next observation interpretable.

Contents · Previous chapter · Next chapter

CHAPTER 4 OF 5

4. Choose tests that challenge the rule

Back to contents

Try cases that exercise different parts of the requirement, not only several inputs that behave in the same way. Boundary cases can be particularly revealing when the task uses a threshold.

Where an assignment includes invalid inputs, follow its stated handling requirements and the teacher’s testing guidance. Do not assume every school task requires the same validation strategy.

Ask what a successful test establishes. One correct result shows that the program handled that case; it does not prove every possible case is correct.

For a larger task, break the problem into smaller checks. Does the input arrive as expected? Is the calculation correct? Does the display represent the result accurately?

The evidence habit connects with our Geography fieldwork guide: the conclusion should match what the observations can support, even though the subject methods differ.

Contents · Previous chapter · Next chapter

CHAPTER 5 OF 5

5. Explain the fix and preserve ownership of the work

Back to contents

After the program behaves as required, ask the student to summarise the error, the evidence and the correction. That explanation makes the learning portable to another program.

Use help within the assignment’s rules. If a tool or another person supplies a complete solution, the student may lose the opportunity to locate and understand the misunderstanding. Follow any rules on collaboration, attribution and AI use.

For the school context, explore our Methodist Girls’ School (Secondary) guide. For subject planning, consult the subject-combination guide and the current MOE curriculum directory.

An interest in debugging may reveal enjoyment of precise reasoning and systematic investigation. Treat that as something to explore across future courses, not a guarantee of admission or a fixed career identity.

Does finding an error mean the student is poor at Computing? A discovered error gives the student something specific to investigate. The useful question is whether they can move from guessing to explaining and testing.

The next time a program gives the wrong output, begin with a smaller question: “Where does the actual behaviour first stop matching the intended behaviour?”

Contents · Previous chapter

Sources checked 17 October 2026. Independent eduKate educational guidance. Confirm current school and assessment requirements with the relevant institution. Named-school examples describe their published provision; teaching exercises are illustrative.

Discover more from eduKate Singapore

Subscribe now to keep reading and get access to the full archive.

Continue reading