Learn

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Learn through experiments

Make a passing test suite reveal a bug

Can all your tests pass while the rule is wrong?

Entering midway? Revisit Connect data by identity for the preceding worked example, or start here and use the explanation below.

1 · Try

Start with a concrete question

A synthetic request system must approve quantities at or above a threshold. Choose an implementation and test cases. The controls select predefined rules; no source code is executed.

Try the initial inputs, then write a prediction before changing one setting. All calculations run locally on your CPU.

Go directly to the experiment · Review basic mathematics

2 · Predict

What do you expect?

Predict which input distinguishes greater-than from greater-than-or-equal.

3 · Experiment

Change one thing. Inspect what happens.

  1. Keep the > implementation and run the below/above suite. Explain why it passes.
  2. Include the equal case to expose the failure.
  3. Repair the rule to ≥. Then try the reversed ≤ rule and inspect all failures.
Experiment inputs
Inputs
Your settings
Mechanism
Calculation below
Evidence
Compare outcomes
Tests passed2
Tests run2
Failures0

Compare the current results

Every bar starts at zero and uses the same numeric scale in this chart. The upper bound automatically adjusts to the largest current value (at least 1), so compare the numbers when changing inputs. Units and quantities come from each label; different kinds of quantity are not interchangeable. Displayed values are rounded to at most six significant digits.
02
  • Passing cases2
    Passing cases: 2Horizontal bar from zero to 2, on the shared zero to 2 numeric axis.
  • Failing cases0
    Failing cases: 0Horizontal bar from zero to 0, on the shared zero to 2 numeric axis.

Follow the calculation

  1. Contract: approve a request when quantity ≥ 5. Implementation: quantity > threshold.
  2. Quantity 4: expected reject, actual reject → PASS.
  3. Quantity 6: expected approve, actual approve → PASS.

This suite passes. Check whether it includes the boundary before concluding the rule satisfies the contract.

Captures keep your inputs, prediction and observation. Results are recalculated from those inputs. Resetting inputs keeps your captures and challenge history.

4 · Understand

Explain the mechanism

Make a passing test suite reveal a bug

A synthetic request system must approve quantities at or above a threshold. Choose an implementation and test cases. The controls select predefined rules; no source code is executed.

Before you change anything

Predict which input distinguishes greater-than from greater-than-or-equal.

Follow the mechanism

A contract states required behavior independently of the implementation. Here equality must be accepted.

At threshold 5, inputs 4 and 6 do not distinguish > from ≥. Input 5 is the boundary counterexample.

A passing suite proves agreement only on its tested inputs. Good tests deliberately cover behavior changes and invalid inputs.

Calculate it yourself

Expected approval = quantity ≥ threshold; a test passes when actual approval equals expected approval.

Try a counterexample

  1. Keep the > implementation and run the below/above suite. Explain why it passes.

  2. Include the equal case to expose the failure.

  3. Repair the rule to ≥. Then try the reversed ≤ rule and inspect all failures.

What this model leaves out

  • Only integer quantities and three predefined rules are modeled.

  • Passing these cases does not test authentication, concurrency, input parsing or a real deployed application.

Take it further

High school: Write a precise rule for a club and find a boundary example.

College: Implement property-based checks across a bounded integer domain.

Working professionals: Create a regression test and incident note separating the root cause from the missing test.

5 · Apply

Try a fresh case

New contract: accept ages ≥ 16. Bug: accept ages > 16. What single age exposes the bug?

This is a public practice check. Retries support learning; matching a number does not certify independent proficiency.

Take the investigation further

Choose any extension. These are project prompts for you to carry out; they are not automatically assessed.

School investigation

Write a precise rule for a club and find a boundary example.

College investigation

Implement property-based checks across a bounded integer domain.

Workplace investigation

Create a regression test and incident note separating the root cause from the missing test.

6 · Continue

Keep the evidence, choose your next step

Completion records your own decision that you have worked through this investigation. Practice checks and independent project evidence are separate.