I'm James Hague, a recovering programmer who has been designing video games since the 1980s. This is Why You Spent All that Time Learning to Program and The Pure Tech Side is the Dark Side are good places to start.
Where are the comments?
Lost Lessons from 8-Bit BASICUnstructured programming with
GOTOis the stuff of legend, as are calling subroutines by line number--
GOSUB 1000--and setting global variables as a mechanism for passing parameters.
The little language that fueled the home computer revolution has been long buried beneath an avalanche of derision, or at least disregarded as a relic from primitive times. That's too bad, because while the language itself has serious shortcomings, the overall 8-bit BASIC experience has high points that are worth remembering.
It's hard to separate the language and the computers it ran it on; flipping the power switch, even without a disk drive attached, resulted in a BASIC prompt. If nothing else, it could be treated as a calculator:
Or take advantage of this being a full programming language:
There's a small detail that I skipped over: entering a multi-line program on a computer in a department store. Without starting an external editor. Without creating a file to be later loaded into the BASIC interpreter (which wasn't possible without a floppy drive).
Here's the secret. Take any line of statements that would normally get executed after pressing return:
Lines are syntax checked as entered. Well, each line is parsed and tokenized so that previous example turns into this:
All of this, from the always-available functions, to being able to develop programs without external tools, to code stored as pre-parsed tokens, made BASIC not just a language but a development system. Compare that to most of today's compilers which feed on self-contained files of code. Sometimes there's a run-eval-print loop so there's interactivity, but editing real programs happens elsewhere. And then there are what have come to be known as Integrated Development Environments which tie together file-oriented compilers with text editors and sometimes interactive command lines, but now they get derided for reasons that BASIC didn't: for being bulky and cumbersome.
Did I mention that Atari BASIC was contained in an eight kilobyte ROM cartridge?
How did IDEs go so wrong?
(If you liked this you might enjoy Stumbling Into the Cold Expanse of Real Programming.)