Back to Games
Old School screenshot

Old School

His grandfather solved complex problems by throwing rocks. Turns out, he wasn't wrong.

story · easy · solo · 10m+

About This Game

I wrote this one because I think the best ideas look stupid at first. A grandfather who solves math problems by throwing things? Sounds ridiculous. But it's actually a real technique. It's called Monte Carlo simulation. Scientists use it. Physicists use it. It works. The grandpa just doesn't know the fancy name for it. He just knows that if you throw enough rocks, the percentages work out. I find that beautiful.

The coding lesson is about percentages. Divide the part by the whole. Multiply by 100. That's it. Three lines of code. But the concept underneath is huge. Sampling. Estimation. The idea that you don't always need the exact answer. Sometimes close enough is good enough. Sometimes throwing rocks is smarter than writing a program. Not always. But sometimes.

I put a bonus challenge in the playground. After you calculate the percentage of Earth that's water, you calculate the percentage of your day that's sleep. Simple stuff. But I wanted people to see that percentages are everywhere. How much of this room is windows? How much of this song is chorus? Once you start thinking in percentages, you can't stop. Sorry about that. Or you're welcome. Depends on your personality.

The ending makes me laugh every time. The teacher asks the kid to figure out what percentage of the room is windows. He asks if she has any rocks. That's the kind of problem-solving I respect. Use what you have. Think sideways. And never underestimate a grandpa with bad grammar and good instincts.

How to Play

Controls Read, type code, click Run

Read the story. Appreciate the grandpa. Then try the code. Change the numbers. Calculate percentages of things in your own life. What percentage of your playlist is one artist? What percentage of your phone's storage is photos? The math is the same every time. Part divided by whole, times 100. Once you learn it, you see it everywhere.

Game Details

Genrestory
Difficultyeasy
Playerssolo
Session Length10m+
Inputkeyboard
storycodingJavaScriptmathpercentagesbeginner
Carl

The grandpa in this story is my favorite character on the entire site. He throws rocks at a tractor to do math. Legend.

Play Old School Now