Centauri Academy Open the Academy
Robotics division scene at dusk, the Academy’s gold star in the sky

Robotics · Lieutenant mission · Gold shield

The Fair Code Test

Take a program you have written that controls something you can measure: a robot's speed, a light's blink rate, a sensor's alarm threshold, a game's difficulty. Make a list of five single-line changes to test (a number, a condition, a delay). For each, predict what will happen, make only that change, run it three times, measure the result and record it. Put the line back before the next change. At the end, write which line matters most and one surprise.

Open in the app

Age
14 and over
The real skill
Controlled code experimentation: single-variable changes, prediction, repeated measurement, reversion and recording to understand program behaviour
Rank
Lieutenant
Shield
Gold

The real-world skill

In the real world this is controlled code experimentation: single-variable changes, prediction, repeated measurement, reversion and recording to understand program behaviour.

How it runs: a Lieutenant mission: the grown-up checks the test log, the Lieutenant changes, tests and records.

What you actually do

Every Academy mission is a real task told as a story. The left column is the real thing; the right is what the briefing calls it.

What you actually doWhat the mission calls it
A program that controls something measurableThe orbiter's software
Five single-line changesOne line
Predict, change, run three timesCatching the mismatch
Put it back each timeA fair test
Which line matters mostThe lesson from Mars

The ground rules

Written for the grown-up. These are part of the mission, not extras.

  • Tools, soldering and cutting only with the grown-up beside you, eye protection on, and power off while you work on a machine.
  • Low-voltage battery projects only. Never open or connect anything to mains power.
  • Use only sealed batteries with their own charger, charged where the grown-up can see, never left charging overnight, and never pierced or squashed.
  • If the code moves a machine, test it on the bench or on safe ground with the grown-up.

From the briefing

Lieutenant, in September 1999 NASA's Mars Climate Orbiter was lost as it arrived at Mars. One team's software worked in one unit of measurement and another team's in a different one, and nobody caught the mismatch. A single difference in a line of code sent the spacecraft too close to the planet.

The full briefing, the officer’s welcome back and the gold shield are in the app.