Live data from Hacker News

30 years later, QBasic is still the best

nicolasbize.com

271–280 of 308 posts

Re: 30 years later, QBasic is still the best

#271
post #11

>to realize that in more than 30 years, we have not been able to come up with something better for our kids: Qbasic ..., but we have never really made a simpler or more direct access to the thrill of programming than QBasic. First, I think it's really cool that he's exposing a young mind to programming. But I'm also old enough to have installed QBasic from floppy disks and part of me thinks his statements I quoted ar…

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.

That's really a question of the APIs you're using rather than the language. If you're using a browser, you don't even need JS to draw the line; you can just go to this URL:

    data:text/html,
If you're using an API other than the browser, it can be super simple. Like, with processing.js, http://sketchpad.cc/sp/pad/view/zdsBK2b9xo/latest consists of:

    line(0, 30, 40, 50);
and that works. (Although you could surely argue that the language of processing.js isn't itself JS, but you can invoke its facilities from JS.)

There are also clumsier ways to draw lines, like with DOM manipulation in SVG or drawing stuff on a , and those might be desirable for the extra flexibility they give you. But you don't have to start with them.

Re: 30 years later, QBasic is still the best

#272

Earlier quoted context omitted.

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…

> My favorite is the date, where you months are 0 to 11, and days are 1 - 31. I think this is something you need to blame UNIX for. Or who knows, maybe something made even earlier. That said, there is a logic behind that. Days we usually represent with numbers. Months we often represent with names. So the month numbers are returned as an index of a sequence of names. (Not saying I like this logic, but it sort of make…

This was a design error introduced by, apparently, Dennis Ritchie (RIP) in the early 1970s, when ctime() was split into asctime() and localtime(), around the time UNIX was rewritten in C. It kind of makes sense in the context of implementing ctime(). But it was still a design error.

Re: 30 years later, QBasic is still the best

#273
post #36

Earlier quoted context omitted.

> After losing my memory, ... Wow, so you forgot how to write code? May I ask how that happened?

Just a head injury. Dont give too much detail as too solud testimony might be used against me in hiring or court or something. But, yeah, lost most memory except stuff I repeated most along with muscle memory anx hand-eye. (Shrugs). Supposed to be thoughtless drone but I do well here on many topics despite working with pieces and little short-term memory.

Man, I'm so sorry to hear that. I hope it gets better.

Re: 30 years later, QBasic is still the best

#274
post #271

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.

That's really a question of the APIs you're using rather than the language. If you're using a browser, you don't even need JS to draw the line; you can just go to this URL: data:text/html, If you're using an API other than the browser, it can be super simple. Like, with processing.js, http://sketchpad.cc/sp/pad/view/zdsBK2b9xo/latest consists of: line(0, 30, 40, 50); and that works. (Although you could surely argue t…

>and that works.

Depends on the browser. IE > 8 doesn't support it.

Re: 30 years later, QBasic is still the best

#275
post #273

Earlier quoted context omitted.

Just a head injury. Dont give too much detail as too solud testimony might be used against me in hiring or court or something. But, yeah, lost most memory except stuff I repeated most along with muscle memory anx hand-eye. (Shrugs). Supposed to be thoughtless drone but I do well here on many topics despite working with pieces and little short-term memory.

Man, I'm so sorry to hear that. I hope it gets better.

Appreciate it. Just functional enough to recall pieces of a good, in-depth conversation with you here on programming, software quality, etc. I gave you credit elsewhere for being unusually knowledgeable about present and past techniques of getting job done. Plus noticing high assurance implementation came down to rigorous FSM's and their connection to hardware. Impressive.

Since then, although my condition hasn't changed, I've at least pursued that hardware research to get very far. One thing was finding where SW and HW connect with those FSM's as I predicted. Already have 2-3 methods to express software that (a) can integrate with verification tech and (b) can auto-generate hardware from it. So, slow but steady progress toward grand challenges and such. :)

Re: 30 years later, QBasic is still the best

#276
post #234
post #230

Earlier quoted context omitted.

> Probably not functional programming, though, since functional's not very good for games Can you elaborate on that? People have actually written games in FP languages ([1], [2]). [1] http://www.cliki.net/game [2] https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

I think this isn't that FP languages themselves are not good for programming games, but that the languages don't really bring much more to the table. Even when writing games in C, you end up writing many things in a very functional way by default. You have some state variables, and on every tick you advance things around in a very defined fashion, and redraw the screen. The "default" pattern for making games is so cl…

Games would benefit from having the ability to plug in FP to resolve particular rules, but the aggregate game-world is stateful. (Remember that article here on HN where someone took several months to sort of write Pac-Man in Haskell, then admitted at the end that it would've taken him a week in C; and look at some of the other hoops that Haskell tutorials jump through when writing games.)

OOP is just an enormous win for games; I actually learned OOP with ZZT and Megazeux. Something simple like Pac-Man _might_ fit in a stateless paradigm, more or less, if you have a non-painful way to do I/O; but the more ambitious a game gets, the more it benefits from objects (including rule-processing objects).

MVC is also a good thing to use in gaming. For those who haven't heard yet: the model is the database and the deterministic, stateless parts of processing ("characters lose 1 point of nutrition per turn"); the controllers are the player's and any AIs' decisions (both are almost certainly stateful across rounds/timer-ticks); and the views are drawing the game (for the player) and giving a selective picture of the gameworld's state (for the AIs).

Re: 30 years later, QBasic is still the best

#277
I couldn't agree more. I started programming with QBasic -- basically teaching myself on my own -- when I was seven. And it worked. I was programming little interactive stories, drew crazy stuff on the screen, wrote small games. I was happy with it. The only things I was always curious about (and know one I knew back then could help me with) was on how to access the computer's mouse and the sound blaster. With my limited knowledge I never got that working until I switched to Delphi and Windows four years later.

One of the best things I remember about QBasic is the help system (also referred to in the article). This where I found everything I wanted to know, including examples, about the language. I believe that's one of the reasons why I'm still more patient when it comes to studying software documentation compared to the average programmer.

Re: 30 years later, QBasic is still the best

#278
post #230

Earlier quoted context omitted.

From my experience back when I was 12: once you get ambitious enough in QBasic, you start to wish for some way of organizing the code and making it easier to follow. At that point, an intro to structured programming or OOP is natural. (Probably not functional programming, though, since functional's not very good for games, and what else do you think QBasic is going to be used for?)

> Probably not functional programming, though, since functional's not very good for games Can you elaborate on that? People have actually written games in FP languages ([1], [2]). [1] http://www.cliki.net/game [2] https://en.wikipedia.org/wiki/Game_Oriented_Assembly_Lisp

Saying "FP languages" and only giving examples for Lisp is cheating. Lisp has state, it has an imperative-programming mode, and it has well-developed database libraries; it's not monomaniacally FP (and therefore aggressively unhelpful for games) like Haskell is.

(Lisp also has terminology that's much easier to understand than Haskell. What exactly is a monad, again? And why would I care about monads when I already have Java?)

(And also note Bitwize's observation that GOAL is imperative with the option of doing a little FP.)

Re: 30 years later, QBasic is still the best

#279
post #249
post #234

Earlier quoted context omitted.

I think this isn't that FP languages themselves are not good for programming games, but that the languages don't really bring much more to the table. Even when writing games in C, you end up writing many things in a very functional way by default. You have some state variables, and on every tick you advance things around in a very defined fashion, and redraw the screen. The "default" pattern for making games is so cl…

Once the Haskell people have figured out lenses properly, you can have all your OOP niceties (that anyone actually cares about).

[deleted]

Re: 30 years later, QBasic is still the best

#280
post #249
post #234

Earlier quoted context omitted.

I think this isn't that FP languages themselves are not good for programming games, but that the languages don't really bring much more to the table. Even when writing games in C, you end up writing many things in a very functional way by default. You have some state variables, and on every tick you advance things around in a very defined fashion, and redraw the screen. The "default" pattern for making games is so cl…

Once the Haskell people have figured out lenses properly, you can have all your OOP niceties (that anyone actually cares about).

We've already got those niceties (including the ones that you don't care about), and we get them without having to learn Haskell's enormous universe of exotic terminology. How do we get them? We don't use Haskell.
Post reply on HN