[HN Gopher] 30 years later, QBasic is still the best
       ___________________________________________________________________
        
       30 years later, QBasic is still the best
        
       Author : ohjeez
       Score  : 129 points
       Date   : 2020-11-28 18:32 UTC (4 hours ago)
        
 (HTM) web link (www.nicolasbize.com)
 (TXT) w3m dump (www.nicolasbize.com)
        
       | krm01 wrote:
       | The warm feeling inside when I just see the word "QBasic". Prior
       | to QBasic I was always drawing and tinkering with physical
       | objects. QBasic made me realize that computers are just an other
       | canvas. One where you aren't just a consumer but a tool that
       | allows you to contribute, create art, build useful little
       | programs and games (to play with my siblings during rainy days).
       | As a 10yo then, it felt I could conquer the world. Magical tool.
        
       | makach wrote:
       | Basic was, and still is, an excellent language for introduction
       | to programming. Yes, there are things you shouldn't do, but that
       | applies to every programming language.
       | 
       | 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.
        
         | smcameron wrote:
         | One must definitely beware of looking back with rose colored
         | glasses. A couple years ago I came across the BASIC source code
         | for Oregon Trail, and I thought, "Hmm, might be fun to convert
         | it to C." Started poking at it, and... Blargh! It was pretty
         | disgusting. I don't think the program, disgusting as it was,
         | was really unusual or bad for the time, though, and I am
         | certain I wrote similar code on my trusty TI99/4A and thought
         | it was just fine at the time. But then I was just a little kid,
         | and maybe it's just right for a kid, I don't know.
        
         | oplav wrote:
         | I agree. I forget when I first started playing around with
         | BASIC, but it helped once I got to high school and had a TI
         | graphing calculator. Those calculators have a variant called
         | TI-BASIC and I had a lot of fun coding and playing my own
         | "Guess A Random Number" game.
        
       | bhauer wrote:
       | This is great.
       | 
       | 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.
        
       | zubspace wrote:
       | I owe Basic a lot. It got me into programming on our first family
       | pc, a Compaq Presario around '94. QBasic was accessible on every
       | windows installation from the command prompt. You could read the
       | programming guide built into the editor and have your first
       | running code shortly after. That was its true power.
       | 
       | 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.
       | 
       | [1] https://youtu.be/prXuyMCgbTc?t=102
        
         | cjohansson wrote:
         | Same for me, but '93, a different computer model and I borrowed
         | a Qbasic manual from my brother who was in college
        
       | wsc981 wrote:
       | I like BASIC and recently been thinking it might be nice to do
       | some modern game dev on BASIC. My father got me into programming
       | on a TI-99/4A [0] machine, so the BASIC language always has a
       | place in my heart.
       | 
       | 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 LOVE [2] framework.
       | 
       | After previously dabbling with SpriteKit [3] and Swift I have to
       | admit LOVE 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
       | 
       | [3]: https://developer.apple.com/spritekit/
       | 
       | [4]: https://www.sublimetext.com
        
         | _ph_ wrote:
         | There is SmileBasic for the Nintendo Switch.
        
         | dleslie wrote:
         | You should check out QuickBasic: https://www.qb64.org/portal/
        
           | 29athrowaway wrote:
           | That project name is QB64. QuickBasic is from Microsoft.
        
         | T-hawk wrote:
         | +1 for the TI-99/4A, that was my introduction to computers and
         | Basic too. I spent quite some hours typing in program listings
         | from computer magazines from the library... none of which had
         | versions for the TI or ever worked in the TI's odd Basic
         | dialect.
        
       | GnarfGnarf wrote:
       | Ca. 1990 I wrote an X.25 Network Integrity and Performance System
       | (NIPS) in QBasic. It polled the PADS (Packet
       | assembler/disassembler) for statistics, and displayed traffic and
       | error conditions on the control monitor. Worked great.
        
       | therealmarv wrote:
       | I started with GW-BASIC on a PC. QBasic is so modern :D
        
         | salamanderman wrote:
         | Ditto.
        
       | mbank wrote:
       | Love it! I started out by manipulating simple games in qbasic.
       | Then switched to Visual Basic and made my first serious yet small
       | projects. In the meantime got into web design and always thought
       | I was doing something wrong when creating a UI with HTML & co -
       | so painful compared to the drag and drop UI creation in Visual
       | Studio. Same when I've learned Java: UI creation was a nightmare.
       | Sorry for going off rails...QBasic was just awesome!
        
       | Narishma wrote:
       | (2016)
        
         | Igelau wrote:
         | Really? Has something changed?
        
       | orestis wrote:
       | I ran across http://www.hedycode.com/ which is another take on
       | kid-friendly programming languages. I ran the first few examples
       | and it looked interesting - plus it runs in a browser so no
       | archeology needed :)
        
       | Frenchgeek wrote:
       | I wonder why not qb64... ( https://www.qb64.org/portal/ )
        
       | mysterydip wrote:
       | Promitive as it was, QBasic had the right mix of commands people
       | wanted (drawing, colors, music, file access), with the immediacy
       | of running and seeing where your errors were (stepping through
       | code) to make many a beginner coder motivated enough to stay with
       | it to learn and develop beyond. I'll always owe it a debt for
       | being my outlet through my middle school years.
        
       | zabzonk wrote:
       | I learned programming via BASIC (not QBASIC, on a Modular One
       | https://www.wikiwand.com/en/Computer_Technology_Limited)and I
       | agree it is a great way to learn how to write code (look at all
       | those little kids who used to dodge into WHSmiths in the UK and
       | write small, rude programs!)
       | 
       | 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!"
        
       | bori5 wrote:
       | And you can run it on your iPhone/iPad using iDOS app.
        
       | dehrmann wrote:
       | QBasic was my first language, and I don't knock it for the
       | purpose it served at the time, but for a new programmer, I'd
       | point them at either JS (if they _really_ want to do web things)
       | or Python. BASIC had its time, there are better languages now,
       | and that 's ok.
        
         | wvenable wrote:
         | Better languages sure but more difficult ones. I don't do
         | Python very often but there is a still a lot to unpack there.
         | JavaScript is in some ways easier but some ways harder.
         | 
         | 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.
        
       | jyriand wrote:
       | Ahh, QBasic, gateway drug into programming for many of us.
        
       | pjfin123 wrote:
       | Besides some Scratch early on I really got into programming in TI
       | Basic on my graphing calculator and it was pretty great. Minimal
       | learning curve to start writing useful programs, and sets you up
       | well for high level languages. That being said I would probably
       | still recommend Scratch for teaching kids to program, and Python
       | for adults.
        
       | Igelau wrote:
       | What? Lock this man up for not teaching his son Haskell first!
       | 
       | 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.
        
       | throwaway180118 wrote:
       | The post reminded me to look up a game called Black Annex, which
       | was being developed by a solo developer in QB64.
       | 
       | 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.
        
       | soferio wrote:
       | A Commodore 64 emulator on a raspberry Pi connected to the family
       | TV is what I used, with similar results. My boy was instantly
       | programming and in awe of all the magic the words could weave.
       | Boot straight into BASIC.
       | 
       | This one: https://cmaiolino.wordpress.com/
        
       | gitowiec wrote:
       | I just bought ZX Spectrum Next issue 2 on Kickstarter. When I got
       | it delivered my daughter turn 5. I think that it was good move, I
       | also started with Speccy 33 years ago. Thanks to my dad which
       | keep sitting next to me while I was trying to code I am a dev. I
       | will not set the only way (my way), if she prefer taking care of
       | animals or writing diaries I will not push her into STEM, but I
       | will try to show her that having technical job pays off
        
       | amasad wrote:
       | I wanted to make a classic BASIC interpreter for Repl.it, and as
       | I was slowly evolving it -- making line numbers optional, adding
       | labels etc -- I discovered that I was reinventing QBasic!
       | 
       | Docs: https://docs.repl.it/misc/basic
       | 
       | Source: https://repl.it/@amasad/pg-basic
        
       | blunte wrote:
       | Not to be contrarian, but Python is even simpler than Basic. You
       | don't have GOTO, but you don't need it. Just using a subset of
       | Python language you can do anything you need, and with less
       | syntactic noise.
        
         | DanBC wrote:
         | How do you draw a line on the screen in Python? Here's BASIC.
         | I'm not saying this is good. But it is easy.
         | SCREEN 13        LINE (X1, Y1) - (X2, Y2), COLOUR
        
           | dragonwriter wrote:
           | > How do you draw a line on the screen in Python?
           | 
           | Using only stdlib:                 import turtle
           | turtle.penup()       turtle.pencolor(colour)
           | turtle.setpos(x1,y1)       turtle.pendown()
           | turtle.goto(x2,y2)
        
             | ksaj wrote:
             | I am guessing that is straight-up LOGO on Python.
        
         | klelatti wrote:
         | It obviously depends on the Basic version but I think it's hard
         | to argue that Python is simpler than Basic in general (e.g. OO,
         | FP are quite complex topics for newbies) plus all the libraries
         | - it's a lot for a beginner to take in.
         | 
         | 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.
        
       | RcouF1uZ4gsC wrote:
       | The big advantage for using BASIC to teach young children is its
       | concreteness. In my experience, some kids have trouble
       | understanding nested blocks (for example in Python, why the stuff
       | in an if block is different than the surrounding code). With
       | BASIC and GOTO everything is explicit and concrete and at the
       | same level. They just have to trace though the program one line
       | at a time to understand it.
        
         | ojnabieoot wrote:
         | I also find the idea that "if you teach kids bad procedural
         | programming, they'll form bad habits and struggle with modern
         | languages" to be specious.
         | 
         | 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.
        
           | pfraze wrote:
           | Strongly agree. The constructs are easy to move past, and
           | worth the simplicity you get with the initial learning curve
        
       | ISL wrote:
       | I will never forget the day that I spent debugging an early
       | QBasic program that included a line similar to                 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.
        
         | phendrenad2 wrote:
         | Honestly it's pretty strange that assignment has a
         | directionality.
        
           | ISL wrote:
           | The primary difficulty that I had was the overloaded usage of
           | the "=" character. I had a clear mathematical understanding
           | that the "=" symbol was symmetric, that 5 = x and x = 5 were
           | equivalent. That someone could abuse that notion so brazenly
           | was the source of my frustration.
           | 
           | Some languages use directional notation for assignment (see
           | [1]):                   5 -> x
           | 
           | is clear.
           | 
           | [1] https://en.wikipedia.org/wiki/Assignment_(computer_scienc
           | e)#...
        
             | teddyh wrote:
             | Pascal and related languages use the notation
             | x := 5
             | 
             | I have heard that this was to mimic (in ASCII) the look of
             | an arrow:                 x = 5
        
             | magicalhippo wrote:
             | One of the reasons I still quite like Pascal.
        
           | sjwright wrote:
           | It has to though.
           | 
           | X = Y; // what should change?
        
             | fernmyth wrote:
             | In a declarative language, nothing.
        
               | pron wrote:
               | But computation has an _intrinsic_ directionality. If you
               | have two expressions a, and b, and you want to unify them
               | in a declarative language as a = b, then having an
               | unknown subterm in one or the other can make the
               | computation have a completely different complexity,
               | making one direction easy and the other intractable. The
               | P vs. NP problem is a famous question exactly about this
               | directionality.
               | 
               | 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.
        
             | phendrenad2 wrote:
             | Oh, I meant in the special case of something that can only
             | be an r-value on the left such, such as a constant or
             | function result. But yeah, it could still confuse newbies,
             | because the problem is not understand that it's procedural.
        
             | edejong wrote:
             | X_{t+1} = Y_t
             | 
             | Doesn't have to.
        
         | nsenifty wrote:
         | The first time I saw X = X + 1 in a ZX Spectrum basic program
         | listing, I thought it would cause the computer to catch fire.
         | 
         | I was 9 though.
        
           | benttoothpaste wrote:
           | Zx Spectrum was actually less confusing because it required
           | LET before variable assignment.
        
       ___________________________________________________________________
       (page generated 2020-11-28 23:00 UTC)