June 20, 2004

BASIC

When I first learned to program, back in those Halcyon days of yore, the language I learned to program in was BASIC -- the Beginner's All-purpose Symbolic Instruction Code. The year, if I recall correctly, was 1977, and my dad had built a microcomputer from a kit. It was a big black box with a couple of switches on the front, a dumb terminal, and a paper tape reader/punch for program storage.

BASIC has changed since then; it's acquired fancy control structures and data types and block structure and long variable names and all kinds of stuff, but back then it was a really simple language. And the joy of it, at first, wasn't that we were writing complicated programs; it was that we were writing down our wishes, and the computer was carrying them out! I still remember the thrill I got from writing programs like this:

100 PRINT "THIS IS AN ENDLESS LOOP!"
200 GOTO 100

and

100 FOR I = 1 to 100
200 PRINT "WILL IS GREAT!"
300 NEXT I

Both programming and programming languages have gotten more complicated since then; most application programming these days involves writing GUI applications, and that's nothing I'd want to try to teach my seven-year-old. On the other hand, programming requires clear, logical thinking, and that's a skill I want to teach my seven-year-old as early as possible. And while I wouldn't want to teach my kid C or Java or even my beloved Tcl, there's always good, old, classic BASIC.

So I did a little web search and found a program called NBASIC that runs on our kid's computer; it emulates the kind of old-fashioned BASIC that used to come built-in to microcomputers like the Apple ][ and the early IBM PCs. I installed it, and then sat Dave down next to me, and started showing him things. You never forget to ride a bicycle, and evidently you never forget your first programming language, either, because in just a little while we'd written a simple program that picks a random letter and then makes you guess it. If you guess the wrong letter, it tells you whether the letter you picked comes before or after the computer's letter in the alphabet, and lets you guess again. And that's it.

And David was as happy as a pig in slop playing this simple little game for about half-an-hour. Old-fashioned BASIC might not have a lot of glamour, but I think it's got a little more mileage left in it.

Posted by Will Duquette at June 20, 2004 04:47 PM