Finally learning a new language
For years, people around me have been telling me to learn new programming languages—that I shouldn’t corner myself with Ruby (and Rails). And for years, I couldn’t muster the mental energy to do it.
But lo and behold, the breakthrough happened!
Will it be Rust? Will it be JavaScript?
None of the above, my good sir! It’ll be Logo, a procedural language designed to teach children the basics of programming.
Why, though? Well, last week, my child’s new teacher told us he intended to introduce programming to the class. And I thought: “Ooooh, I might finally be able to explain to my children what I do for a living.”
So, I got very excited about it and down the rabbit hole I fell.
To make it extra fun, I designed a first 30-minute workshop with plenty of games.
Here’s my pitch to present the basic concepts to the kids:
Today, we’re going to control a computer. And to make a computer do cool things, we have to give it orders.
Orders are also called instructions.
An instruction can be short: “Take one step forward.”
Or it can be long: “Take one step forward, turn around, walk three steps hopping on your left foot while putting your right pinky in your nostril, fart loudly, laugh even louder, and do a cartwheel.”
When we put instructions together to make a computer do something, we build what’s called a program.
And a program is written in a language that the computer can understand: a programming language.
You, for example, speak French and a little bit of English. Well, the computer speaks C, Lisp, or Logo.
And that works out nicely, because today we’re going to talk to our computer in Logo.
I plan to have them team up to draw the initial of their first name using Logo instructions. I will get inspiration from Seymour Papert — one of the inventors of Logo — and have the kids use physical space to walk through and talk about the problem.
My current plan:
- Draw the two letters on the floor with masking tape.
- Build a set of cardboard jigsaw puzzle pieces that represent the instructions (in French).
- Have the kids pick the jigsaw pieces and assemble them on the tape to find the correct instructions and the correct order of operations.
- Have them type the instructions into the terminal and see if the output matches our expected result.
- Take a few pictures and do a quick write-up with them so they can present it in their classes.
Some ideas for my jigsaw puzzle pieces:
| \
+-----------------------+ \
| avance 50 >
+-----------------------+ /
| /
*******
* tourne *
* droite *
* 90 *
* |_ *
*******
It’s been a long time since I got that excited about a side project! Let’s hope I won’t bore the kids to death!