My daughter has been expressing interest in learning “how to program” for a couple of weeks now. I’ve attempted to narrow down a little bit what that means to her: Windows programs? Web Programs? Web Pages? Flash games? The computer technology world seems endless at this point–and that’s coming from someone who earns his living in the industry. Perhaps that’s a little bit of my problem–I see too much possibility in the request to learn “how to program”. She really wasn’t able to narrow it down much at all because she is at that age where she is interested in a great many things. And she’s bright enough to grasp real programming concepts, and as a result, the technology world really is wide open to her.
A couple of weeks ago, I went looking for resources to help teach a kid about real programming. I decided to start where I started–BASIC. I learned to program in basica back in the early 80s. I figured VisualBasic would be a good place for her to start. Fortunately, Microsoft makes VisualBasic Express available for free and even has an e-book VB for Very Bright Kids.
Today we started working through the first couple of chapters. The look on my daughter’s face when she ran her first program–the modern equivalent to “Hello World”, “PleaseSayYo”–was priceless. Here, for posterity, is her first program:
Shared Sub Main()
Console.WriteLine(“Barack Obama is Prezident!”)
Console.WriteLine(“I didn’t Like McCain.”)
Console.WriteLine(“Got to go. Bye!”)
We’re continuing to work through the topics, covering classes, objects, properties, methods, and even subroutines. To help explain subroutines and parameters, I helped her re-write the above using a subroutine:
Sub Writeandread(ByVal message As String)
Writeandread(“Barack is President!”)
Writeandread(“I didn’t like McCain.”)
Writeandread(“Got to go. Bye!”)
She’s very excited–much more so than I would have thought she would be. I thought she would get frustrated at not writing a new Club Penguin in 1 hour or less. But she is, for now at least, completely immersed.