I got my start with computer programming when I was very young. I remember it as being when I was 12, but it could have been even earlier. My dad worked as a geologist for the Provincial Survey, and on occasion I'd find myself in his office, whether it was a "Take Your Kid To Work" day or a day without school that my parents had to figure out. I was fascinated by computers, and this office had lots of them. They were used for word processing and spreadsheets but also for tabulating, analyzing and graphing data about mineral deposits based on thousands of samples that people like my dad would collect on annual expeditions. Every summer, my dad would disappear for 1-2 months, trudging through undeveloped wilderness in northern Manitoba looking for rock outcroppings to sample. In our family, we called it "going up north".
So there I was in an office full of computers, an inquisitive child fascinated by these machines. I mean, I loved computers. I didn't know a great deal about them, but I did know more than any of my peers, simply because I was so interested. In my dad's office, I wanted to play with the computers, to explore. The people working in the office did ... not want me to explore with their machines and their important work data. So, I was given at first books, and the only computer-related books were reference manuals. I loved computers so much that I chewed through these with gusto, learning obscure facts about their HP laser printers that probably their IT people didn't even know. Eventually, the head IT guy there plopped me in front of a terminal running BASICA.
This was the start of everything. I typed commands and they did things, and the commands were structured. They could do complex things. I found magazines of BASIC code. I would type dozens or hundreds of lines of TRS-80 basic into BASICA. Sometimes things wouldn't work, because the TRS-80 speaks a slightly different dialect, but I learned how to translate things. If the magazine said "SET(x, y)", then for some reason BASICA needed "PSET (x, y)", and so on.
Then I discovered QBASIC.EXE sitting there innocently in C:\DOS. This was a game changer in so many ways. One thing I have a distinct memory of is the fact that in BASICA, if you enter lines 10 and 20, and then you realize you missed something, you can enter line 15, and when you run the program, it runs line 10, then 15, then 20. But, if you put line 15 after line 20 in QBASIC, then it runs after line 20. The line numbers aren't a part of the structure of the program, just labels for GOTO and GOSUB. This is just one of many ways in which QBASIC is different from its predecessors like BASICA.
I don't recall how or when it happened, but at some point I became aware of something called QuickBASIC. QBASIC? QuickBASIC? QuickBASIC looked a lot like QBASIC, and almost everything worked exactly the same way, but there were a few minor differences in functionality, and one major difference: QuickBASIC is fast. Write a program to generate a Chaos Game fractal, for instance, and in QBASIC, you watch the dots slowly pile in like a sort of crude fade effect. Load that same program up in QuickBASIC, and the fractal just appears, instantly. Crazy!
I worked with QuickBASIC 4.5 for years, and then later found QuickBASIC 7.1 (part of the "PDS" -- Professional Development System) which was even better, and it cannot be overstated how formational this was to me. It created a deep analytical understanding of source code and laid the foundations for the programmer I am today.
I eventually aged out of QuickBASIC. I was introduced to Turbo Pascal, and then later learned Java, C, C++. But, QuickBASIC was always there, often remembered. It holds a special place.
Over the years, I often thought about how QuickBASIC couldn't easily be used on modern systems. You can actually emulate it fairly easily with tools like DOSBox-X or even emulate entire DOS systems end-to-end with virtualizers like VirtualBox. But I kept having a recurring crazy thought: Could I write my own QuickBASIC?
Well, I used to spend a lot of time on an Internet chat system called IRC. I found a community of other people who were enthusiastic about QBASIC, and we were pretty tight-knit for many years. I recently discovered that one of my old friends from that group was working on a project in a similar vein: He created a Windows 3.1 system emulator that runs in a web browser, and one of the icons you can double-click on is marked "QBASIC". The resulting simulated program looks and feels a lot like QBASIC does, and it runs QBASIC code well enough that NIBBLES.BAS and GORILLA.BAS, classic samples provided with DOS, are playable. It's really cool! (You can check it out webqb.org.)
..but it isn't perfect. The cursor isn't quite right, the code interpreter makes mistakes here and there. It pressed the right buttons and has kicked something off. I am going to make my own QuickBASIC environment emulator. My goal is for it to be so similar you could, at times, forget that you weren't using the real QuickBASIC.
We'll see how it goes!
No comments:
Post a Comment