Imagine planning a trip that takes five years, and the whole point is to bring home a spoonful of dirt. That is what Japan just set out to do. The rocket launch makes the headlines, but the part worth sharing with a young coder is the plan behind it.
Try this before you read on: ask your child, "If you sent a robot to a tiny moon, what would it do first?" Write the answer down. We will come back to it.
The real story: a round trip to Phobos
Mars has two small moons. The bigger one is called Phobos. This week, Japan launched a mission called MMX to visit Phobos, collect a small sample of its surface, and fly it back to Earth.
- Launch: MMX lifted off on Japan's H3 rocket on October 20 (Japan time).
- Arrive at Mars: August 2027.
- Look first: a small French-German rover called Idefix will scout Phobos for about 100 days to help pick a safe landing spot. Gravity there is less than one-thousandth of Earth's, so even moving around is tricky.
- Land and collect: up to two landings in 2029, using a coring device and a nitrogen-powered sampler, with a goal of at least 10 grams of sample.
- Fly home: the samples are due back on Earth in 2031.
Why go all that way for a few grams? Scientists want to settle a long-running question: is Phobos an asteroid that Mars captured, or debris left over from an ancient collision?
How the mission is built to succeed
We want to be precise here. The reporting on MMX does not say AI is doing the work, so we won't claim it is. And the mission has only just launched, so success is still a plan, not a result. What the reporting does describe is a plan engineered to give that success its best chance, and every part of it maps onto how software is built:
- Scout before acting. Instead of landing blind, the mission sends a rover to explore for about 100 days first. The information it gathers is used to choose a safe landing site. Gather data, then decide.
- A clear finish line. The goal is written as a number: at least 10 grams. Nobody has to argue later about whether the job is done.
- A limited number of tries. Up to two landings, not unlimited attempts. Each landing is risky, so the plan budgets them.
- The right tool for strange conditions. With gravity under one-thousandth of Earth's, scooping dirt is not simple. The mission carries two ways to collect a sample, a coring device and a nitrogen-powered sampler.
- One big goal, broken into dated steps. Launch in 2026, arrive in 2027, land and collect in 2029, return in 2031. Each step can be checked before the next one starts.
What kids learn from this
The rocket is the exciting part. The plan is the part kids can actually practise, and it lines up with the four habits of computational thinking we coach every week:
- Decomposition: a five-year mission becomes five steps you can tick off. Kids do the same when they split a game into "move," "score," and "game over," and build one part at a time.
- Pattern recognition: every step in the mission follows the same shape, do something and then check it. Once kids spot that pattern, they start adding a check after every important step of their own programs.
- Abstraction: "at least 10 grams" ignores everything else about the sample and asks one simple question: is it enough? Good code works the same way, pulling out just the detail that matters.
- Algorithms: an ordered list of steps, a loop to walk through them, and a rule that says when you are done.
Here is the whole plan written as a short Python program. It really runs:
plan = [(2026, "launch"),
(2027, "reach Mars"),
(2029, "land + collect"),
(2031, "fly home")]
for year, step in plan:
print(year, step)
def done(grams):
return grams >= 10 # at least 10 g
print(done(9), done(10))
Output:
2026 launch
2027 reach Mars
2029 land + collect
2031 fly home
False True
Look at that last line. 9 grams is False and 10 grams is True. That edge, right where the answer flips, is exactly where bugs like to hide. Write > instead of >= and 10 grams would fail. It is the same reason students preparing for the CCC (Canadian Computing Competition) learn to test the boundary values on purpose.
So the path looks like this. In Scratch, kids learn that blocks run in order, one step after another. In Python, a plan becomes a list and a loop, plus one small check that says "done." In contest practice, they test 9 and 10, not just 50.
Try it at home
Go back to your child's answer about the robot on the tiny moon. Did they say it would look around first? Ask them to turn their idea into a numbered plan with a clear "done" rule, like "collect at least 3 rocks, try no more than 2 times." That is an algorithm, written in plain words.
If your child loves space, robots, or figuring out how big things get built, we would love to meet them. CodeSky runs after-school coding classes in Markham, from Scratch to Python to CCC. Come try a free trial class at 9833 Markham Rd Unit 2, Markham, ON L6E 0E5, or email info@codesky.ca.



