Thirty years later, QBasic is still the best



My oldest son Noah turned seven years old three months ago. If he could trade his entire family for two hours of playing Minecraft, he would have done it without hesitation. Another love of his life is Super Mario Maker. I got goosebumps when I saw him play the levels that I went through at his age. About five months ago, I left my family for the annual pilgrimage to ludum dare: a game developer competition, during which we lock ourselves in an apartment with friends, return to the caveman state, stay awake for 48 hours and create a finished game from scratch. When I proudly demonstrated my revolutionary AAA game to my wife, Noah naturally became interested. Therefore, I introduced him to the world of code, showed him how you can create a real game from simple words (he just learned to read). Since that day, Noah has constantly asked me to teach me how to make my own video games. And for the next five months, I searched for the Holy Grail of language / IDE for kids, hoping to turn that spark of interest into a memorable experience ...



My searches have led me to endless forums, through which I have tried countless recommended languages ​​and platforms: SmallBasic, Pico-8, Smalltalk, Scratch, etc. I've even asked the great StackOverflow oracles questions, but to no avail. Five months later, I came to a disappointing conclusion: nothing is even close to what I had in my years. 30 years later, QBasic is still the best language for newbies in programming.



"God, please don't teach him how to use GOTO!"


10 PRINT " ,    ?!”
20 GOTO 10






Yes, QBasic is a terrible procedural language. It introduces a concept that is considered harmful by most, uses an inconvenient syntax for implicit declarations, it is not case sensitive, the indexes in it do not start from zero, and so on, the list is endless ... When developing a skill, it is much better to develop the right reflexes from the very beginning than to correct years of wrong practice. Following this advice, I should probably start with the basics of the Ruby language that I love. Nevertheless, although most of these concepts are considered by most QBasic "red flags", at the time they had a purpose: to keep the language simple and accessible; this principle was abandoned by all other languages ​​in favor of flexibility, complexity and logic.



Today I installed QBasic on my son's 11-inch HP Stream, the installation had to be done manually via DOSBox. He double-clicked on the desktop icon and a split second later we saw the IDE greeted us with an introductory screen that brought back a bunch of memories to me:





Then I told Noah that there is a sacred ritual that everyone in the secret circle of programmers must have: to start learning with a program that welcomes all programmers in the world. As I dictated the formula, he slowly searched for each key, carefully typing the magic words with his right hand: PRINT "hello world"







He pressed F5 and was amazed to see how his code was copied into text displayed on a black screen. He smiled, gave me five, and then wrote down the code in his little notebook for future reference.





We learned a couple more commands: CLS, COLOR, PLAY, INPUT and IF. Nothing needed to be explained: no complexity, no awkward operators, no abstract concepts, no documentation to learn, no object / class / method concepts, no frameworks required to install, no tons of menus and buttons in the IDE, no special keywords or brackets. It was code in all its purest simplicity and form.



Less than an hour later, he wrote his own program - an interactive and incredibly sophisticated application that tells you what the computer thinks of you:





... which Noah proudly launched for his cousin and best friend Christian:





... then he easily explained how it works and what the code does!





That is, in just one hour, my seven-year-old son was not only able to write his first text game, but also felt the pleasure and thrill that arise when creating, compiling and running his own program. Extra points for fitting on one notebook page:





I was so glad that he understood why I constantly say that I have the best job in the world.



The only thing I regret now is that for more than thirty years we have not been able to come up with something better for children: Qbasic has a limited set of simple keywords (all help fits on one screen called by F1, and supplemented with simple examples!), does not distract the coder with visual artifacts, has a very compact and comfortable development environment, immediately indicates errors, compiles and executes the code in a split second by pressing one key, and is also extremely simple. We've built more robust and complex languages ​​/ frameworks / IDEs (which are essential for any practical application, of course), but we've never come up with an easier way to get direct access to the fun of programming than QBasic. Even launching QBasic today has become a daunting task for newbies.running on a modern Mac / PC / Linux machine, although previously it was enough to simply insert a 3.5-inch floppy disk into the A: \ ...



But, by the way, enough sermons, today we need to celebrate the acquaintance of another person with the joys and beauty of programming!



Hooray!






Advertising



Our company offers modern servers for rent for any project. Create your own tariff plan in a couple of clicks, the maximum configuration breaks records - 128 CPU cores, 512 GB RAM, 4000 GB NVMe!



Join our Telegram chat .






All Articles