Live data from Hacker News

30 years later, QBasic is still the best

nicolasbize.com

131–140 of 308 posts

Re: 30 years later, QBasic is still the best

#131
post #81

Earlier quoted context omitted.

Is it simple to draw a line in JS? Like in one line of simple and straight code, yes? I mean, not adding some divs to some DOM, but actually drawing a line or circle. Drawing is simplifying things for kids.

It's not one line of javascript, but drawing a line with an html5 canvas is fairly straightforward. https://jsfiddle.net/4cwmcagp/

If I was going to start a child on coding javascript, I would probably do this or codepen rather than a full fledged text editor, ide, or browser built-in console. Move them to the console once they're comfortable and teach them how to use the debugger.

Re: 30 years later, QBasic is still the best

#132

Earlier quoted context omitted.

I think Scratch is the wrong approach to teaching programming altogether. It's cute but it doesn't give the same thrill as turning text into action.

I think the "thrill of turning text into action" might be an adult sentiment. I wouldn't write this off. I decided I wanted to learn to "program" when I was 8, but I had no mentors, and no adults I knew could tell me how programs were made. I found QBasic lurking in the C drive, and got some books from the library, but without anyone to help my 8 year old brain couldn't get far alone. I got it to switch resolutions a…

Don't get me wrong, I think that any environment aimed at children needs to be highly visual. One of the most common environments for teaching programming to kids used to be Logo. But it was still 'type commands' => 'produce visuals' and I think there is value in that. A lot of Logo wasn't even producing programs but seeing what crazy affects you could get through one line of "code".

Almost almost all modern programming environments, including JavaScript in the browser, require a lot of work to produce a simple visual.

However, Scratch feels like it does too much and becomes more like solving puzzles rather than creation.

Re: 30 years later, QBasic is still the best

#133

Earlier quoted context omitted.

The basic issue is that Python do not have a UI lib of its own, so if you want to do anything beyond a CLI you need to introduce a third party.

https://docs.python.org/2/library/turtle.html Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import turtle >>> turtle.forward(100)

Bingo. Teaching kids programming is exactly what turtle is meant for.

Re: 30 years later, QBasic is still the best

#134

Try to teach your kids programming this way, and you are more than likely only going to turn them off programming for many years. There is actual research on teaching kids how to code. Personally, I would start with code.org or Scratch. If you have an ipad, there is Hopscotch. Here is a huge list of more tools to teach young kids programming: http://bit.ly/ortonacode But if you start with basic or python, you'll be t…

Boring puzzles? The very original article showed what kind of programs the kid made. Far from boring puzzle.

When I was 8-9 I started with QBasic with the first program being pretty much identical as what the kid in the article did. Then we did text adventures with friends. They were simply awesome back then. Then we moved to graphics as we figured out how to draw lines etc. Animation was beyond us but managing to draw something was brilliant.

Around 12 it was C and games by using Allegro, and getting into slight trouble due to the nature of them. But it would not have been possible without first learning the basic stuff in QBasic (Oh the amount of IF blocks was ridiculous in some of the games).

Re: 30 years later, QBasic is still the best

#135

Earlier quoted context omitted.

Aren't you confusing QBasic with some older BASICs? QBasic is a structured language. It has blocks, functions, different kinds of loops, custom types... It doesn't require gotos or line numbers, though it supports them for backwards compatibility.

Yes, but it does not have closures, which are somewhat further removed from the bare metal. All the constructs you mentioned have an almost trivial mapping to assembly language.

The lack of anything like a pointer or reference type is more significant. That and pointers to code would go a LONG way to adding useful expressive power to the language. As things stand right now, there's really no way at all to abstract control flow, which makes a number of useful programming styles very difficult to implement, if not impossible.

For reference, the Microsoft BASIC 7.0 implementation contained about the only implementation of a GUI (text mode) framework that did not use pointers to functions. The result was something that worked, but had immense amounts of repeated complexity and boilerplate code.

Re: 30 years later, QBasic is still the best

#136
I think kids should not be actively encouraged to learn to code early.

You can learn to code any time, when you are older. As far as I can see, there is no advantage in learning to code early.

But there are skills you need to pick up, and experience that you can only have when you are a kid. Let us encourage to kids to do those stuff..

Re: 30 years later, QBasic is still the best

#137
I have so many fond memories of QBasic, and QuickBasic.

Coming from GWBasic, I knew it was not supposed to be the best language ever. I had been using Turbo Pascal, and knew the IDE to be great, and the language more structured. I was also using C, and knew it to be fast.

But QBasic was better where it mattered to me.

When I learned to tame it - to name things accordingly (variable names could have dots!), to not use line numbers or GOTOs, it was so easy and fun doing anything in it.

I could press F2 to jump to any function/method declaration I needed. I could press F1 on any method to quickly jump to its declaration/help, and then navigate help in the same manner (it was all hyperlinked!).

I could stop my program in the middle of the execution so I could issue inline commands, print vars, and even CHANGE it, before continuing execution... even today, with proper debugging/logging any modern IDE/platform provides, I never got a dev/test workflow as easy as that quick iteration cycle that QBasic allowed.

In time I started using QuickBasic instead (not the same thing!), learned to call interruptions, create actual executables, and do all kinds of crazy stuff most people were not supposed to do from there. Sure, running assembly from it wasn't as easy as Turbo Pascal (where you could do it inline) but as long as you had a library of common assembly calls created, it was just a matter of reusing it.

The language wasn't fast, and the compiled files were a bit bloated. In time I moved to something else. But I still miss the intimacy I had with the editor and the language. It's like a first love, the one that got away.

Re: 30 years later, QBasic is still the best

#138
post #112

Earlier quoted context omitted.

I think you might be onto something. For my oldest son I tried to help him along in python. Just poking about in the interpreter went great, but pygame overwhelmed him and when his laptop died he never picked-up again where he left-off. For my youngest son I introduced him to awk first. In an editor he would edit the script and then run it in the terminal. I explained how every line goes in order. At first his script…

You are teaching him awk? Are you trying to create a supervillain?

Well, it could be worse, (s)he could be teaching him REBOL/SPITBOL - and then he'd be disappointed by all new programming languages he encounter later in life...

Re: 30 years later, QBasic is still the best

#139
I think TI-BASIC is a strong competitor. A free-form keyboard can be overwhelming and the different things you can do aren't very discoverable. In the TI-BASIC environment on the TI-82/83/83+/84+, the keywords (Goto, While, Disp, ClrHome, etc) are tokens which must be inserted into the program by selecting them from menus. So you get a rich set of powerful commands (easily in the hundreds, even for the simple TI-84, and many more for the TI-89) but they're all discoverable through the normal menus and through the catalog menu. You start out knowing a few commands like Lbl and Goto, but through the process of scrolling over unknown commands (like maybe For or While in the control flow menu) repeatedly you start to wonder what they do, and then try them out, until you know what everything does and you can write the cleanest possible code. It's a wonderful way to learn.

And it supports both a text mode (with a "write string at grid position" operation for easy game making - text mode is a must on the CPU-starved TI-84+) and a graphical mode, with tons of stuff to do in both. For example, in high school I had a program that accepted a string of "DNA" and used it to repeatedly call the built-in pattern-drawing command with different arguments, producing a mosaic of overlapping patterns, so that each different input string produced a different final pattern. It's like 4 lines of code and kept me endlessly entertained in class.

And that brings me to its greatest advantage- its presence in the math classroom. In middle school and high school, math for a gifted student is boring as death, and you've got a little BASIC interpreter sitting right there on your desk. You can transform hundreds of wasted hours a year into productive learning time.

Post reply on HN