You inherited the system

order-total — a single file, under 150 lines, written by someone who is not in this room.

You did not design it. You cannot ask its author why a line is the way it is.

Symptom is not cause

“The total is wrong on order 4471” is a symptom description.

It says nothing about where — tax, discount, rounding, something upstream.

Treating a symptom as a diagnosis is where most investigations go wrong first.

Observation versus explanation

An observation is something someone else could check by repeating what you did.

An explanation is a claim about why it happened.

They feel like the same sentence. They are not the same kind of claim.

Observation:
The request returned HTTP 500 at 14:03.

Not an observation:
The database connection failed.

The second line might be true later. It isn’t something you observed at 14:03.

Good observations

  • name the exact input
  • name the exact output
  • name the exact conditions
  • let someone else reproduce them without asking you anything
Running `order-total --order 4471` prints 84.70.
The printed receipt for order 4471 shows 85.00.
Order 4460 (no discount code) matches its receipt.

Bad observations

The discount logic seems to be off by a bit.

This sentence already contains:

  • a diagnosis (“the discount logic”)
  • a severity judgement (“a bit”)
  • nothing another person could check

It reads like progress. It is not evidence.

The investigation cycle

Observe → Hypothesise → Gather Evidence → Reduce Uncertainty → Intervene → Verify

Every exercise this semester runs this sequence. What changes week to week is how much of it is scaffolded — not the sequence itself.

A worked evidence trail

1. `order-total --order 4471` → 84.70
2. Receipt for order 4471 → 85.00
3. `order-total --order 4460` (no discount) → matches its receipt
4. No error output on either run

Four lines. No cause named. Each one independently checkable.

Practical setup

Today, before opening order-total’s source:

Write a numbered observation log for order 4471 — facts only.

An entry that names a cause before the log is complete does not count as an entry.

What not to do

Do not write “the discount logic is off” and call it observation #1.

An observation written after a cause has already been guessed at tends to smuggle the guess back in as fact.

Exit question

If you rewrote your log after opening the source, would it still read the same?

If not, which lines changed — and why did they need to?