If there’s a programming language that just don’t get no respect, it’s BASIC. One could make a pretty good little bathroom reader from all the snarky comments it’s attracted over the years. My favorite is this gem from Edsger W. Dijkstra: “It is practically impossible to teach good programming to students that have had a prior exposure to BASIC. As potential programmers they are mutilated beyond hope of regeneration.” (I think Dijkstra’s slightly stilted phraseology works better if you imagine it being said with a heavy Dutch accent.) That’s a bit hyperbolic, to be sure, but certainly BASIC has a lot to answer for. When I was a kid trading software on my trusty Commodore 64, saying a program was written in BASIC was as good as saying that it sucked. And things haven’t changed that much today. Has any development environment, ever, produced as much awful software as Visual BASIC? I must admit that learning that a program was written in Visual BASIC is still sufficient reason to make me not even try it.
But despite all that, BASIC’s importance in the history of computing is immense. Before it, there existed two principal computing cultures. First there was the mainframe culture. Centered around IBM and a few other big companies that tried to compete with it, it was marked by what Steven Levy so memorably called the “priesthood” model of computing common to government and big business: a few highly trained, lab-coated elites serving as minions of The Machine, doing everything by (IBM’s) book, with creativity and fun strictly Off Limits. The other culture was the hacker culture that sprung up at MIT and similar technical universities and perhaps the occasional smaller company: a group of generally young savants who were fascinated by the world inside the machine and lived to hack, who scoffed at the conservatism and groupthink of IBM and particularly embraced the smaller machines of the more freewheeling Digital Equipment Corporation (DEC). Different as they were, neither of these cultures cared much about making computers accessible to the everyman. Neither culture had any time for or interest in anyone who did not think in bits and bytes and registers.
When John Kemeny and Thomas Kurtz designed and implemented the Beginner’s All-Purpose Symbolic Instruction Code at Dartmouth College in 1964, they were not trying to please hackers or computer scientists. They were, rather, trying to make it possible for “ordinary” individuals to productively use computers. Today the idea of a programming language for the masses is almost oxymoronic; they simply load up their computers with the latest from Microsoft, Apple, or whomever, and leave the programming to the professionals. Back in 1964, however, and for quite a long time afterward, applications software in the way we know it today did not really exist. Using a computer for any but the most rote of tasks virtually required programming it; certainly, at any rate, using a computer creatively did. In attempting to bring computing to the masses, Kemeny and Kurtz’s goals were not so much technical as sociological, political, even ideological. A third computing culture, one I already began to discuss when mentioning HP Time-Shared BASIC and Creative Computing magazine in the context of The Oregon Trail, began with BASIC at Dartmouth in 1964 and remained associated with the language for many years.
While the priests in their climate-controlled data centers and the hackers sequestered away in their cubbyholes at MIT were oblivious to the changes that were wrenching society in the late 1960s and early 1970s, the BASIC culture was full of counterculture excitement. They were all about bringing these machines out of the banks and the ivory towers and putting them at the disposal of the street. That makes their work as important as that of the hackers who were inventing C and Unix and laying the foundation of the Internet at about the same time. Sometimes, more perhaps than either would first want to admit, the two cultures even intersected, as they did in the case of the game I want to talk about in my next historical post, Hunt the Wumpus, which originated in HP Time-Shared BASIC but was novel and appealing enough to be attractive to the traditional hacker mindset as well — appealing enough to influence the first works of true IF.
As for BASIC, let’s remember to give it its historical due. If you’re excited by computers as artistic tools with relevance to the world and the people around them, you should recognize its place in forging those connections. The sniffing condescension of elitists like Dijkstra seems pretty unattractive indeed in this light.
So, yeah, respect is due. Now just don’t ask me to actually use the thing.
David Cornelson
May 2, 2011 at 4:43 pm
I am one of those BASIC programmers doomed by the first 16 years of my career in IT. I wrote BASIC on the original IBM PC, on PDP 11’s, On VAX’s, in QuickBASIC, MS Professional BASIC (a real compiler!), and Visual BASIC (I bought V1 from an 800 number at Microsoft – V1 was never shrink wrapped or available via retail).
Writing BASIC on the PDP in early versions of RSTS, and original IBM PC was dodgy from a computer science perspective. I recall code that used the GOSUB command, but would return from varied end points. Talk about spaghetti code.
Later, DEC upgraded BASIC to have real functions (encapsulation) and libraries, which made it possible to do some level of real programming.
The VAX continued on that path and its version of BASIC was strongly typed and procedural. You could still fall back on dynamic variables, but it was frowned upon. (Oddly, dynamic typing is all the rage now).
Visual BASIC of course was also highly procedural, but also object-based (not oriented). You could mimic some level of OO with VB, but in the end, it was procedural and still allowed dynamic typing (actually dynamic typing was required in many places).
I believe TrueBASIC offered OO capabilities and I played with it a bit, but never for work.
When .NET came out, object-oriented BASIC arrived, but I did not follow. I chose to learn C# and used Java books to pick up OO concepts. It’s taken me 10 years to unravel the procedural mindset I once had, but I do believe that for the most part, my brain is broken when it comes to understanding true OO. I understand OO, but it’s not always intuitive. I make leaps in understanding abstractions, but there’s still a procedural bent to my thinking. I still think in a linear fashion.
But I loved BASIC. It allowed me, a non-engineer, to work in logic and computers on business systems. I would have never succeeded using C or C++. I would have gotten bored managing memory all the time and became a bartender or middle management.
Jimmy Maher
May 3, 2011 at 5:23 am
I think the last BASIC I worked with until very recently was True BASIC on my beloved old Amiga. When I started messing around with HP Time-Shared BASIC again recently, my main reaction was overwhelming frustration. But then I’ve been thinking like a C programmer for many, many years.
Speaking of object-oriented programming: I think it’s very hard to break free of the procedural mindset, no matter what language(s) you gravitated to in the beginning. I’ve been working with C++ on and off for what must be close to 20 years now, but it wasn’t until I started using Java last year that I realized that I’d been essentially treating C++ as just an improved C with some nice syntax shortcuts, better string handling, easier memory management, etc. Java sort of subtly forces you to embrace the OOP mindset, and I think my experience with it it will change the way I program next time I go back to C++.
But of course, its lack of object orientation was not what computer scientists hated so much about BASIC; C and, indeed, every other language of the time was also very procedure-oriented. (Not that you said anything different; just making sure this point is clear.)
David Cornelson
May 3, 2011 at 5:35 am
They hated GOTO and GOSUB, no doubt. And rightly so. I remember using the Tandy version of GW-BASIC and it allowed RETURN {line number}. The intent of RETURN was to go back to the next line after a GOSUB, but for some misbegotten reason, someone decided to allow RETURN to be a GOTO before eventually returning to that original GOSUB.
Just thinking about those programs gives me a headache.
My favorite BASIC was the Pro compiler MS sold in the late eighties. I still have a Payroll reporting system in production built on that compiler at a printing company in Milwaukee. The resulting programs were smoking fast because they actually made a real compiler and not the usual p-code interpreter. I still have the manuals and diskettes.
Felix Pleșoianu
May 2, 2011 at 5:26 pm
I still remember when I got my first computer, a ZX Spectrum-compatible built from Russian components. I didn’t have any game tapes, or a BASIC book, but I did have some scraps of information gleaned from who-knows-where. It was enough to start banging on the keys.
The first thing I got the machine to do was print a number. Less than an hour later I knew how to draw lines. And that was all I could do with it for days. But I had figured it out myself. There was my first computer, and I could talk to it, and it would carry on my orders!
And that sums it up, really. The echoes of that first encounter are still with me. I like to make a game out of software development, and I like games that allow me to program them in one way or another. No modern computing environment, not even a Linux command line, offers the same combination of simplicity, immediacy and persistence. (MU*s do, but it’s not the same thing.)
I know several people who started out that way, and they all understand computers far better than anyone who got a PC first. Most are (good) programmers; one is an engineer. They are patient, methodical and logical. And all because they had access to a very special learning tool at the right time…
But gosh, BASIC was unreadable. I have no idea how we ever got anything done in it. Give me Forth any day. :P
Jimmy Maher
May 3, 2011 at 5:33 am
My parents bought my first computer for me for Christmas 1983. It was a Commodore 64, which was a pretty good choice for a kid at that time. Problem was, they knew nothing about computers, and so didn’t understand that just the bare computer by itself wasn’t too useful. I had no monitor, no disk drives, not even a tape drive for storage. Still, I hooked it up to the TV and spent many hours fiddling around with BASIC, even though shutting down the machine meant losing all of my work. Soon I scrounged up a disk drive and a monitor, and the pattern for much of the rest of my life was — for better or for worse — set.
Linus Torvalds got his start in much the same way, fiddling around with a Commodore VIC-20. Not that I’m in a hurry to compare our relative achievements, of course. :)
Victor Gijsbers
May 2, 2011 at 6:08 pm
I learned to program in GW-BASIC. Sure, it may have lacked many features you would expect an advanced programming language to have, and yes, it kind of suggested that using GOTO was a great idea, but still: most of what you did with BASIC was just solid programming. FOR-NEXT-loops, IF-THEN-ELSE-logic, cutting your program up into subroutines to be called by GOSUB, you’d do all the same stuff in C. It was a great way to learn programming, especially for a young person.
(Talking about digital antiquities: my grandfather was one of the people in charge of the Mathematisch Centrum, which built the first computers for Philips starting in the late 40’s. In the 50’s, he was joined by a young man who would later become very well known as a computer scientist: Edsger Dijkstra. Unfortunately, my grandfather died before I was born, so I have never talked to him about these times.)
Nathan
May 2, 2011 at 8:09 pm
As a kid learning BASIC on the TI-99/4A circa 1983, I had a hard time seeing the usefulness of GOSUB. It could save a little typing once in a while, sure, but there was no provision for local variables and no clear way to program a recursive routine. I was really excited to find the DEF keyword in the manual that supposedly let you create “user-defined functions”, until I read through the instructions–it was just another way to save a little typing. It wasn’t until I discovered LOGO that I found what I was looking for.
Felix Pleșoianu
May 3, 2011 at 5:52 am
I like LOGO better myself, but BASIC is much closer to how the computer actually works. (If you ever played with assembly code, you know what I mean.) The educational value can’t be overstated; too many programmers nowadays, who got started with PHP for example, have no idea what’s actually going on inside the machine. And don’t even get me started about Java, which forces you to use objects even when it doesn’t make an ounce of sense.
Jimmy Maher
May 3, 2011 at 5:39 am
While a diligent and patient programmer could write relatively well-structured code in BASIC, the language didn’t demand it of you, and, indeed, seemed in some ways to actively discourage it. It’s possible to write awful code in C as well, of course — I’ve heard horror stories about programmers putting literally their entire program into a single main() function — but you have to kind of work at it a bit more.
I also think there’s a combinatorial explosion problem of sorts that happens with BASIC. While simple learning programs are very straightforward and easy to read, programs of any real complexity, even if carefully crafted, become a nightmare to read, understand, and maintain. I know this only too well from poring over the Oregon Trail source. :)
ZUrlocker
May 2, 2011 at 8:35 pm
I’ve quoted Djikstra myself on Basic, but you have to remember the context of his quote. It was 1975, before Apple was even founded. And I think his point was simply that if the language doesn’t encourage proper design concepts (modularity, structured code, etc) then it’s not a good training ground for writing large programs. Basic has always had a place as an easy to use language and it has evolved over the years to accomodate proper structured programming etc. But in making a language accessible, you also open it up to some less-than-professional efforts. Not a bad trade off.
Jason Dyer
May 2, 2011 at 10:54 pm
Considering even FORTRAN was spaghetti code at the time (FORTAN-77 wasn’t out yet) his quote does seem a bit unfair.
Jimmy Maher
May 3, 2011 at 5:47 am
Yes, there’s a note of elitism that I find quite distasteful. “How dare these Normals try to program on OUR machines!” This sort of thing is just about my least favorite side of nerd / hacker culture.
Wade
May 3, 2011 at 3:40 pm
I think BASIC is pretty much beyond criticism. Criticism of programming languages is only relevant to the goals of a language, or inherent and insurmountable flaws in them (like… things that literally don’t work). The goal of BASIC, if any, was to let people program their computers to do whatever they wanted, and it did that brilliantly.
Now that there are a zillion languages, the question of ‘What is this for?’ or ‘What does it do well?’ are more relevant when you give people a new one. For BASIC, the answers were ‘Whatever you want’ and ‘A bit of everything’ respectively.
Harry Kaplan
May 5, 2011 at 10:46 pm
In 1970, after I graduated from college, I got a job at what today you might call a live walk-in help desk at the University of Pennsylvania Computer Center. Penn owned an IBM mainframe for general university use (actually, the Computer Science department had its own private UNIVAC machine for years, but that’s another story). Anyone writing in a general language was using either FORTRAN or PL/I, though lots of packages (SPSS or SAS, Simscript, etc.) were also in demand. A young student once came in and asked me how she could get her BASIC program to run. I politely explained that she couldn’t, as it wasn’t on the mainframe. “But,” she replied, looking truly puzzled, “I thought it was, well, basic!”
jon
November 24, 2011 at 1:15 am
There are two pretty compelling arguments – really, they are one – that OO isn’t all it’s cracked-up to be. First, most OO-centered programming courses start by explaining how “natural” the OO perspective is. Overloading… Constructors… Polymorphism, From a dead start, this takes many, many hours, and if this were a truly “natural” or remotely intuitive perspective, it wouldn’t. Similarly getting someone to the point where they can really do meaningful work in a “serious” OO language takes…Well, it takes years. That’s fine! Becoming an engineer takes years, too. But when circumstances evolve are such that putting up a bookshelf or assembling a piece of IKEA furniture require an engineering degree, something has run seriously off-the-rails.
Much of the time, people do not need to program a DVR O.S. (thank you, Java) or device-driver (thank-you, C++).
BASIC is a straightforward imperative language permitting anyone with a reasonably logical mind to explore, develop and express some profoundly complex ideas, with little more background required than “pleasant hacking-at” over a few evenings. No one ever felt learning BASIC was like getting smacked in the head with a sack of nickels. Do any 13-year-olds really start plucking Java and say “Wow, this is awesome fun! Look what I can do!”…? A BASIC-free world effectively filters out a lot of otherwise-promising folks, and biases the world toward scope-limited geeks who – while possibly masters of data abstraction and syntax – are not always the kinds of creative, left-field thinkers who come up with the next…Whatever.
“Should” large-scale, distributed, collaborative, fault-tolerant systems be written in BASIC? Probably not. However, a good, structure-focused implementation of it combined with just a little guidance in programming practices, strategies and tactics can go a long way.
In 25 years, OO will be regarded (unlike “structured” programming, which was fully “of it’s time”) as an evolutionary fad/dead-end, or at least an irrelevancy. “Real” work will be done in next-gen declarative languages which will make the concept of “object” abstractions look antiquated. Will the systems which model these next-gen systems be written using OO languages? …Who cares?
Unrelatedly, I recommend Michael L. Scott’s excellent “Programming Language Pragmatics.”
Tom
August 26, 2014 at 1:50 am
I was lucky enough to grow up near Dartmouth. I learned Dartmouth Basic (basic6) on DTSS. It included a line editor and matrix math IIRC. All on a teletype. DTSS also had a chat. There was a word processing program called runoff. Unix pipes were definitely copied from DTSS but were much easier to use.
Our school had a dial in to DTSS in 1980. Later we had Commodore PETs and CBMs. I got an Apple ][+ at home and learned MS Basic. At college, I had GWBasic on a PC along with Fortran and later Turbo Pascal.
Silviu
May 13, 2017 at 3:22 pm
I’m a graphic designer. I had a Sinclair Spectrum compatible as a kid after the revolution in Romania. I also acquired a few BASIC programming manuals, tought myself BASIC to a moderate level, but I didn’t do much programming of my own, merely contending to just type programs that seemed cool in said manuals; there were also magazines at the time in which one could find BASIC (and even assembler) code. Being a visual person, coding in assembler was over my comfortable level at the time, but two friends of mine dabbled in it.
My crowning achievements at the time in BASIC: a half-completed program that would display a GO board and enabled two human players to play on the computer (no AI, that was too difficult); despite my best efforts, there would always remain some error in the code that would make the program malfunction; I ended up with about three versions, all failing at a different point when running; I abandoned this project. The second was programming my own version of the Eric and the Floaters game; it got only to the stage of thinking out in detail (on paper) some essential chunks of the game: map layout and enemy search patterns; after one of my programmer friends, impressed with my efforts so far pointed out that it would run slow in BASIC, I abandoned that too.
The only complete program I created was to be in LOGO: I got inspired by a recursive subroutine in some LOGO manual and adapted it to display a fractal tree. The first version didn’t use enough decimals and the drawing would be off; for the second I would put 4 decimals to be sure and the drawing was perfect; for the third version, I implemented choosing variables for the detail and size of the rendering.
Thus ended my interest with programming. I should probably try PROCESSING now, considering my interest with all things visual.
Mike Taylor
October 4, 2017 at 11:38 am
Nice to read this defence of the cultural importance of BASIC. A while back, I went perhaps a bit further in defending it as a technical choice … from a certain point of view. See what you think. Where Dijkstra went wrong: the value of BASIC as a first programming language.
Tom
November 7, 2017 at 10:52 pm
talk about my -> talk about in my ?
Jimmy Maher
November 8, 2017 at 11:16 am
Thanks!
Arthur de Castro Silva
March 17, 2018 at 11:13 pm
Today I’m 20 years old. When I was about 7 or 8, my father showed me how to do things in his MSX, and so I got my first contact with BASIC. He also showed me the book “Your first BASIC program”, by Rodnay Zaks (the one with a dinosaur programmer, the “snake program” and so on). It was funny to me, and after some time I ended up with GW BASIC on my Win98 and start making some math programs to help me with the homework (kinda cheating, but still funny xD).
When I entered the college in 2015, I was very excited about starting programming “for real”, with a professor teaching C++ and so on. And I must say that BASIC wasn’t bad for me: I already have a nice start with C++ (just some trouble with OO in the begging) while some of my class mates couldn’t figure out how to do some simple things. Thus, that quote from Dijkstra is complete non-sense to me, since BASIC actually give me some advantage. Perhaps he was referring to someone who used basic for a very long time?
I was using QB64 on the last time I made anything with BASIC, and I still want to play with this tool (and the language) again xD
z80jim
September 25, 2018 at 3:44 pm
For that early day feeling of BASIC programming on 8-bits I can’t recommend enough the fantasy console PICO-8. It uses a subset of LUA ( easy to learn ), has a 128×128 16-color display, built-in text editor, sprite editor, map, sound editor, and music composer – and it is a blast and gaining popularity.
http://www.lexaloffle.com
Dewi Morgan
January 26, 2019 at 7:23 pm
Like doubtless many others here, I started out programming in BASIC – Spectrum BASIC to be precise. I spent countless hours (years!) playing with that. With that, plus a list of Z80 op-codes for the stuff that needed super speed, the world was your oyster!
I regret throwing away my spectrum tapes, and the later 3″ disks, and even later, the Visual Basic programs I wrote when I got my first PC.
For years, I learned Pascal, then C, then Java, and any number of other programming, scripting, assembly, query and markup languages. The oldest program I own that I wrote is a C one.
And then one fine day I found DarkBasic Pro, and rediscovered my love of what made BASIC great: I could, in a couple dozen lines, make myself a game. DBP has commands for 3D object and mesh loading, creation, animation, movement and distortion, as well as for lights, camera control, and so forth, so it could be a dynamic, action game, not “just” an IF.
DBP died a commercial death eventually, but lives on because they graciously open sourced it before abandoning it: https://github.com/TheGameCreators/Dark-Basic-Pro
It was a great stepping stone into that world, and also drove home how much silly boilerplate most languages force upon us. And I’m absolutely with you: from their forums, kids and beginner gamedevs loved the power this gave to create things.
It had limitations: no dynamic anonymous data structures condemned the language to forever be a toy, and people generally graduated from DBP to C, where the same libraries were usually available.
BASIC also no longer gives control over their day-to-day use of the computer, as the OS is nowadays not tied to the interpreter. Instead, macro/UI-interception languages like AutoHotKey are needed.
King Lysandus
April 28, 2019 at 10:49 pm
I started out on a x386 running MS DOS. Little later than most of you. QBasic was on every machine, and the first thing I would do when encountering a new machine was look for .bas files to poke around.
I grew up in rural Northwest America, we didn’t have fancy BBSs or internet. Networks were rare. So this was how I learned to program, poking around other people’s code, making changes, seeing what worked and what did not.
BoardGameNut
October 16, 2019 at 2:14 pm
I have great respect for BASIC even though I never really programmed with it. I might have “copied” some programs into the computer when I was young. However, my grandfather who worked on Saturn V guidance systems as NASA during the glory days of Apollo was a master of BASIC programming and many other things technical. I would watch him spend days on end tweaking his programs in BASIC for the C64 and C128. He had written programs to handle the golf handicaps of three golfing leagues around town, and he would show me all the things he could make it do. The handicap program even had “windowed” interfaces. My grandfather had a great influence over me becoming the engineer that I am today. My preferred languages are C/C++ and Python. I tried to teach him Python before he died, but he was a too die-hard BASIC guy :)
Mordamir
November 28, 2023 at 9:19 pm
Basic its a great languaje for coding, freebasic, qbasic, gfa basic, compiled, with libraries and a good structure runs flawless inunlimited tools for dos, ST , etc
Marion
February 13, 2024 at 9:02 pm
Enjoying this blog very much — thank you! But it’s Dartmouth College not University. I was fortunate enough to be a student there in the late 90s, and we still used the Dartmouth College Time Sharing system to register for courses. We also had to write programs in TrueBASIC in several (non-computer-science) courses…I recall one professor telling us never to use GOTO, and that our code “should read like a Shakespearean sonnet.” Hah.
Jimmy Maher
February 15, 2024 at 4:18 pm
Thanks!
Bhazo
September 13, 2024 at 11:47 pm
The strongest argument I know for BASIC being a good enough language is that Sid Meier’s Pirates!, to this day the best pirate game ever made, was programmed in it.