This is very close to my heart because I learned to program in BASIC in the early 90s by reading a BASIC book from 1978. We didn’t have the internet yet, so that book was all I had, but it was simple enough for 8 year old me to figure out on my own from reading it.
I still remember the moment I ran into my parents bedroom to tell them I could print a line of text to the screen. That thrill hasn’t left me in over 30 years.
I'd avoid using BASIC for anything serious these days, but I'm part of the "BASIC was my first language when I was 5" club, so I have to respect it as a teaching language (although I'd go for Python nowadays).
I wonder how much of the spaghettiness BASIC is infamous for is due to the language, and how much is about the programmer's mental models -- my recent raytracer for the ZX Spectrum [0] is a pretty straightforward transliteration of my JS ones.
And those old computers (TRS-80, TI/99, Commodore 64, etc) that booted straight to a BASIC prompt were so simple to use. You turn them on, they booted in a few seconds and you were ready to start entering code. The programming environment was also the REPL and the OS shell. You were not distracted by those things being conceptually different. The need to use GOTO/GOSUB and line numbers was limiting but also made the flow of control very clear to a new programmer.
Imagine if you had that repl experience but you also had searchable documentation and tutorials right there with the ability to either view side by side or hit a function key to bring up documentation about the current symbol?
Imagine a world where ram remained constrained but GBs of flash was basically free (like now), how different computing would look.
When I learned BASIC in ca. 1981, my high school had these machines that looked like a keypunch but recorded your "cards" on a floppy disk. You handed the disk to the computer operator and got your printout back later. Terminals were installed a year later.
It meant that you got maybe a couple debug cycles per class hour at most. The lectures, and most programming and debugging, were conducted by tracing through programs on paper or the chalkboard. The simplicity of "thinking like the machine" in BASIC was valuable for this process.
Maybe not any more, now that computers are widely accessible. But I have a hunch that thinking through algorithms is still an important stepping stone towards becoming a programmer.
I kind of agree, it's an interesting observation that BASIC is actually pretty close to a simple machine if you think of the line numbers as addresses, goto as jumps and the keywords as instructions.
I dipped my toes in BASIC on the C64 when I was around 8 until I got my first PC at 10, and there I continued to play around with QBASIC (it was AWESOME for having the on-line help built into the IDE!!!), but my efforts never amounted to much, I never really got it and I never really made anything beyond tic-tac-toe and a few animations using the "screen 13" mode..
I only learned to program proper in PHP and later C, and JavaScript, then ASM, but to this day, I've never done anything substantial in BASIC, it's just too hard! But, as a language that introduces a few of the easier concepts, yeah, I kind of think it might be good..
I tried once to "bootstrap" on the C64, I wrote a text-editor, so that I could write the asm files.. That worked out okay. Then I started writing the assembler, in basic, and got it to spit out a few opcodes and it did generate executable images in the end, but it was so slow (something about how you load characters in from disk and concatenating strings made it run out of string memory right away and start spending all the time cleaning up instead).
I'm wondering what language I should introduce to my kid if he shows the interest, it might be whatever is adjacent to the game he might want to mod..
I think the Dutch invented the spicy hot take that gets the clicks, probably thousands of years ago. I enjoy the hell out of an EWD "note", but one should be cautious of cherry picking debate points out of them to use as a weapon in the tech fashion battles.
I remember when I was a small child being introduced to BASIC for the first time on what I think was an IBM 286 machine.
At the time, I had no concept of things like "functions" or "subroutines" and was writing a BASIC program where I needed to re-use the same dozen lines of code to transform a value.
I attempted to "kludge" together a block of code that you would GOTO, but I couldn't figure out how to automatically return to the next label of code, e.g.:
CLS
10 X = 32
20 RETNUMBER = 40
30 GOTO MYFUNCTION
40 REM CONTINUE HERE
<snip>
70 ARG = 64
80 RETNUMBER = 100
90 GOTO MYFUNCTION
100 REM CONTINUE HERE
<snip>
MYFUNCTION:
REM DO STUFF WITH ARG
GOTO RETNUMBER
Of course, I hit an immediate syntax error - not being allowed to pass a variable to the GOTO keyword.
As I recall I ended up implementing a bunch of IF-ELSEIF statements like this:
IF RETNUMBER = 40 THEN GOTO 40
ELSEIF RETNUMBER = 100 THEN GOTO 100
The sheer explorative value of a quick interpretive language like BASIC cannot be understated.
> The sheer explorative value of a quick interpretive language like BASIC cannot be understated.
I think that's the first time I've seen 'quick' and BASIC in the same sentence.
Gosh, yes, I, like many of my generation, started out with BASIC. No reason to impose that on the next. We don't teach slide rulers in school either anymore.
Something interactive, fairly save and not too mind wrecking would be nice. I'm no educator, but my best guess would be something like Racket.
I don't think anyone is imposing anything - if a child is having fun, there's no need to force them into any specific language or framework.
I was referring more to "quick" in the sense of quick to get started, no installation, since it was "bundled" with the vast majority of systems. And since a lot of computer is booted directly to some version of basic in the ROM, it was pretty frictionless.
Heh I don't think slide rules are a very relevant comparison - since you don't really build things with slide rules. A better analogy would be building with Legos versus building with Minecraft.
It comes down to what you want to teach as an educator, most kids are obviously going to be happier with something that's visual and interactive, whereas the teacher wants to emphasize concepts like logic and flow control. A happy medium might be something like scratch.
The first language I got good at was QuickBASIC. It's always been sad to me that BASIC has become a hobbyist only language. Even Visual BASIC has essentially been deprecated by Microsoft
The article is not about teaching at all despite the title.
The closest it comes to pedagogy is claiming (without evidence) that BASIC is how computers work instead of those other languages with useful abstractions.
> BASIC lacks some universally agreed-upon programming concepts
> if one wants to understand how computers work, I think it’s easier to start closer to the level they operate
Strangely, there's no mention of the PEEK and POKE commands if the author wants us to be lower level . . .
Variable scope, passing by name or value, are all conceptually difficult for a brand new programmer. BASIC is not a good language for writing complicated, real-world applications and games (not that it wasn't abused in that way often). But it's a simple language that works well for beginners, which is who the language was invented for.
Agreed. But, QBASIC is even better.
No need for numbered lines, no need for a book, the basic help documentation covers all you need to know to learn as a 8 yo kid.
I still remember the moment I ran into my parents bedroom to tell them I could print a line of text to the screen. That thrill hasn’t left me in over 30 years.