Before MS-DOS, Microsoft’s biggest product was arguably BASIC. Variants of Microsoft BASIC shipped in most 1980s home computers, including the Commodore 64, Tandy Color Computer and the Apple II (as Applesoft BASIC). Standing for “Beginners All-Purpose Symbolic Instruction Code”, BASIC provided a straightforward command syntax and the both beloved and despised line-numbering structure that made it easy to learn.
“Ah, BASIC. Loved by some, hated by many, but known by all.”
What 1980s department store demonstration computer was not adorned with an infinitely repeating display of “Bob waz here” or all sorts of unreprintable vulgarities? For a great many:
10 PRINT “something something somesuch” 20 GOTO 10
was the sum-total of their experience with BASIC, but it would still teach them so much. In that simple two-line program there’s an understanding of sequential execution (in the form of line numbers 10 and 20), a directive (PRINT), parameters for that directive (“something something somesuch”) and finally a branch from line 20 back to line 10 (20 GOTO 10). What other programming language can offer so much for so little?
Another program favoured by more overachieving rascals was the “time bomb”, a simple incrementing counter that they anticipated would eventually “crash” the computer once it hit some arbitrary numerical limit:
10 A=0 20 A=A+1 30 PRINT A 40 GOTO 20
This was a little more complicated – along with the PRINT directive and the GOTO branch we now have a variable named A and little addition. But alas! It would be quite some time indeed before our little “time bomb” would flummox the computer: in the case of the Commodore 64 you would have to get to 8589934599 before it gave up the ghost – although Integer BASIC on the Apple II retires after only 32767 (it is integer BASIC, after all. No floating-point numbers here! Filthy know-it-all floaters think they’re better than us hardworking integers!) Anyway, umm, where was I? Oh yes!
So, by now, these two frivolous little programs have taught you quite a bit, and without having to learn what a “compiler” is, or declaring what type your variables are, or any other redundant nonsense.
And so, the hope of every parent was that once their little shopping-mall vandal actually had a computer, they would use it for good, and not evil. Boy, were they wrong! Buying little Johnny (or Janie) a computer with a BASIC that had a SOUND directive (or some other straightforward means of generating noise) could lead to some rude awakenings at 2AM.
10 A=0 20 A=A+1 30 SOUND (A,1) 40 IF A<255 THEN GOTO 20 50 A=A-1 60 SOUND (A,1) 70 IF A>0 THEN GOTO 50 80 GOTO 20
Well, at least they were learning! There are conditionals in here! Two IF statements each branch with GOTOs once our siren reaches its crescendo, and again once it hits the bottom. It then restarts its wail, and repeats it ad nauseum. Noisy? Yes. But they wrote code. You have to forgive the little darlings.
If they were economising brats they would soon realise:
10 FOR A=1 TO 255 20 SOUND (A,1) 30 NEXT A 40 FOR A=255 TO 1 STEP -1 50 SOUND (A,1) 60 NEXT A 70 GOTO 10
saved a little bit of typists shoe-leather. And they would’ve learned another valuable construct in the form of the FOR-NEXT loops. Huzzah! The cacophony was still annoying, but at least it was educational. They could be outside throwing rocks at possums (or your neighbour’s RX-7.) Still happy you bought that computer? Good! You should be. It’s only another seven years until they go to university. Your sanity can last at least that long… can’t it? You’re a great parent, aren’t you?
If you think there’s an emphasis on kids learning to code now, you either weren’t around in the early 1980s, or have forgotten them, because BASIC was everywhere! There were books, and magazines, and even television shows that either in part or in whole taught good old 10 PRINT “HELLO”: GOTO 10
And why not? After all, we were going to need all the computer programmers we could get when we colonised Mars. Those moons of Saturn weren’t going to mine themselves, you know! Cloud cities with flying cars and ultrasonic tube-trains under the sea…it was a brave future. What happened to it? Oh yes, reality.
Still, learning to code at least teaches one logic, something sorely needed these days.
100 END: REM THE END
Logo: A Better Language for Learning
Logo (from the Greek Logos, meaning word or thought) is a computer programming language invented in 1967. A dialect of LISP (a “functional” language where programming is done using mathematical expressions or declarations instead of directives or statements like BASIC) Logo has a fully featured syntax that allows for a wide range of applications…but, let’s face it, the vast majority of Logo’s users have never progressed past the turtle.
Not that that’s a bad thing! Widely imitated by many of today’s “learn-to-code” products, the Logo turtle provided a straightforward, interactive introduction to computer programming similar to BASIC, but more visual and relatable by small children.
Perhaps the most famous version of Logo is Apple Logo, which quickly overtook BASIC as the learning language of choice in North American classrooms in the early 1980s. It essentially turned an Apple II into an electronic Spirograph, and students were entranced by the complexity of the patterns they could draw with just a few simple commands.
There’s a web-based version of Logo with examples available here:
Also, Paleotronic’s microM8 emulator features a reimplementation of LOGO that supports 3D turtling, with the additional commands UP, DN, RL (roll left) and RR (roll right).