This is installment #1 in a series of posts I will write about teaching my 11-almost-12-year-old daughter to program in Ruby.
In the last year I taught my daughter Rosey, who is 11 years old and in sixth grade, the basics of HTML. With help and training from me she made a few web pages with her own drawings, including some clever puzzles. We hand-coded all the pages instead of generating them with a drag-and-drop tool. That was her choice. (Hooray!)
Now it’s a new year, and next week she’ll turn 12. I asked her if she’d like to learn to program in a language that can actually make things happen instead of just show things on a page. Somehow I must have used just the right combination of excitement and pleading, because she said yes.
Very cool. I get to teach my daughter to write software! I’ve been waiting for this day for a long time. Almost 12 years.
She already knows a couple of boys her age who have started learning to program but most of the boys have not. I’m excited that she will be ahead of a lot of the boys, since I hear one reason girls are sometimes behind in learning computer stuff is the intimidation factor: they take a class and see that most of the boys have already learned a lot of it on their own, so the girls feel like they’ll never catch up. I totally get that, and want to prevent it.
I Like Stuff that’s Ruby
A couple years ago while browsing the Programming section of Borders Books in Palo Alto I noticed Chris Pine’s book, Learn to Program, and wondered if it would be good for a middle-schooler. I read more about it, and found a review titled “Great for Kids.” The author is using Learn to Program to teach their 8-year-old daughter and loves it. Plus I learned that the author actually teaches programming to kids my daughter’s age. That’s good enough for me! So I got the book and will start teaching her to program.
(By the way, if you haven’t been to Border’s on University Ave. in Palo Alto, do yourself a favor and go inside. It’s cool. It was a beautiful, classic movie theater called The Varsity when I moved to downtown Palo Alto in 1988. Later they converted it to a bookstore but they kept the marquee.)
So Today I went out and picked up the book. No way could I wait for an Amazon shipment. Then I read the Preface, Introduction, and Chapter 1. Then I asked her to start with the Preface and read for 20 minutes or so and stop wherever she is, or to finish Chapter 1 if she wants. She ended up stopping at the same spot as me. Tomorrow we’ll go over Chapter 1 together. It’s mostly just about installing Ruby and a text editor. But I’ll also go over some of the high-level concepts I remember being incredibly confusing to me when I first learned to program. Specifically:
- When I type a line of code into the computer, how should I think of this in comparison with an English sentence? Is it Declarative? Imperative? Something else? (Fortunately I think she has learned these terms in school. If she hasn’t, I can quickly describe the differences.) I think for a beginner the easiest explanation is that all lines of code are imperative. More specifically, you are telling the computer what to do. When you say “print 3” it’s like telling someone else–someone who always follows orders–to print the number 3 on a piece of paper. Of course some computer programming statements are more like declarative, interrogative, or conditional statements. But the first thing a beginner learns is the imperatives like “print.” (I peeked ahead at Chapter 2 and it starts with “puts 1+2”.)
- What is the difference between RAM and the hard disk? How should I think of “saving” or “opening” a file? My daughter has saved documents before but I don’t think she quite groks RAM vs. disk yet.
I enter this adventure with excitement and high hopes but also realistic expectations. She may get bored quickly or feel it’s too hard. I’m going to do my best to keep it light, fun, and low pressure. But if it doesn’t work out, it’s no big deal. You have to try things, right?
I will continue to blog about this adventure. Stay tuned right here on the I Like Stuff Blog.