(Beginner’s All-purpose Symbolic Instruction Code)
Imagine it’s 1987, and you want to play a game on your computer. You pick up a stack of dot-matrix paper that has line after line of code. You take the first page, sit down at your Radio Shack TRS-80 and start typing what you see on the page. Line-by-line, including the line numbers. When you come to the end of page one, you get up and hand your brother page two, and he begins to type.
Typing lines of code was I played computer games as kids before cassettes and game cartridges. I don’t remember the game we spent so much time typing in, but I hope it was worth it. That was my introduction to Level II Basic (TRS-80).
BASIC was created by John G. Kemeny and Thomas E. Kurtz of Dartmouth College in Hanover, NH. They were math professors and wanted a programming language that could be taught without taking a course. They felt computer literacy would be essential in the future and wanted their students to learn to program.
Before BASIC, Dartmouth students would use a keypunch to enter a program on cards, hand them to a trained operator, and wait for the results. Which usually wouldn’t show up until the next day. When BASIC was created, it became the standard way people learned to program for many years.
At 4 am on May 1, 1964, the first run of not one, but two to three programs were run with the new programming language. BASIC ran on the Dartmouth Time-Sharing System, utilizing a new concept called time-sharing. So, instead of only one user being able to run a program at a time, many users could run their applications.
Creating the program required two computers: the GE-225 mainframe, which performed floating-point math, and the Datanet-30, which communicated with Teletype machines that students used to write programs.
Dartmouth BASIC was a compiler, meaning that it converted your program into machine code at one time. In June 1964, it became generally available to all students on Teletype II machines and were used to solve math problems. The length of a Dartmouth BASIC program was measured in teletype paper. The maximum was about two feet of paper.
Students were encouraged to come into the new computer center and use the systems without having anyone ask what they were doing. Students were free to use the systems to work on serious research projects, do homework, play games, or write letters.
By 1967, 80% of three incoming freshman classes, had learned about computers while writing and debugging their own programs. Many continued after finishing the required BASIC classwork that was a mandatory part of the math program. The faculty utilized the classes as well, and 40% of the entire faculty (not just math professors) learned it.
The earliest version of BASIC had about 14 commands: LET, PRINT, FOR, NEXT, GO TO, IF-THEN, DEF, READ, DATA, END, GOSUB, RETURN, DIM, REM. INPUT was added a bit later and made programming and playing games possible, which many people saw as the language’s defining purpose.
Dartmouth also provided access to DTSS over phone lines to other east coast schools, including Harvard and Princeton. GE (General Electric) commercialized the DTSS and BASIC and sold them to business customers. Once BASIC started appearing outside of Dartmouth College, Digital Equipment Corporation and HP introduced their own versions.
Kemeny and Kurtz’s personal computing dream finally became a reality in 1974 when MITS introduced the Altair 8800. The computer caught the eye of a programmer at Honeywell (Paul Allen) and a sophomore at Harvard (Bill Gates). They wanted to make the Altair run BASIC, and their partnership resulted in a company called Micro-Soft. They licensed Altair BASIC to MITS, who then sold it for $500 unless you bought an Altair.
Or you could get it for free by pirating the software. Pirating was rampant by early computer owners. So much so that Bill Gates wrote a legendary open letter about the rampant theft of their (Micro-Soft’s) intellectual property.
1977 brought computers aimed at the non- hobbyists. Apple’s Apple II, Commodore’s PET 2001, and Radio Shack’s TRS-80, all with their own versions of BASIC. Commodore offered a variant of Microsoft’s BASIC upon introduction, while Apple and Radio Shack offered a rudimentary variant of it. Apple’s variant was written by Steve Wozniak (Apple co-founder) before acquiring the rights to use Microsoft’s version.
For the next few years, Microsoft’s version was on everything. It was unavoidable. Turn on the computer, and you were taken directly into the language. You could load a program from a cassette tape, floppy disk, or start typing a new one.
Microsoft’s version of BASIC was not a compiled language like the Dartmouth version. It was an interpreted language. It converted each line of the program into machine code on the fly every time you ran it.
Microsoft was not the only variant of Dartmouth BASIC. Each computer company had to adapt BASIC to function on their own systems. So, if you coded a BASIC program on a TRS-80, it would ONLY run on a TRS-80.
Kemeny and Kurtz weren’t happy with the variants and founded a company (True BASIC) to preserve the original version and to be the same no matter what computer it ran on. With the number of new computers coming to the market, the company could not keep up.
In the mid-1980s, the language’s influence had peaked, and soon Pascal was becoming the default language to teach programming to beginners. Coding your own programs was also becoming unnecessary, with software applications already created that did what you wanted like spreadsheets and databases. Microsoft saw what was happening with BASIC and moved from languages to software applications.
In 1984, Apple shipped the first Macintosh computer, without BASIC. In 1990, Windows 3.0 also had no BASIC bundled. Visual BASIC was introduced for professional developers (becoming Visual Basic .NET). While Windows 3.0 didn’t have BASIC anymore, it did have an MS-DOS version called GW-Basic, later becoming QBasic. With Windows ME in 2000, it was the last operating system with QBasic. At that point, QBasic only let you write MS-DOS programs, and no one wanted to anymore. (McCracken)
While Dartmouth BASIC was created to run on machines at Dartmouth, each version after that was a variant to run on a specific computer. Because of that, the platform list is vast, and each computer that came out from the 1974 MTS Altair 8800 to the 1990’s Window’s machines had its own version. It was on computers, video game consoles, calculators, cell phones, and computer chips.
Some BASIC variants were: Altair BASIC, Amiga BASIC, Apple BASIC, Atari BASIC, Casio BASIC, CellularBASIC, Color BASIC, Commodore BASIC, Famicom BASIC, Microsoft BASIC, SEGA BASIC, Sony BASIC, TRS-80 Level 1 BASIC, TRS-80 Level 2 BASIC, True BASIC, VBScript, Visual Basic, Visual Basic .NET, etc. (Wikipedia)
Benefits and Downsides
A computer scientist said (of BASIC): “It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.” He wasn’t a fan of FORTRAN, PL/1, or COBOL either. (Dijkstra)
The characteristics that gave BASIC a lousy reputation are also the same ones that made it so easy to learn. GO TO, a command that lets you jump to anywhere in your program, made it easy to have the program navigate to different sections of your application. But it could also result in messy “spaghetti code.”
BASIC was also great because you could type in what you wanted and get an instant result. If it didn’t work, just retype the line that’s broken. If you used the same line number, the new version overwrote the old; debugging made easy. However, this same flexibility also made it a poor language for “real” programming.
BASIC made you organize your code with line numbers, but that feature was later removed. Line numbering helped emphasize the sequential nature of computer programs and helped students learn how computers ran them.
Despite opponents, many programmers who started out on BASIC went on to have thriving careers.
BASIC CODE EXAMPLE
20 LET S = 0
30 FOR N = 1 TO 100
40 LET S = S + N
50 NEXT N
60 PRINT S
While Dartmouth BASIC, Microsoft BASIC, and their offshoots are gone, Visual Basic kind of lives on. In fact, as of August 2020, it is the 6th most popular language. However, Microsoft no longer supports it and has revamped the language on the .NET framework. It isn’t based on BASIC anymore.
As of this month, TIOBE is now tracking Small Basic (from Microsoft), a BASIC variant. It debuts at number 102.
It turns out we can’t just get rid of BASIC either. Many of the modern applications we rely on still use it. For example, macros in Excel are a form of BASIC.
While BASIC was an excellent language to learn to code, there are newer languages that are also easy to learn and are still being updated and being used by developers. In addition, complex algorithms when it comes to artificial intelligence and languages that fit the job are being utilized.