Meet Lightbot, the first app I use to teach kids to program

Ben Wheeler
Robot Owl
Published in
4 min readJul 2, 2018

Here’s a quick video intro to Lightbot, the app I reach for first when I want to give a child a first taste of programming:

How Lightbot works

Lightbot features this little robot character:

Your goal is to guide Lightbot to the blue squares:

…and light them up!

You do this by choosing steps like forward, right turn, left turn, and “light up”…

…and creating a “program” from the sequence of steps you choose.

When you think you’re ready, you hit “Play” and Lightbot runs your program!

If this seems simple, don’t worry, it gets plenty complicated!

Why Lightbot is much more than a toy

I know that Lightbot seems far away from “real” coding. We think of coding as involving obscure syntax, indented lines, and secret nomenclature, something like the code below. (That’s my code, by the way — it’s the latest code I happened to have handy!)

But as with human spoken languages, there is complexity in every programming language, even seemingly simple ones. Every programming language is essentially the same, under the hood: the computer reads the code one command at a time, and does exactly what that sequence of commands tells it — no more and no less.

“Bugs” in programming code creep in because you can’t tell at a glance that anything is wrong; you need to actually run the program step-by-step and see if what the code actually does matches what you meant for it to do. That’s true if you’re programming the NASA Mars Rover, and it’s true if you’re programming Lightbot!

For instance, there is one bug in the program below. See if you can find it! (Read from left to right, then down to the next line. The spring icon means to jump forward the direction that Lightbot is facing; Lightbot must use the lightbulb action while on each blue square to light them up.)

How debugging reframes errors

The beauty of Lightbot it is that a child can see their Lightbot execute their program step-by-step, and thereby pinpoint the point at which their program is diverting from their intentions. Diagnosing, revising and rerunning the program are all painless, which suggests to children that these bugs are no big deal: they’re problems with the program, not with the child.

The pioneers of computer science education believe that this cycle — write code, run it, figure out where it’s wrong, improve it, run it again — is valuable for all students, and useful far beyond just computer programming.

Seymour Papert, a professor at MIT and one of the creators of the kids’ programming language Logo (which was how I first learned to program, in the 1980s), wrote about seeing students improve in math just by doing a little programming. When he asked one middle school girl what had changed, she explained that she had realized that she wasn’t bad at math, she had just been using faulty algorithms, and needed to debug them.


A child who has not yet succeeded in acquiring the strategy of debugging… sees [a bug] as wrong, bad, a mistake.

School teaches that errors are bad; the last thing one wants to do is pore over them, dwell on them, or think about them.

…The debugging philosophy suggests an opposite attitude… what went wrong, namely the bugs, are not seen as mistakes to be avoided like the plague, but as an intrinsic part of the learning process.


— Seymour Papert, Mindstorms: Children, Computers, and Powerful Ideas (1980)

I hope you and the young people around you have the chance to check out Lightbot! You can start with the free version, created for the annual Hour of Code.

This was lovingly written by Ben Wheeler in Brooklyn, NY. If you like it and want to get his subscriber-only articles in your inbox, please subscribe at robotowl.co !

--

--