Fifty Years of BASIC
time.com
time.com
Basic has a bad rep almost everywhere in the industry because it is interpreted (yes there are compiled variants), case-insensitive, optional brackets and doesn't lend itself to structured programming very well. But ask any talented developer in his 30-40:s (yes we were almost all men!) how he got started? Basic! QBasic, Commodore Basic, Amiga Basic (and Amos) etc.
Here is how you put a white pixel on the center of the screen in qbasic:
SCREEN 13h
PUTPIXEL 160, 100, 15
That's how easy it was and what got me hooked and I still remember it by heart over 20 years later. I feel sorry for the kids starting out today with Java, C# even Python and Ruby requires more knowledge to get stuff done than what qbasic did. And you have to know about them and their packages, while qbasic came with everything you needed preinstalled with the computer. Computer programming is unquestionably much less beginner friendly today than it was two decades ago.And no, Javascript isn't the answer.
I still remember it as one of the most user friendly environments by far.
I know that you don't generally have access to the whole machine like we do with something like Commodore basic, but at the same time it has a very low barrier to doing stuff and has a console in most browsers... at least to me it seems like a reasonable comparison.
And that's just the language. QBasic was available pre-installed on all pc:s, came with syntax highlighting, context sensitive editing, and a very good help system. If you pressed F1 on any Basic command it would show you complete help for it along with a full example. The good examples was important because I was using QBasic before I was good at English.
A friend of mine has been volunteering to teach kids using Javascript. He doesn't have much good to say about it. I think the control constructs and syntax were the hardest part iirc.
10 PRINT "HELLO"
20 GOTO 10
Is conceptually easier to understand than: for(;;) {
console.log("HELLO");
}
Actually don't type that into your Firefox if that's what you use. It'll just crash. I'm not even sure what Javascript does for looping but I'm sure it's weird.Things have improved since then but the experience of programming has become something programmers do. There was a paucity of software back then and from my rose-tinted, 20-20 hindsight I think I only started programming when I was a kid because that was what you did with a computer. There wasn't a distinction or any special software to install. It's hard to explain.
From an imperative programming point of view, it does "leak" the fact that the universe is running at toplevel and pulling updates from your program, rather than sitting there passively and being written to. I was thinking of things more in terms of where a canvas lies on gui/output stream split - an imperative program can simply emit text, audio, network packets, etc, and trust that there is a universe out there to act on them, and of course if you have a gui you know that there are reactive components with two-way interactions that you have to monitor in some sort of event loop. But despite being conceptually one-way, a graphics canvas needs to run in an update loop more akin to a gui than to an output stream. I miss the days of single-application computing where the running application could say "print 'hello world'" and hello world would appear at the text cursor, or "line 0, 0, 100, 100" and a line would appear on the display in an entirely analogous manner. It made graphics something you just did, rather than having to structure your program around.
On the positive side, the big bang model works out a lot better for games, sprite-based stuff, and anything that wants live objects on a vector canvas. The microcomputer model was nice in its day but I guess it doesn't really reflect the way computers work any more :)
You're right! Lua is the answer. And so is LuaJIT! :)
Sounds like the project deadline was May 1st. Glad software engineering hasn't changed much in 50 years.
Applesoft BASIC (Apple ][e) -> Level I BASIC on TRS-80 -> FutureBASIC (Mac 68k)
Those are the BASICs I learned before moving on to Java, C#, then JavaScript.
FutureBASIC was really ahead of its time. You could drop into assembly, make direct system calls, didn't need line numbers, it supported proper functions, and it was event-based and somewhat asynchronous. For ~$300 it was a pretty big deal for Mac users at the time. I think MPW was still several thousand dollars and open source compilers were largely unavailable.
But you had to have line numbers and this caused me a bit of a headache when I got to learn Pascal. Things just seemed to be floating around. Which is funny, because Perl is now my weapon of choice.
There's a very good emulator of my original computer available online: http://compucolor.org/emu/ccemu.html
It boots you straight into the BASIC REPL. There are still games that I can write from memory for that thing :D
It's virtual machines and garbage collection that are the stuff of today...and of course yesterday as well. But the reason for their popularity is that a quest for 7ever more sophisticated abstractions is the impetus behind most programming languages. It's
39 -> JMP -> GOTO
that gets us multiple dispatch. None of which is to say that languages with REPL's or even only with REPL's [aka interpreters] aren't a great tool for learning...better than IDE's in my opinion...then again so are text editors, but that's a story for another day.Are you me?
I loved FutureBASIC. It could actually access GWorlds and QuickDraw so I could write games that had fast double-buffered graphics. I eventually switched to C for performance, but I got a ton of mileage out of FutureBASIC (and PGPro!) before I did.
Whats changed since then, is more than just the syntax of if/then statements.
GOTO
automatic / implicit strong typing of variables (and believe it or not, a FORTRAN "feature" to change how the automatic name based typing operated resulting in eternal confusion from that day onward)
Intermediate code (tokenized basic, pascal P-system, JVM). And unlike the p-system or JVM, virtually every tokenized basic was incompatible with every other tokenized basic.
Line oriented program editing and its companion, the line number. I think the concept of a line number might freak out modern noobs more than the concept of line oriented editing, hard to say.
To some extent, backward compatibility is seen less and less as a feature as time goes on.
Your computer powers up and boots in less than a second to a REPL for BASIC.
Numeric / non-humane usernames
Direct access to hardware with no "OS" in the way
Just a couple of lines and I could get colourful graphics, and interesting sounds. It grabbed my attention very easily as a kid.
If I had to jump through all the hoops you have to today, there's a good chance I wouldn't have got into programming.
ZX Spectrum 48K BASIC back in 1986.
For me, it was GW-BASIC on an XT clone around 1986 as well.
What blew my mind shortly after getting my hands on a ZX Spectrum was to find out that most computers of the time (Dragon, Oric, Apple, Commodore, etc) had significantly different versions of BASIC.
The next thing that blew my mind was to learn that editing computer programs could be done full screen instead of line by line and that, in fact, most programming environments did not use line numbers except as visual aids.
Also had the joy of VB 1.0 for work http://en.wikipedia.org/wiki/Visual_Basic#History
http://www.pagetable.com/?p=46 has lots of the gory details
Me and my dad soldered RAM piggyback to make the computer 64k.
And I almost immediately moved to hand-assembling 6809 code via BASIC pokes. Wrote a whole music synthesizer that way. I still miss those days.
Solving physics problems while my colleagues were still writing the problem.
Still remember seeing the 16KB upgrade cartridge for what would be 100€ nowadays!!
I'm have a FX-9850. They launched a similar version to those old ones, clamshell style [1].
[1] http://www.amazon.com/Casio-fx-9860G-Slim-Graphing-Calculato...
I still have this machine, and its still being used (by my kids).
The old 8-bit machine is the only system in the house that I can reliably leave my two boys with, knowing they won't get up to any mischief (no Internet!) and which they can fully control, themselves.
I'm constantly having the thought that its sort of a travesty that 8-bit, low-power machines like this are out of style - they're still highly useful machines. And I'm pretty sure my kids will know how to push pixels before most of the other kids in their social group even get their first XBox ..
http://geoffg.net/maximite.html
> The Colour Maximite is a small and versatile single chip computer running a full featured BASIC interpreter with 128K of working memory and eight colours on a VGA monitor. It will work with a standard PC keyboard and because the Maximite has its own built in SD memory card and BASIC language you need nothing more to start writing and running BASIC programs.
http://github.com/antirez/load81
Really wonderful toy!
If I am not mistaken, QB64 is just a plain command line compiler, from what I could find.
Hence my remark.
it started out as BASIC/Z, the first interactive compiler for CP/M and MDOS. It was then extended MS-DOS/PC-DOS and was then published in 1987 as Turbo BASIC by Borland. When Borland discontinued it - the Author, Bob Zale, re-released it as PowerBasic.
A very modern compiler with extremely similar syntax to QB (at least in the text-mode version). Comes in a Windows version as well.
Both compilers are written in assembly. No runtime. Extremely small, fast executables. Supports inline assembly (mix BASIC and assembler in the same procedure). Windows version creates stand-alone executables or DLLs. Supports user-defined marcros. Regular Expressions. Supports both OOP and procedural style programming. Too many features to list here. Complete manuals available for free on their site (powerbasic.com)
This would be a good BASIC to start a kid off with.
Check out the forums. Especially the source code forum. There are some very talented people there.
Not free but very reasonably priced compared to MS products.