Where Has BASIC Gone?

David Brin has an outstanding article up on Salon titled Why Johnny can’t code

I’ve been the chairman of the National Center for Women & Information Technology for the past two years and have learned an enormous amount about the sociology of computer science, especially among women and kids.  This summer I decided to “practice what I preach” by teaching my Alaskan 14 year old neighbor Eric how to program.  I received a bunch of interesting comments and eventually settled on Ruby – which we are making ok progress with.

However, Brin’s article smacked me over the head.  I learned how to program on an Apple II using BASIC when I was 13.  I eventually learned Pascal, but did most of my programming – until I was in college – in BASIC.  When my best friend Kent came home with a prototype for the first TI PC in 1982 (his dad – ultimately one of the early Compaq guys – was the TI project manager for the PC) we programmed a complex Yahtzee game in BASIC (the TI graphics were incredible – I learned a lot about abstraction manipulating them.)  In my first real job (in 1983) at a company called Petcom I wrote two sophisticated commercial programs in Basic (PC-Log – Oil Well Log Analysis; PC-Economics – Economic Forecasting for Oil and Gas projects).  Lest you wonder how sophisticated this could get, I also contributed to an Oil and Gas Accounting System (PC-Accounting) that ultimately used Btrieve as the database engine and probably could have been a competitive stand-alone accounting system in the 1990’s if the company had evolved that way.

So – when I read Brin’s article, I longed for the simplicity and beauty of BASIC as a teaching tool.  Yeah – I know – it teaches you “all the wrong stuff”, but as I’m working through basic looping with Eric, I’m not sure objects and methods are the right way to learn this stuff.  Maybe I’ll hop on eBay and buy Eric an old Apple II.

  • http://www.crowdedweb.com/ Bosko

    Since you settled on Ruby, did you happen to find “Why’s (Poignant) Guide to Ruby?” (http://poignantguide.net/ruby/) — it is probably the most amusing book on any computer programming language I’ve read so far. It reads similar to the little anectodes in “Godel, Escher, Bach” (Hofstatder), but it’s more practical than theoretical. Don’t be put off by the seeming simplicity of the book, either, as by the end you will have dived quite deep into the language.

    “Why” (also known as “Why the Lucky Stiff”) is a wildly amusing writer and ruby programmer. I highly recommend it, particularly given your endeavour in Alaska.

  • Dave Jilk

    Actually it’s just not true that BASIC isn’t on most computers – fire up Excel and VBA is right there. There’s a little bit of UI stuff to learn before getting started, but overall it’s just BASIC. Plus it has an object orientation that makes objects very easy to learn.

  • http://www.feld.com Brad Feld

    Yeah – I know – but how many 14 year olds have Excel installed on their computer. And – even if they did – the first question is “why do I have to run a spreadsheet to learn how to program in BASIC?”

  • masukomi

    I too learned on Basic, but basic is light-years away from modern computing languages. Smalltalk on the other hand was designed from the ground up to be a modern object oriented language that was easily accessable to young children. Check out http://www.squeak.org

    The Great thing about smalltalk is that it isn’t just limited to trivial educational lessons. Tools like Seaside ( http://seaside.st/ ) use smalltalk to create powerful tools like DabbleDB ( http://www.dabbledb.com/ )

    Many other “Real” languages are still learning the lessons of and playing catch-up to what Smalltalk pioneered so many years ago.

  • cthrall

    I remember learning BASIC on the VIC-20 and C64. It was such an integral part of using the machine back then.

    Even in the days before Visual Basic, Professional Basic and LabView let us do real-time data acquisition and graph the results. It

    I really like Python. I think if Microsoft started shipping IronPython with Windows, it would be an awesome learning environment.

  • Damon

    I learned BASIC at quite a young age (self taught). In college, I switched to FORTRAN, and later taught myself Java and am now trying to pick up Ruby.

    I can tell you that the transition from procedural programming to object oriented was a tough one for me that I’m still struggling with. (I’m not a “real” programmer by any stretch). I wonder if learning with a great language like Ruby isn’t the right approach, despite the little bit of extra abstract thought required. At least new programmers will be thinking in objects from the start.

  • Rob

    I have a long history with BASIC, I learned it in high school in the early 70s, taught it to middle school kids when I was in college, implemented it on Digital VAX line of mini-computers, taught it again to adults as part time instructor at Junior College. I also taught higher level languages (Pascal, C) and data structures to kids and adults.

    Abstraction in the physical world is not a concept that comes easily to many people. Abstraction in an indirect world, like creating a computer program is even more difficult. I clearly remember teaching very bright computer experienced kids about recursion. As an instructor it was the easiest concept to KNOW if a student was understanding, when they got it, they beamed, litterly exploded like a kernal of popcorn. The downside of this was it took most of them a long time to get this, and many took a hit in their self confidence during the process. They weren’t stupid this is just not they way most linear thinking humans see the world.

    My 15 year old was trying to do something simple in Excel the other day, and finding it very frustrating. I am now inspired to go and find the equivelent of chipmunkbasic (mentioned in the article for the Mac) for his PC so i can start him down this path.

  • Luca Fabbri

    I learnt BASIC at 13 too – it was on the then brand spanking new Commodore 64.

    BASIC is alive and well – for example see Sun’s Project Semplice (“simple” in Italian) to bring BASIC to the Java platform.

    However I miss the simplicity and the challenge of turning on a computer and have the prompt of a BASIC interpreter at the ready…

  • Toddhisattva

    Brin dismisses Python by lumping it together with Perl as a “scripting” language. It must be an early winter where he is, that he risked such a flame war!

    Python is a great language. If I were teaching an introductory programming class to my nephews, I would use Python.

    Python for Non-Programmers:

    http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

  • jk

    I have a background similar to a few of the posters: I learned programming on basic in the early 80s. For the past few years I’ve been programming with REALbasic and find it an excellent combination of basic and object-oriented programming. I think its both a good place to learn programming logic and, perhaps later, an object-oriented, structured approach to programming. The user interface is OK and the applications produced are attractive.

  • http://blog.mentations.com Brian Schneeberg

    Brad, I just wanted to mention (in case you weren’t aware) that Microsoft has brought BASIC development into the 21st century via VB.NET and Visual Studio (VS). It is fully object-oriented and there is a free development environment (VS Express) you can download and use. Check out http://msdn.microsoft.com/vstudio/express/vb/ for more info. -Brian

  • http://michaelbernstein.com michael bernstein

    Why do you think Python forces you to start with objects and methods? You can easily stick with a procedural view of the world to begin with.

    You can start with a python module like this:

    print “Hello, World!”

    Move on to one like this:

    numbers_list = ['One','Two','Three','Four','Five']
    for x in numbers_list:
    print x + ” Hello, World!”

    And so on. These excercises are then invoked as ‘python myprogram.py’ or equivalent.

    The main ‘beginner’ thing that Python won’t let you do as easily is an infinite loop along the lines of BASIC’s 10 GOTO 10.

  • http://ben.casnocha.com Ben Casnocha

    A post disagreeing with the Salon article:

    http://rc3.org/2006/09/the_golden_age.php

  • Dave Jilk

    All right, then just go here and download GW-BASIC:

    http://www.geocities.com/KindlyRat/GWBASIC.html

    I tried it and it seems to be the genuine article. Even runs in a “DOS Command Window”.

  • http://www.feld.com Brad Feld

    Thanks Dave – I love it when other people do my work for me.

  • http://mashproxy.com Pete Warden

    As somebody else who first learnt BASIC on a Sinclair/Timex ZX81, I think there is a modern equivalent: javascript!

    The reasons I learnt BASIC were:
    – It was there. No installation or special tools needed, I could just start using it.
    – It let me do impressive/useful stuff. I created a birthday cake ASCII animation and played back “happy birthday” for my little sister. I wrote a D&D character generator.
    – I knew it wasn’t just a learning tool, it felt like I was using something grown-up. I’m sure I would have learnt better principles from Logo, but something about steering a turtle didn’t fit with my 11 year-old ideas of cool.
    – It had an appealing air of the possibility of wrong-doing. I could hit the BREAK key in my favorite game, and LET GOLD=2000. I was pretty sure that kid in Wargames must be using BASIC too.

    It seems like most kids who’re interested in computers these days learn a bit of HTML, and from there it’s a short step to putting in a SCRIPT tag and trying out some javascript. It’s available on all computers, just needs a text editor to create, lets you do neat/annoying things like animated images and popup windows easily, and is something that adults use.

    The lure of the forbidden is pretty strong there too, just think of script kiddies. Sure, almost no kids will actually do anything wrong with javascript, but it definitely enhances its coolness, a lot more than being able to use it for math problems.

  • Steve Bjorg

    During my days as a TA at CU Boulder teaching programming to freshmen, I quickly came to the realization that I had it easy when I started. Like so many other posters, I learened BASIC on a C64. I agree that we should teach these simple tools first, even if they teach the wrong thing. Why? Because, trying to explain to someone why stack frames and paramteres are good is a whole lot easier when they have experienced the madness of global variables and GOTOs. The beauty of BASIC is that it just lets you get started with no noise and dive directly into algorithms (which, for most newcomers, is hard enough). This is not true for Smalltalk or VBA. Both environments are designed by engineers for engineers.

  • Fred

    BASIC is a fine learning tool. Objects and methods can wait.

    I am reminded of the early days of New Math. Talking early sixties here. I was getting traditional math while the cool kids were getting New Math. They struggled mightily. I watched some of the things they were doing. They didn’t make sense until I got to college. These poor kids were so damaged they probably still can’t balance a checkbook.

  • Brent

    BASIC? Ruby?

    Why always start teaching in Scheme? ( http://www-swiss.ai.mit.edu/projects/scheme/ )

  • http://www.palevsky.com nick palevsky

    Dear Brad (and Fred and Brian),

    I take the point that what strikes me as “natural” is really the result of a lot of practice. To a beginner, I might recommend The Little Schemer (yes, Scheme does seem to be a popular candidate for a beginner’s language) or maybe A Little Java, A Few Patterns, but would a real beginner find these books intuitive?

    Similarly, Ruby seems like a real “natural” programming language to me. Most of the time, it seems to do what I want it to. But maybe this is the result of playing around with Basic (yes, in High School) and then Lisp, C++, Perl, Java, etc.

    My guess, though, is that for the right kind of beginner, lisp-type recursion and OOPs patterns would be useful right off the bat, or pretty soon thereafter.

    Regards,

    Nick

  • James_Mitchell

    The first language I learned was GE Timesharing Basic, the original Basic designed by Kemeny and Kurtz. It had some terrible features:

    Line numbers

    Gotos were required for almost anything

    No If then else

    Variable names are only one character long

    Over time, all of these deficiencies were eliminated in subsequent dialects of Basic.

    Basic eventually evolved into a professional programming language. The problem is that a lot of those advanced features are hard to understand for a beginner. It would be a very unusual 14 year old who would be using recursion and OOPS.

    What we need is a language with training wheels. I think the best approach would be five levels. Set the level (1, 2, 3, 4 or 5). Each is a superset of the previous level. Start at level 1 and 95 percent of the complexity of programming is hidden from you. Get good at level 1 and then change the level to level 2, etc. Those who are good and motivated can move up to level 5, which has all of the complexities and power that one finds in a professional programming language.

    The first question to ask is, "How do I display 'Hello World'?" If you have to create a class, or declare a variable to do so, something is wrong. It should be one line — e.g., Print "Hello World!".

    Once you got to level 3, I think there would be quite a lot of power available.

    Microsoft Visual Basic 6 was fairly straight forward. (With VB.Net, the .Net stuff adds far too much complexity for a beginner.) Visual Basic for Applications is basically a subset of VB 6. Get rid of some of its power and one would have a great language for beginners. At the same time, it is important that a teaching language not develop bad habits (e.g., Gotos).

    James Mitchell

    <a href="http://www.jmitchell.me” target=”_blank”>www.jmitchell.me

    • James_Mitchell

      Actually, VBA is included in almost all Microsoft Office applications: Word, Access, PowerPoint as well as Excel. (I think other Office apps such as Project also have VBA.) Outlook also has VBA but the VBA recorder does not work as well as the other Office applications. Excel is likely to have more heavy duty users who push Excel to the limits than Word, so VBA is used a lot more in Excel than in Word.

      In general, the macro recorder is a great way to learn. Just turn the recorder on, do a bunch of things, stop it, and look a the code. A lot of times I will record a bunch of actions, then tweak the code to make it more general, and then wrap loops around the code. In 30 minutes you can do a days worth of programming.