My Daughter’s First Program

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:

Imports System

Class PleaseSayYo
Shared Sub Main()
Console.WriteLine(“Barack Obama is Prezident!”)
Console.WriteLine(“I didn’t Like McCain.”)
Console.WriteLine(“Got to go. Bye!”)
End Sub
End Class

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:

Module Module1
Sub Writeandread(ByVal message As String)
End Sub
Sub Main()
Writeandread(“Barack is President!”)
Writeandread(“I didn’t like McCain.”)
Writeandread(“Got to go. Bye!”)
End Sub
End Module

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.

2 thoughts on “My Daughter’s First Program”

  1. Very cool!

    May I also suggest you consider teaching her Python, via ? Python is an interpreted object oriented language that is extremely versatile, and cross platform. I think in the long run learning something like Python will provide a better foundation for programming than learning a platform-specific language like VisualBasic.

  2. Your point regarding cross-platform is well taken. I really didn’t spend a lot of time researching which language to teach her. I chose VB because a) I have familiarity with it, and b) I found a kid-oriented, free teaching resource, and c) I found a free compiler. I’m sure there are others that match these criteria.

    Other languages I would very much like to teach her (and learn more myself) are Perl and PHP. I’ve dabbled with both a bit, and I think I could help her along the way with the right teaching resource.

    Thanks for the recommendation.

Comments are closed.