Proving Ground
The space race inspired my first video game_
I decided to try making my own version of Lunar Lander.

I loved how the computer forced me to think. It was completely unforgiving anytime I showed mental sloppiness. It demanded that I be logically consistent and pay attention to details. One misplaced comma or semicolon and the thing would crash.
It felt like solving mathematical proofs. Programming doesn’t require math skills (beyond the basics), but it does demand the same kind of rigorous logical approach to problem-solving. In both math and programming, I liked the process of breaking problems down into smaller, more manageable parts. And like solving a problem in algebra, there are different ways to write programs that work—some more elegant and efficient than others — but infinite ways to make a program that crashes. And mine crashed all the time.
I had to solve how a player moved the lander left and right, up and down, how much fuel it had, how fast it burned. I also had to describe what it looked like and how to display the ship in dashes and asterisks on the screen.
Unfortunately, I don’t have the code I wrote back then, but below you can play a text-only Lunar Lander based on the one written by Jim Storer in 1969—the same game that inspired me to write my own.
The Problem
You’re 120 miles above the surface of the moon, and your automated landing system has failed! You’re now in freefall and must take manual control to land safely within two minutes.
To avoid crashing, slow your descent by firing your engines. But use your fuel wisely: You only have 16,000 pounds, and if you run out before landing, you could crash.
Safely touch down a lunar lander on the moon without crashing and before you run out of fuel.