Live data from Hacker News

30 years later, QBasic is still the best

nicolasbize.com

51–60 of 308 posts

Re: 30 years later, QBasic is still the best

#51
There are various good options:

Scratch https://scratch.mit.edu/

CodinGame https://www.codingame.com/games

Squeak http://squeak.org/

Logo (even in browser https://turtleacademy.com/)

JsFiddle if you want to go for somewhat longer javascript https://jsfiddle.net/

Alice http://www.alice.org/

Re: 30 years later, QBasic is still the best

#52
What's nice with BASIC is that no context is required from the programmer: you don't need to know about the call stack or about variable scope. It's the programming equivalent of WYSIWYG. It also doesn't hurt that BASIC used to be resident in ROM (thinking back of the Sinclair ZX Spectrum), and that there were nice and simple primitives for drawing on the screen.

I agree with the blog author, and I still think it's the best language to learn programming. Everything else is software engineering, and gets in the way of the instant gratification that got so many of us hooked on programming.

What's wrong with starting with BASIC like I did, writing increasingly complex code, getting frustrated with the resulting spaghetti, then learning to use GOSUB more, which then gets you ready for a procedural language like Pascal? At least this way you know why pros don't code in BASIC. The same path of frustration (and fun) can also be used to go from Pascal to an OO language like Python or Ruby.

Re: 30 years later, QBasic is still the best

#53

My favorite thing about this story is that Basic was meant to be used exactly this way, for getting new programmers off the ground. And like everyone, I've got fond memories. We had an IBM PS/2 80286, with a whole megabyte of memory, a 20 megabyte hard drive, and MS-DOS three point something. At some point, I discovered that it had Basic, but it didn't have a graphical editor. It had edlin, which was still enough to…

I've always thought that learning to follow GOTOs and GOSUBs was the key to understand assembly language. "GOTO considered harmful" is really what's considered harmful. I never take anyone who says "X considered harmful" seriously because of "GOTO considered harmful".

Re: 30 years later, QBasic is still the best

#54

I agree- we should also have just as easy of a way to start off with drawing. Why do we need to install 50 frameworks, tell a window how to spawn, basically create a universe just to start experimenting with creating computer graphics? It's a (Width x Height) matrix of RGB values-- why can't we get a simple way to create a simple 100x100 box for kids to draw in? No reason your son couldn't tell a screen to print colo…

Logo! Logo + basic were my entree into programming

Ya I can see that, I'm imagining a way a kid could make his OWN logo implementation, though.

Logo is cool because you see the things you tell the little cursor to draw being drawn-- how could a kid implement something like his son's program, though, where a user is prompted to type their name and hit enter-- then a smiley face is drawn if their name is noah and a sadface is drawn if their name is anything else?

Re: 30 years later, QBasic is still the best

#55
post #29
post #19

Earlier quoted context omitted.

JS is a fantastic language for teaching the basics of programming - introducing variables, flow control, etc. The problem is that as soon as you go beyond "write a series of statements and run them" and in to actually trying to write something interesting and fun with a little abstraction or actual software design then JS very quickly stops being a good choice. You can quickly hit synchronicity problems, weird scopin…

As soon as you get to iterate over an array, you will be confronted with JavaScript's ugly design. No. It's a language to scare - and scar - young programmers for life.

I'm not sure that's a very good example.

  myArray.forEach( (item) => {
    // process item
  });
doesn't seem ugly to me. It's flexible and concise.

Re: 30 years later, QBasic is still the best

#56

Earlier quoted context omitted.

I agree with your complaints about QBasic but I disagree a bit about JavaScript. You are totally right that the environment being right there in the browser is great. But if you press F12 right now you'll find an amazing complex dialog box -- as a professional you just implicitly skip over that complexity. And JavaScript is a significantly more difficult language than QBasic even if it's one of the simpler profession…

Have you looked at Scratch?

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.

Re: 30 years later, QBasic is still the best

#57
post #29
post #19

Earlier quoted context omitted.

JS is a fantastic language for teaching the basics of programming - introducing variables, flow control, etc. The problem is that as soon as you go beyond "write a series of statements and run them" and in to actually trying to write something interesting and fun with a little abstraction or actual software design then JS very quickly stops being a good choice. You can quickly hit synchronicity problems, weird scopin…

As soon as you get to iterate over an array, you will be confronted with JavaScript's ugly design. No. It's a language to scare - and scar - young programmers for life.

My favorite is the date, where you months are 0 to 11, and days are 1 - 31. Along with optional semicolons, and there's this[1]:

true == 1 → true

true == "1" → true

false == 0 → true

false == "0" → true

false == undefined → false

false == null → false

null == undefined → true

"\t\r\n" == 0 → true

"\t\r\n 16 \t\r\n" == 16 → true

"\t\r\n 16 \t\r\n" == "16" → false

var a = "foobar"

var b = typeof a → 'string'

var c = a instanceof String → false

[1] https://whydoesitsuck.com/why-does-javascript-suck/

Re: 30 years later, QBasic is still the best

#58
post #41

Earlier quoted context omitted.

I agree with your complaints about QBasic but I disagree a bit about JavaScript. You are totally right that the environment being right there in the browser is great. But if you press F12 right now you'll find an amazing complex dialog box -- as a professional you just implicitly skip over that complexity. And JavaScript is a significantly more difficult language than QBasic even if it's one of the simpler profession…

>But if you press F12 right now you'll find an amazing complex dialog box -- as a professional you just implicitly skip over that complexity. That observation is fascinating to me. Isn't it possible that we're judging it with adult eyes? To me, kids can filter out "ui complexity" that's not relevant to whatever exploration they are doing. Examples I think of: A microwave oven[1] might have 25 separate buttons on it b…

Does anybody at all know what more than 2 buttons do on their microwave? I thought they were mostly there for decoration

Re: 30 years later, QBasic is still the best

#59
post #23

Earlier quoted context omitted.

Not quite 100% the same, but Python + QML comes pretty close, or once support for composite templates finally lands Python + GTK3.

It's always Python+X somehow, where X is a whole different thing you have to learn to get a fraction of the whole thing shipped in Python. Keep I.T. simple - teach the kids BASIC.

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.

Re: 30 years later, QBasic is still the best

#60
post #23

Earlier quoted context omitted.

Not quite 100% the same, but Python + QML comes pretty close, or once support for composite templates finally lands Python + GTK3.

It's always Python+X somehow, where X is a whole different thing you have to learn to get a fraction of the whole thing shipped in Python. Keep I.T. simple - teach the kids BASIC.

I don't really think GTK is that difficult to get a grasp on with composite templates. It's a little less "magic" than VB6 since I'm not just dumping code into a partial form class where the rest of the accessors to the COM controls are generated for me, but it's pretty straightforward in Vala right now (I use glade to design a UI, much like the classic WinForms designer - annotate a class with a GtkTemplate attribute and then put GtkChild attributes on class members to have the widgets automatically assigned there).

In Python it'd look like

    @GtkTemplate("my_window.ui")
    class MyWindow:
        @GtkChild my_textbox
        
        @GtkCallback
        def button_clicked(self, btn):
            my_textbox.text = "Hello, World!"
Post reply on HN