As I’ve been whittling away at my Bloglines backlog, I read some interesting comments at Philip Greenspun’s blog. Phil asks,
Best Computer Language for a 13-year-old Beginner?
His first thought was Visual Basic. There wasn’t a lot of support for VB in the comments. There are some seemingly cool beginner programs out there like Scratch, Alice, and Hackety-hack, all of which I’ve noted for when I’m ready to handcuff my son to a computer and force him to learn how to program. And there was, of course, the obligatory suggestions of Perl, Python, PHP and MySQL, HTML and CSS, C++, and C#. C++ for a beginner?
I began to think about how VBA would fit into the mix. I’m not sure I could, in good conscience, teach a 13-year-old VBA. I predict VBA will be gone in the not-too-distant future and it wouldn’t do the kid justice to teach him a dying language. However, I think there are some properties of VBA that are useful to a beginning programmer.
The most obvious of those helpful properties, at least in Excel, is the macro recorder. Most VBA programmers who can remember their formative years will agree that the macro recorder is very helpful when it comes to learning the syntax and the object model.
VBA also offers a kind-of self-contained environment in which to work. It’s certainly possible to destroy your operating system from VBA, but a beginner will likely be changing properties and calling methods of objects like Workbook, Worksheet, and Range. If things get out of hand, close the workbook and start fresh.
The immediate feedback of VBA is nice too. You can run just-written code and see the effects right away in the UI. You don’t have to compile to an exe or anything like that. Speaking of immediate, there’s also the Immediate Window for trying out code.
There’s a lot of positive aspects of VBA when it comes to beginners. If a 13-year-old showed a genuine interest in VBA, I wouldn’t turn him away. But I don’t think I’d suggest it to someone interested in “programming”. Your thoughts?