30 years later, QBasic is still the best
nicolasbize.com
nicolasbize.com
I was introduced to Computers — as theories in school classes in the summer of 1992. By winter of 1993, my school got computers and I spent a lot of my time there, including many practices during the holidays.
I spend extra effort to learn things that were not taught in the school. I learnt QBasic and started writing tiny programs. My own trick was to use Graph Papers to match co-ordinates to plan game programs. One of them was a game where shapes are draw on the screen and you shoot it with an arrow. You have to hit spots on the shapes to do something - explode, write out names, etc.
I asked one of the girls to try it. She did and finally shoots a “heart” symbol and it burst with her name. I think I coded many things manually to make that happen and not very “programmatic”.
She became my first Girlfriend and we were for about a year. After that, we got drifted apart as we went to different schools in different states. No email, no phone.
https://en.wikipedia.org/wiki/History_of_Facebook#FaceMash
>They "trust me", Dumb fucks
Yes, graph papers! I had an XT with a monochrome Hercules monitor, while in the factory where my father used to work there was a full blown 486SX. Envious of the plethora of the available fonts, I magnified the letters of the System [0] font with Paint, transferred them to a graph paper and took them home. Then for each character I wrote a separate (Turbo)Basic subroutine which would draw it in graphical mode exactly as it was on the paper. Finally I assembled these routines into an elementary editor. Nostalgia, yeah.
However, I recently also came across a nice game development course from Harvard, CS-50 [1] (an excellent course, much recommended!). And for CS-50 the Lua language is used in combination with the LÖVE [2] framework.
After previously dabbling with SpriteKit [3] and Swift I have to admit LÖVE has been extremely pleasurable and fun to use. It's really nice to get some quick results. And you can easily build for multiple platforms (iOS, macOS, Windows, Android, ...)
I also love that I'm able to develop just using SublimeText [4], a very lightweight editor and pretty serviceable for doing Lua dev ... no IDE required, just like BASIC.
It's a nice change of pace from the normal heavy-handed Xamarin (C#) / Xcode (Swift/Objective-C) dev that I do in my day-to-day work, making "boring" business apps.
---
[0]: https://en.wikipedia.org/wiki/Texas_Instruments_TI-99/4A
[1]: https://cs50.harvard.edu/games/2018/
[2]: https://love2d.org
It's amazing how many people love ToD. There's even a Youtube video of a guy playing the theme music on a music box: https://www.youtube.com/watch?v=euMH2fCERAc
I'm currently working on trying to get it to run in MAME. I have a TI-99/4A successfully booting to BASIC, but I haven't got ToD itself to boot yet.
---
I remember how I spent one Christmas plotting a Christmas Tree scene with the gifts and everything on millimeter paper and then transferring and animating all that to QB in SCREEN 11 (640x480) graphics mode. My parents weren’t that impressed, but I was so proud of myself.
I envy that kid sometimes.
One of my first programs was teaching me french words, asking me to translate them in a random order until I got them all right. It was truly magical.
I also made pixels move, trying to write games, but I quickly ran into limitations and problems organizing my code. If you like a small challenge, watch a few minutes of this video about a game called Noita, where in the beginning Q-Basic was used to create some simple physic simulations [1].
It was hacky yes, but I think if you're starting out, it's much more important to get something running quickly than learning how to do it the right way. When people speak of basic, they always seem to have the impression that you're spoiled for life after touching it, but I think that's wrong. You can always learn more and improve. It's breaking down barriers of entry, which is key. A simple editor, with an inbuilt help page and a run button is all you need.
Docs: https://docs.repl.it/misc/basic
Source: https://repl.it/@amasad/pg-basic
I called that "visual basic" even though it is nowhere near the same thing!
https://github.com/skx/gobasic
I had way more fun than I expected tinkering with it though, made me very nostalgic for the ZX Spectrum which was my first computer.
There is nothing quite so simple, pure and fun as the older programming languages. Everything is a little bit bloated today - but it is infinitely much better when done right than you could ever do with these old languages.
for introduction, kudos! just mastering the branch/loop/return you have learned the basics of all programming.
This one: https://cmaiolino.wordpress.com/
But there’s definitely magic to Basic, from a sheet of paper with line numbered, easy to understand (closest to language), instructions you can copy into a simple ide, to immediate results. There’s no entry barrier.
Such a nice story to read, thanks op.
Funny I ended up developing LOB apps instead of games because eventually my interests led to databases and dynamic apps.
I guess if tools like unity or real engine existed back then I might have been a games developer. Maybe. Now i still play around with unity but not as much as i want to because of several side projects.
Just the random number generator was no so good.
SCREEN 12
DO
x = RND * 640
y = RND * 480
c = RND * 16
r = RND
PSET = (x,y),c
LOOP
enjoy :-)QBasic wasn't pre-Internet (I had access to the internet before it was released.)
QBasic was pre-web, by three years, though.
I miss those days...
Later he started learning C++ to write more advanced programs, and although he did create some programs, I could see the complexity putting him off. Just the knowledge that that was the real programming, and that he was not enjoying it any more discouraged him, and he stopped coding altogether. It makes me sad. I wish he could have stuck with Basic and just created more cool stuff with it. There definitely is just something so cognitively easy about QBasic.
5 = x
for an assignment in the first draft. There were tears and deep frustration at the moment I discovered that assignment had a directionality. The author's story brings back so many memories of learning and growth.For those too young to know -- magazines used to come with page-long Basic programs for games that you could type in, debug (there were always typos), and play.
X = Y; // what should change?
Doesn’t have to.
Here's a simple example (in a declarative language that allows non-terminating computation; in a total language similar examples can be given, except "impossible" means intractable rather than non-computable, which, for all intents and purposes is the same):
X = terminates?(P(1))
If X is known then finding a P is easy; if vice-versa, finding X is possibly impossible.Some languages use directional notation for assignment (see [1]):
5 -> x
is clear.[1] https://en.wikipedia.org/wiki/Assignment_(computer_science)#...
x := 5
I have heard that this was to mimic (in ASCII) the look of an arrow: x ⇐ 5 x <= 5
But of course, that means “less than or equal to”.You could do:
x <- 5
But I suppose the mere presence of the “less than” symbol is weird in context. (Although, maybe not inherently weirder than using the equals sign for something other than equality?)Perhaps we would have been better off if we’d all just agreed early on, that @, #, or ~ should represent assignment.
set x to 5I was 9 though.
Star Trek taught at least a couple generations that if you pressed the wrong key or programmed in something illogical the keyboard would burst into flames and throw you across the room.
The next few years would be an escalating arms race among friends for who could make the coolest game, culminating with an extremely slow ray traced 3D shooter
I became pretty good at programming, but having matriculated into college in the early 2000s when software engineering was somewhat unpopular, I'm a physicist now. When my son gets a bit older QBasic might not be a bad starter language
I grew up with BASIC (Q and TI), then learned a small amount of MATLAB as a physics student. When I took a class in Scheme later in college, I was blown away by how its syntactical constructs prevented me from making the kinds of errors that plagued my imperative/procedural programs - at the cost of some cognitive overhead.
Cutting my teeth with GOTO didn’t make me resistant to structured (or functional) programming, it gave me perspective on why it’s often necessary.
The appeal for me was to give, as you wrote, a simple interface to programming. The Apple RAM II I had was not as easily accessible for programming at my single digit age. QBasic was available on the 486 SX based MS-DOS OS we had, and it opened my eyes. Within a year or two I was reading Herb Schildt' "Teach Yourself C" and using Borland C for the first time. But at a young age you need that first step to be accessible!
Nice one...
The computer is called Colour Maximite 2 and has a small but devoted community that’s constantly improving the platform.
You can purchase CMM2 from a handful of vendors or make your own.
I highly recommend one for a kid that is starting to dabble with programming.
Kind of a homepage:
https://geoffg.net/maximite.html
8 bit guy review:
Being able to start with any tablet was great for that group.
A previous post: https://news.ycombinator.com/item?id=17164068
https://store.steampowered.com/app/248590/Black_Annex/
https://www.pcworld.com/article/2033318/black-annex-is-the-b...
https://www.youtube.com/watch?v=ZqlveWIhCFI
Lance, if you see this thread - I hope you find the passion to continue this project. What you built so far was an incredible feat.
I learned on Basic XE on an Atari XE, then GFA Basic (2, 3, and 3.5) on an ST. I still find reading Basic code to be considerably easier than most other "starter" languages. GFA was remarkable for its time, with its compiled code executing with performance rivaling some of the C compilers on the ST.
I jest. People take the whole "imperative bad!" thing a little too far. I have fond memories of QBasic and certainly cut my teeth on it as a child. I did more TI-Basic on my graphing calculator since I could do that on the school bus. It can't have been too hazardous for my development since I independently rediscovered the idea of the "game loop" in my meddling.
Now TRS-80 BASIC? Or Delphi? PowerBuilder? Or - wait for it - LotusScript? Now there's some languages to celebrate! (Joking, of course). I used all of them, the latter ones to make a living at one point or another.
VB costed money, Qbasic came free with the operating system. There was an active QB scene well into the late 2000s owing to the fact that many poorer families would buy secondhand equipment that had Qbasic on it totally free.
> it seems almost like a niche group of people who in the 90s were still using DOS a lot.
It wasn't really a niche group that was still using a DOS a lot before about Win95; Win 3.1 was separate add-on on top of DOS, and lots of important software still targeted DOS exclusively or had separate DOS and Windows versions.
But the thing that always pissed me off was that it did not support proper functions (one-liners, yes) to the extent that I wrote a preprocessor in BASIC that did support them (rather badly).
One thing I have always stressed to the many people I have taught is "Write functions, write lots of functions, you cannot write too many functions!"
If you get the logic part of programming, you can pick up the more complex aspects.
I also notice that, "I did [x] and ended up fine" doesn't seem to consider the possibility of ending up better than fine without doing [x]. Still, I greet these arguments with suspicion and find them somewhat self-destructing.
The whole "don't use GOTO!" thing is really something that started cropping up when we started to get C and Pascal compilers, and it became something not as good to use. Before them, it was BASIC all the way baby, and we used GOTO because it worked for what we had.
It's a good starting point and it won't force bad habits on you. It's really too bad that Microsoft never managed to make VB.Net anywhere near as clean as QBasic/QuickBasic or the DOS version of VisualBasic.
QBASIC is on a whole different level.
When my daughter was little, I taught her how to program using Visual Basic longer after it was obsolete. But getting a window on screen and interacting with it is 100x easier there than with Python.
Both do not offer a nice IDE out of the box though.
SCREEN 13
LINE (X1, Y1) - (X2, Y2), COLOURUsing only stdlib:
import turtle
turtle.penup()
turtle.pencolor(colour)
turtle.setpos(x1,y1)
turtle.pendown()
turtle.goto(x2,y2)This video from Mathologer about solving polynomial equations might be just as easy to implement in Python with that library as it would be under NetLogo (a more multi-dimensional science-oriented implementation of Logo), which certainly justifies having a turtle library to begin with: https://www.youtube.com/watch?v=IUC-8P0zXe8
I'd hate to program that under BASIC.
I do think that there is an interesting point around whether you could usefully define a subset of (say) Python as a better first language. I've not seen anyone do that but seems like might be worth trying.
1. BASIC was typically either built-in, or accessible via a single command from the disks that came with the computer. Beginners often get lost trying to install Python. If three beginners independently google "install Python" and follow the first blog that comes up, they will get three mutually incompatible installations.
2. The BASIC interpreters were self contained -- you learned a small number of keywords, and everything else had to be composed from them. Python is huge, and some of its keywords are conceptually brutal for beginners. And that's before you introduce even a few of the familiar packages.
3. Look at the official list of Python keywords. Half of them describe concepts that are brutal for beginners.
I'm not saying progress is a bad thing. The Python ecosystem can be bigger today because code is so easy to transport. It needs to be bigger because more complex programs need that stuff to have a chance of working. But teaching Python involves a dilemma that didn't really have to be considered for BASIC: What small subset of this thing do we try to teach?
We end up with a subset that looks like BASIC, and we simply tell them how to install it so they have a reliable starting point.
QBASIC has 60+ keywords, Python 3 has 35.
> Look at the official list of Python keywords. Half of them describe concepts that are brutal for beginners.
Here's the list:
False await else import pass None break except in raise True class finally is return and continue for lambda try as def from nonlocal while assert del global not with async elif if or yield
Which of them do you think “concern concepts that are brutal for beginners”? (I could maybe buy async, await, and yield.)
OTOH, QBASIC’s BLOAD, BSAVE, PEEK, POKE, and CALL ABSOLUTE, among others aren’t particularly dealing with beginner-friendly concepts.
Those two languages make easy things simple. Basic does too, but with a not more noise ($).
You also don't need top install any language these days if you just want to learn. There are web based environments like repl.it where you can learn and practice basics.
Okay, I'll bite. How does one check for keyboard input without blocking in Python?
And remember, you said "simpler" and "subset", so do your best to avoid imports.