Kopec Explains Software
Computing concepts simplified
27 days ago

#129 BASIC

The Democratization of Computing

Transcript
David Kopec

BASIC is more than a programming language. It was millions of people's first introduction to computing. In this episode, we'll tell the story of the creation and importance of the basic programming language. Welcome to COPEC Explain Software, the podcast where we make computing intelligible. In this episode, we're going to discuss the programming language, BASIC. Now, BASIC is actually an acronym. It stands for beginners all purpose symbolic instruction code. That's a mouthful. But basically, it was one of the first attempts to create a programming language that was easy enough for anybody to use.

Rebecca Kopec

And the first folks that it was trying to make easy to use for was college students in the early 1960s. 1964 at Dartmouth College.

David Kopec

Right. The project was led by two math professors, John Kemeny and Thomas Kurtz, both pretty famous in their own right, but especially well known for creating BASIC. But they didn't do it on their own. They actually worked together with undergraduate students at Dartmouth College to create both BASIC and the Dartmouth time sharing system, which you can think about as the operating system that the first version of BASIC ran on. I think it's important to contextualize what computers were like in 1964 when they were creating the first version of BASIC and the Dartmouth timesharing system.

Rebecca Kopec

Yeah, computers were not what we imagine today, even their size. They took up an entire room, and you used punch cards to calculate what you wanted to have done.

David Kopec

Right. It was a very laborious process to enter a program into a computer at that time. And a lot of the programming languages that are still with us today, that came from the 1950s. So just before, when BASIC came out, are not that approachable for beginners. We're talking about programming languages like Fortran or cobalt or Lisp. All of those are 1950s era programming languages that people might still be familiar with today. Other popular languages at the time were things like Algal, which, again, were not designed for beginners. Now, BASIC, from the beginning, was trying to be a programming language that anyone could use. And the initial target audience was the students of Dartmouth College, but not just students in the math program, like John Kemeny and Thomas Kurtz were teaching, but students from across the college, from all kinds of different disciplines. But how would they access it if there's only one computer and everyone has to write punch cards? And that using something called batch processing, where we just process one person's set of punch cards at a time, that would not allow many people to have access to this exciting new programming language. So basic was coupled with something called the Dartmouth timesharing system, which allowed multiple different people to use what's called a teletype, to connect to the computer. At the same time, in the first version, as many as 30 different students could all be writing basic programs and executing them through their teletypes, which are you can think about as basically automated typewriters, at the same time to the one mainframe in the basement of college hall at Dartmouth.

Rebecca Kopec

And it really took off on the campus. The different students across the different disciplines really used it.

David Kopec

And I think what's even more incredible is that they helped develop it. It was actually a team of undergraduate students working together with Kemeny and Kurtz that got the first version of the Dartmouth timesharing system and the first version of Basic off the ground, John Kemeny doing a lot of the work on the initial basic compiler. When they applied for a grant from the National Science foundation to help fund some of this work, the National Science foundation was quite skeptical because they thought only graduate students would really be capable of doing this work. But at the time, Dartmouth College didn't really have any graduate students. So, of course, the grant included the use of undergraduate students. And Kemeny, because he had a great reputation, was able to overcome the National Science Foundation's doubts, quite rightly, of course, because the project was very successful.

Rebecca Kopec

And Kemeny also had this view that computers were going to become more and more useful and used by folks across a spectrum. It wasn't only going to be math researchers or computer scientists using computers. It was going and needed to be accessible to all.

David Kopec

And that was a radical idea in the 1960s. The first personal computer is not going to come out till 1975. So we're more than a decade before the democratization of computers as we typically think about them, but basic was actually an early democratization of computers. Not only did the students at Dartmouth College, and within a few years, as much as 85% of the campus was writing programs in BASIC. Get access to computers through basic and timesharing. But Dartmouth also provided, through the telephone network, remote teletypes in high schools across New England and other colleges, access to their system. And by some measures, the Dartmouth computer system became the most widely used computer system in the world.

Rebecca Kopec

It's pretty impressive to think about it, too, because when they first started developing this, or Kemini first really had this vision, Dartmouth didn't even have a computer.

David Kopec

Right? When students on the campus wanted to go run a program, they would actually write the program out by hand on punch cards. And then one of the math professors would take it down to MIT's computer every two weeks and bring the results back up to campus. So when professors or math students needed to get their results, they had to wait quite a bit. So truly visionary to think about doing all this plan for all it, given the environment of the time.

Rebecca Kopec

All right, so let's talk about the language itself, because it wasn't just used in this setting at Dartmouth, it really became ubiquitous.

David Kopec

Yeah, that's absolutely true. And before we get into all the places it went to, I want to mention the three goals that Kemeny and Kurtz had for basic. One is they wanted it to be easy to use, and there had been some experiments at Dartmouth before BASIC to make an easy to use language. But BASIC was really the first successful 1. Second is they wanted it to be a jumping off point for more sophisticated languages. So some students might start with BASIC, or users might start with BASIC, and then they'll go on to learn something like a Fortran. And then the last thing is it had to work together with this timesharing system. So it was the interface to the timesharing system that was going to democratize the use of the computers in a language that everybody could understand. So they were successful with all three of those goals, and BASIC did spread to other timesharing systems throughout the world. But when BASIC really exploded was with the personal computer revolution in the mid to late 1970s.

Rebecca Kopec

Yeah, at that time, it was pretty much on all the new microcomputers across the different companies that were building them.

David Kopec

Right. There's three famous american microcomputers from 1977, the Apple two, the TRS 80, and the Commodore PET. All of them came with a BASIC interpreter. The first microcomputer that had widespread success was the Altair 88 800, which came out in 1975. And actually the company that created the BASIC interpreter for both that and those three others that I just mentioned was Microsoft. That's how Microsoft got its start. Microsoft initially became a successful company by building BASIC interpreters for microcomputers, and they became the de facto standard BASIC interpreter on any new microcomputer that would come out. And when I say microcomputer, we're really talking about basically personal computers. In fact, even the first official IBM personal computer, the IBM PC in the early 1980s, had a BASIC interpreter built in as well. It ran DOS, too. But if you didn't have DOS, it would actually go in the rom to a BASIC interpreter. So every major personal computer from the mid 1970s, when personal computers first come onto the market, until the mid 1980s, had a BASIC interpreter built in. And in fact, that basic prompt would be the first thing you would see on many of them, like if you turned on a Commodore 64, you're basically thrown right into a basic prompt. So this was the language that millions and millions of people used when they first used a computer. They got thrown right into basic, and the first thing they might learn in their owner's manual or from a friend was how to write a few commands in basic. And BASIC is a very simple language in its most, quote, basic form. For example, in the original version that came out of Dartmouth in 1964, there's only a few commands, and you can learn them in pretty much an hour, even if you haven't programmed before. There's a command called let for defining a variable. And in the first version, variables could basically be only numbers, although there was some primitive kind of array support as well. There's a command called print for putting some output out on the screen. There's a command called for having a loop. And we could also call these commands statements. There's go to for going to a different line of the program. And in BASIC, typically every line has a line number. And the way that you do control is you move around from one part to another part by defining what line number you want to go to. And there was an if statement, which anyone who programs is, of course, familiar with, if statements, and that's basically it. There was some primitive way to define some primitive math functions, and there were some built in math functions, but there's not much more than that in the original version of Dartmouth BAsic. I've actually met people who many times in my life who are professional programmers who started out learning BaSic. And often they first learned basic when they were a kid. That was my experience. I first learned basic when I was seven or eight years old. And I know a lot of professional programmers who grew up in the 1970s, 1980s, even the 1990s, like me, who started with BASIC. And it was easy for them even when they were a little kid, which is, I think, is pretty amazing.

Rebecca Kopec

And one of the reasons that it was easy, or one of the main reasons, was that they made the language English. Like the statements you just said, you could just say them, you could read them, and you could type them in.

David Kopec

Right? Reading basic is so easy to understand. There's almost no superfluous symbols. There's nothing that looks greek. It really does look English like. And there's so few commands to learn, so few statements to learn, that before you know it, you've already mastered it. That also means it's kind of limited in some ways, but it was good enough for the limited hardware of those early personal computers. There wasn't much to those early personal computers, and because BASIC was so simple, it can fit in very little memory. For example, beyond the Microsoft based interpreters, there was a very popular interpreter on those early personal computers called Tiny BASIC. And another interesting aside about that is it was one of the first pieces of popular open source software, tiny BASIC. But tiny BASIC had just those few commands from the original Dartmouth BASIC. In fact, most versions of tiny BASIC didn't even have the loop. They didn't have the for loop control. But anyway, tiny BaSIc could fit in as little as two or 4. Computer that was extremely inexpensive in the late 1970s might only have that much ram. And so your only ways of programming it are going to be either programming in machine code or programming it in tiny BASIC using the tiny BASIC interpreter. So BASIC was ubiquitous in the but then it started to fade by the late 1980s and early 1990s, as computers became more sophisticated, personal computers specifically where BASIC had really found its niche, we started to have more sophisticated operating systems, things like the Macintosh, Microsoft Windows, and now anybody could use a computer by just pointing and clicking. And so there was no need to have this very simple language be the first thing that you get to when you turn on your computer. And so personal computers stopped having basic interpreters built into them and certainly stopped having the basic interpreter as your main interface into using the computer. It did live on in a small way in the form of visual Basic, which was a popular way of building GUI apps from Microsoft in the 1990s and continued through to the OOS as Visualbasic. Net. But visual Basic, while it shares the name Basic in it, is a much more sophisticated, complex language than the original Basic. It still had that idea that it should be easy to use and easy to pick up. And it's certainly simpler than something like C Plus plus. But it was a far cry from Dartmouth Basic of 1964. It's part of the lineage, but it's not the same thing as the original basics. Of course, basic interpreters still exist today. Are they a good way to learn programming? In my opinion, not if you are an adult. If you're a child, I think sure, having this really restricted simple language and feeling like you can really master it, really become an expert in it, even as a kid, I think feels pretty good. But if you're an adult learning how to program, I think something like Python or JavaScript, just because they're ubiquitous, there's tons of resources, and you want to learn another language, make more sense today. But for kids, I still think Basic has a place, because again, you can be seven years old and learn how to use it, which you might have a little more difficulty just because there's more that you can do with it with something like Python.

Rebecca Kopec

And if you're interested in kind of the history of programming, the basic has such an important legacy that it might be kind of fun to learn if you're a programmer.

David Kopec

An interesting thing to do is actually to write your own basic interpreter. Because the language is so simple, it's possible to do that in just a couple hundred lines of code. And in fact, in my next book, which I'll be talking about on a future episode of the podcast, there's a chapter on writing your own tiny basic interpreter in Python that's fully compatible with the original tiny BASic language, so you can run those programs from the 1970s, which is pretty cool. BASIC did have its critics, though, even though it was so popular and introduced so many people to computing and in many ways democratized computing. There were some professional computer scientists who felt that there were some negative things about it. One of the main things is, as I mentioned earlier, the main way that control is done in BASIC is by having line numbers and using go to's to jump from one part of a program to another part of a program. As you might imagine, that can quickly get pretty confusing. You don't remember how you got to this part of the program from some other part of the program. And that can be known as something called spaghetti code. You have code that's just using go to, going from one part to another part, and it's like trying to follow pieces of spaghetti through a plate of spaghetti. You don't know how you got from one part of the plate to the other part by following the little strands. And so spaghetti code was a major criticism of BASIC and led to a movement. And there was spaghetti code in other languages too, called structured programming, which is the idea that all programs should really avoid things like go to's and completely use more formal structures like subroutines and functions. And later versions of BASIC, of course, added subroutines and functions, including Microsoft BASIC, so you didn't have to keep using go to once you got to the 1980s versions of BASIC. But these go to's were so harmful to the way that some people programmed that a very famous computer scientist, Djkstra, said, and I'm paraphrasing here, that people who learn to program with bAsic are so brain damaged in their programming side of their brain that it's unrecoverable. Basically, if you first learn BASIc, it's going to be very hard for you to become a good programmer in a more structured, formal language. I'll say, for me, I've been okay. I made it, even though I started with BASIC. And I think Dijkstra's criticism is a little bit extreme. But there's a famous letter that goes with this called go to, considered harmful, and I'll link to that in the show notes. The other thing I'll link to in the show notes is a great documentary that Rebecca and I watched, made by Dartmouth about the origins of basic. And we got a lot of the information in this episode from that documentary. So if you're interested in the story, I highly recommend that documentary. And you do, too, Rebecca, right?

Rebecca Kopec

Yeah, absolutely. I think one of the most fun things about it is you can see the real impact that it had on the students who were on that team in helping to develop this.

David Kopec

It's really inspirational to see the vision between Kemeny and Kurtz and how undergraduate students had such a big hand in this and were some of the co creators of this incredible system.

Rebecca Kopec

The way computers are used on the college campus, it's hard to imagine them not being there. So it's a nice little walk through history to see what it was like then and how powerful it was when it was introduced to a campus.

David Kopec

Okay, and we have one quick programming note for everybody as well. First, we want to thank all our listeners who've supported us over the last few years. We've had an incredible run with the podcast. Thank you for all your wonderful reviews, and don't forget to leave us a review. But before we say goodbye today, I wanted to mention that we're going to be changing our schedule in 2024. We're going to be going to a new episode every three weeks. The reason for that is we want to do some more complex episodes that require a little bit more research, like this basic episode where we watched a documentary and read several articles in preparation. But also because we've covered a lot of the low hanging fruit in this podcast, we have an incredible back catalog that you should check out on a huge range of topics. And now, on episode 127 or 128, whatever this is, we are now needing to do some of these more complex topics that require a little more research and time. So we're going to be publishing a new episode from now on about every three weeks, maybe sometimes every four weeks. But we're not leaving you. The podcast is continuing indefinitely, and we thank you for all the great suggestions. Some of you have sent us some great new topics to look into and dive into, and we have some great ones planned for 2024. Thanks for listening to us this week. Rebecca. How can people get in touch with us on X?

Rebecca Kopec

We're at Copec explains. K-O-P-E-C-E-X-P-L-A-I-N-S. Have a wonderful next few weeks.

David Kopec

We'll see you in three weeks. Bye.

The creation of BASIC was one of the most important steps in the democratization of computing. BASIC, coupled with the Dartmouth Time Sharing System, was developed by math professors John Kemeny and Thomas Kurtz along with a team of undergraduate students at Dartmouth College in 1964. They revolutionized who could use and access a computer. In the 1970s BASIC became the defacto standard interface to early personal computers. In this episode we contextualize BASIC, tell its story in broad strokes, and explain why it was so successful.

Show Notes

Follow us on X @KopecExplains.

Theme “Place on Fire” Copyright 2019 Creo, CC BY 4.0

Find out more at http://kopec.live