News for hackers. Stuff that matters.
Re:30 years later, QBasic is still the best by jasode on Thursday May 05, 2016 @11:19AM (#11636856)
>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 are romanticizing QBasic a little bit.

I think that Javascript in today's browser is a fine substitute. I've had good experience with children that age by going to the browser, pressing F12, go to Console tab and start typing code. It can start as simple as:

  alert("hello world");
And boom, you get a popup. You can also show the kid he can type in arithmetic stuff like "2+3" and he'll get back the answer 5. You can then show him how to modify the existing web page. You can ramp up a slight bit of complexity by showing how to create a text file and writing Javascript and then having the browser run it. The 8-year olds I've seen can handle this no problem.

What I like about the Javascript-for-kids approach is that it shows them that programming isn't some other universe where you install QBasic in a vm. Instead, the initiation into programming/experimentation is just 2 keystrokes away. There's something about the immediacy of F12-Javascript that keeps it from being an esoteric dark corner. The kid can also get more mileage out of his "programming" knowledge because he can use his Javascript console tricks at his friend's house on any web browser. On the other hand, playing with QBasic today is more isolating. The use of QBasic in 1980s had more utility because the syntax of '10 PRINT "HELLO"' also worked on Apple II, Commodore 64, Radio Shack TRS-80, Texas Instruments TI-99, etc.

Re:30 years later, QBasic is still the best by wvenable on Thursday May 05, 2016 @11:42AM (#11637079)
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 professional languages.

When I taught my daughter about programming I actually installed an old copy of Visual Basic 6.0 and it was really good for that. You draw the UI and the interact it with it mostly procedurally. She created a small useful application out of it. It's kind of crazy that in 2016 all our programming environments are more complicated than VB6.

Re:30 years later, QBasic is still the best by jasode on Thursday May 05, 2016 @12:15PM (#11637368)
>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 but a 6-year old will know the 2 buttons to press to heat up the popcorn. Yes, the keypad complexity handles more advanced techniques of 2-stage cooking with different power levels etc but the child just ignores all of that.

Or, how many of us grew up with those multi-component integrated stereo racks?[2] The front panel has all those buttons, sliders, knobs, and lights. And yet, a small child knows how to turn the FM knob to find his favorite radio station or rewind a cassette to replay a song.

I also see video games[3] that 6 to 8 year olds play (even if the game wasn't intended for that younger age group). To me, the screenshots show a complex "dashboard" at the bottom of weapons or other status. (I'm not a Starcraft player and it all just looks complicated and confusing to me.)

I think kids can look at the "complex" F12 screen the same way as microwave ovens, stereo receivers, and Starcraft screens: ignore the non-relevant UI elements and just type "alert ("hello");"

[1]https://www.google.com/search?q=microwave+oven+keypad&source...

[2]https://www.google.com/search?q=integrated+stereo+rack+turnt...

[3]https://www.google.com/search?q=starcraft+ii+screenshot&sour...

Re:30 years later, QBasic is still the best by takno on Thursday May 05, 2016 @12:33PM (#11637556)
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 by todd8 on Thursday May 05, 2016 @01:04PM (#11637867)
The real problem is there is no ISO Standard for the appliance interfaces. Do you press power level first? Or time first. Is it Forth like, numbers then operation or Haskell like, Function then number. My refrigerator has illuminated bars indicating how cold it is set for. Even after downloading a pdf of the user guide I can't figure out if I'm setting it correctly. Placing a thermometer inside and using trial and error solved the problem (after a few frozen bags of spinach).
Re:30 years later, QBasic is still the best by david-given on Thursday May 05, 2016 @05:18PM (#11639729)
My microwave has two knobs. One for power, one for time. It turns on automatically when you turn the timer and turns off automatically (sounding a mechanical bell) when the timer hits zero.

I believe the timer is clockwork.

Re:30 years later, QBasic is still the best by marssaxman on Thursday May 05, 2016 @06:04PM (#11639998)
I used one of those microwaves once. Best interface ever, and so much simpler than the high-tech beepy button matrix! Do microwave manufacturers just not realize that they're making their products worse by complicating them? I don't get it.
Re:30 years later, QBasic is still the best by eru on Friday May 06, 2016 @07:45AM (#11643225)
Knobs are more expensive than buttons?
Re:30 years later, QBasic is still the best by david-given on Friday May 06, 2016 @08:34AM (#11643491)
Actually, yes. Anything with a moving part is painfully expensive, which is why cheap monitors try to reduce the number of buttons or use capacitative touch-sensitive controls.

Touch-sensitive membrane buttons like the ones the use on the front of microwaves are much cheaper than mechanical timers.

Re:30 years later, QBasic is still the best by majewsky on Friday May 06, 2016 @08:22AM (#11643425)
I have one like these, and it's amazing. They should have stopped designing new shit after these. :)
Re:30 years later, QBasic is still the best by evincarofautumn on Thursday May 05, 2016 @08:48PM (#11640887)
My family had a microwave like that for ages, and I loved it. I think it was over 20 years old by the time they got a new one, because it was so rugged and easy to use.
Re:30 years later, QBasic is still the best by eru on Friday May 06, 2016 @07:46AM (#11643229)
And if you want something fancier, add just one more knob for grill-power.
Re:30 years later, QBasic is still the best by TeMPOraL on Thursday May 05, 2016 @03:43PM (#11639134)
Personally I think problems people have with appliances like microwave ovens are a combination of fear and intellectual laziness (aka. not expecting to have to figure out anything for themselves anymore). Probably the same thing as with computers in general[0].

Most of appliances provide functions expected from devices of their class and follow obvious patterns that you quickly internalize. I have a running bet with my friends that I can operate any electronic appliance without a manual. The hardest case I've ever had so far was setting the clock on a microwave that provided alternative functionality under "START" button when the oven doors were open. It took me a few minutes to crack that one.

[0] - https://xkcd.com/627/

Re:30 years later, QBasic is still the best by nsxwolf on Thursday May 05, 2016 @02:10PM (#11638446)
And why does every single key press have to beep??
Re:30 years later, QBasic is still the best by TeMPOraL on Thursday May 05, 2016 @03:37PM (#11639093)
So that you know it worked. Even without looking at the small display that also usually changes in response.

This is what I miss about older technology - especially dumbphones. The input always worked, and always worked with the same timing. I could operate my Sony Ericsson K800i without looking at the screen because my brain memorized the sequences of buttons and timings of common operations. Joystick press, up, up, press, down, press, wait about a second, press, done. Compare with Android phones which routinely ignore or misinterpret input ("that was a swipe, not a press!"), and hang at unpredictable moments for unpredictable amount of time (usually also ignoring input while hung).

Re:30 years later, QBasic is still the best by copperx on Thursday May 05, 2016 @08:11PM (#11640720)
Input lag is the mortal sin of UI design, and it's ignored everywhere except on dedicated appliances (touch phone, microwave, fridge). Instant response is not a given. I wish OS designers treated the user as a real-time system with hard deadlines.
Re:30 years later, QBasic is still the best by nsxwolf on Thursday May 05, 2016 @06:56PM (#11640330)
But I can't microwave something late at night without waking the whole house up!
Re:30 years later, QBasic is still the best by TeMPOraL on Thursday May 05, 2016 @07:01PM (#11640360)
Your keys are actually louder than the microwave itself? :o.

(At least every microwave I ever operated was pretty loud when cooking.)

Re:30 years later, QBasic is still the best by nsxwolf on Friday May 13, 2016 @09:54AM (#11690405)
The magnetron fan is white noise, but the beeps are shrill and piercing.
Re:30 years later, QBasic is still the best by mwcampbell on Thursday May 05, 2016 @03:38PM (#11639096)
One benefit, though not necessarily intended by the manufacturers, is that blind users get some kind of feedback for each keypress, since there's usually no tactile feedback on a microwave.
Re:30 years later, QBasic is still the best by bemmu on Thursday May 05, 2016 @09:02PM (#11640948)
I once spent half an hour reading the microwave manual (in Japanese) looking for some hidden way to disable the beeps. If you hold down one of the keys for over 5 seconds it puts you in silent mode, also disabling the annoying melody when heating is finished.
Re:30 years later, QBasic is still the best by glaberficken on Thursday May 05, 2016 @01:27PM (#11638061)
True! And what about office printers? =) The 2 machine types I dislike interacting with the most.
Re:30 years later, QBasic is still the best by PavlovsCat on Thursday May 05, 2016 @03:44PM (#11639148)
Yeah.. kids are tougher than we tend to give them credit for. I got an Amiga 500 when I was 10 years old, try playing Carrier Command, Elite or something like that without a manual and no clue what any of the words mean :) We sometimes didn't get very far, or missed out on many aspects, but there was still so much we did get out of it, so we kept hanging on, and with everything we understood, other things became easier to understand. I basically learned English that way, once I got a dictionary, since the coolest and best games and applications generally were in English. I didn't even notice I was learning you might say, I was too busy stacking boxes to get the banana :D
Re:30 years later, QBasic is still the best by Annatar on Thursday May 05, 2016 @05:46PM (#11639886)
Ah, Carrier Command... I'm going to have to play that again. Powered on my Amiga 500 on my desk yesterday after almost two years, and to my amazement the battery kept the correct time.

$c00000 - FAKE FAST LOCATED

Re:30 years later, QBasic is still the best by PavlovsCat on Friday May 06, 2016 @04:27PM (#11646508)
My A4000T is also still working fine (last time I checked), but of course the HD died. One of these days I will get a CF or even SSD in there, maybe get a nice mouse and indulge myself to bits. http://aminet.net/ is still here and nice things still get made, after all :)

What miss most is using tools like ExoticRipper to grab music modules from memory after reset, to then play them at leisure and examine/change them with a tracker. Or playing around with the "Action Replay" modules I-III, that blew my mind too. Making a pause toggle by connect the mass of the case to a specific pin of the extension slot, haha, I was so scared doing it and so shocked it actually worked. I may not have learned so much I ended up still using (except today I prefer Renoise to all other DAW), but I sure learned a lot about learning, that is, wildly poking around to figure things out.

Re:30 years later, QBasic is still the best by jsnell on Thursday May 05, 2016 @11:55AM (#11637184)
Yes. I've been doing Javascript + HTML games with my 9yo nephew every now and then, and the complexity of the environment as a whole is incredibly discouraging. Sure, he gets assignment, functions, conditionals and other basics. But the interface between the logic and the presentation is just so incredibly abstract that getting from those basics to anything interesting is way too hard.

I've been thinking of switching over to some other environment the next time we do that. The immediacy and integration into an environment he already uses every day are compelling advantages, and it'll be a shame to lose them. But it does feel like the downsides easily outweigh the benefits.

Re:30 years later, QBasic is still the best by kowdermeister on Thursday May 05, 2016 @06:57PM (#11640332)
Canvas is not a bad idea, but try Processing also. API is really simple, documentation is great filled with examples.
Re:30 years later, QBasic is still the best by dkopi on Thursday May 05, 2016 @12:39PM (#11637611)
Consider using an HTML5 canvas (with a 2D rendering context) instead of DOM manipulation. It makes programming very similar to QBasic's LINE, CIRCLE, PAINT.
Re:30 years later, QBasic is still the best by jsnell on Thursday May 05, 2016 @12:56PM (#11637763)
I write a lot of stuff with the Canvas in general, but it's not great for teaching programming. The Postscript imaging model is again very abstract, complex, and easy to misuse early on. It can be made to work if by setting up a lot of scaffolding up front.

And then there's interfacing the other way around, which the Canvas doesn't help at all with or makes even more complicated. It's somewhat easy to explain an onClick handler for a HTML button; doing a useful onClick handler for a canvas, or body-level onKeyDown handler are again much more complicated affairs.

Re:30 years later, QBasic is still the best by jmiserez on Thursday May 05, 2016 @02:04PM (#11638398)
Visual Basic 6.0 was great for learning how to program!

You could create GUIs and easily share self-contained exes with your friends. Also very cool was the documentation, complete, offline and and with lots of examples.

I initially got into programming through Apple HyperCard/HyperTalk on the outdated school computers, but it was rather clunky and limiting in what you could do without going through the C interface.

Re:30 years later, QBasic is still the best by pilif on Friday May 06, 2016 @09:25AM (#11643768)
> self-contained exes

Not really. The VB6 exes required a huge runtime to be installed. Plus all the visual controls lived inside of OLE DLLs als native code and you had to ship these too (and register them on the target machine)

This was the biggest motivator for me to move to Delphi because that actually produced self-contained exes and allowed you to call any Windows API directly without any COM wrappers in between.

And you had a real type system. And pointers. But you still had an easy GUI editor and a very good class library that was incredibly easy to use.

Re:30 years later, QBasic is still the best by rbl on Thursday May 05, 2016 @04:23PM (#11639392)
> Also very cool was the documentation, complete, offline and and with lots of examples.

I think 'online' [1] is the word you wanted to use. ;)

[1] https://en.wikipedia.org/wiki/Online_help

Re:30 years later, QBasic is still the best by jmiserez on Thursday May 05, 2016 @08:05PM (#11640692)
Well yes it was online in that sense, which was great. But what I meant to point out was that the complete MSDN help library came shipped on two CDs that you could locally install. It was really really good. There was a description, detailed background info, and usually at least a few example code snippets using the function. I was later a astonished at how sparse and useless documentation for many other libraries/languages was compared to that, especially when it came to example usage. Some notable disappointments included e.g. the Java/JDK docs (v1.4) and the early Android docs (v1), which both required looking at the code because the docs were severely lacking (both have improved by now).

I think you can still download the whole MSDN help library for offline use, but I don't believe that nowadays that would be enough for daily work use. Lots of useful info and example use is scattered around blog posts and StackOverflow answers now, instead of being a part of the documentation itself.

Re:30 years later, QBasic is still the best by chocolatebunny on Thursday May 05, 2016 @12:22PM (#11637456)
Have you looked at Scratch?
Re:30 years later, QBasic is still the best by wvenable on Thursday May 05, 2016 @12:31PM (#11637533)
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 by jovanni on Thursday May 05, 2016 @01:54PM (#11638288)
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 and draw some static pictures, but nothing else. I was frustrated.

Eventually I found and started playing with Games Factory, then Multimedia fusion from Clickteam, which is is sort of related to this, programming without typing. It was something my 10-year old self could understand on its own! I got a solid intuition of thinking in logic, and. Being able to set up some crazy causes and effects myself was really exciting. I made some "cool" stuff, for a 10 year old.

Once I found that limiting I tried to learn text-based programming again and by that time I was able to read code and puzzle out what it did from the concepts I learned. Maybe being a couple years older helped too.

I can't stand using tools like that as an adult, but without visual programming, I probably would've given up. Yet I paid my way through college writing Java/AS3/C, and now I made a living in games.

Re:30 years later, QBasic is still the best by intrasight on Thursday May 05, 2016 @10:37PM (#11641315)
My daughter learned to program with Scratch. It is definitely the right approach for more visually-oriented kids. She created some cool (to her) games, and found it so compelling that she turned some of her friends onto Scratch, who also then created games. Playing each others games and looking at the "code" was an important aspect of the learning experience.
Re:30 years later, QBasic is still the best by wvenable on Thursday May 05, 2016 @02:11PM (#11638457)
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 by snuxoll on Thursday May 05, 2016 @11:45AM (#11637104)
Not quite 100% the same, but Python + QML comes pretty close, or once support for composite templates finally lands Python + GTK3.
Re:30 years later, QBasic is still the best by dragonbonheur on Thursday May 05, 2016 @12:22PM (#11637449)
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.
Re:30 years later, QBasic is still the best by digi_owl on Thursday May 05, 2016 @12:34PM (#11637561)
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 by GregBuchholz on Thursday May 05, 2016 @12:45PM (#11637671)
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)
Re:30 years later, QBasic is still the best by duaneb on Thursday May 05, 2016 @02:14PM (#11638483)
Bingo. Teaching kids programming is exactly what turtle is meant for.
Re:30 years later, QBasic is still the best by mhurron on Thursday May 05, 2016 @04:41PM (#11639510)
Now that's bringing back some memories.
Re:30 years later, QBasic is still the best by snuxoll on Thursday May 05, 2016 @12:36PM (#11637589)
Isn't TK usually part of the standard library? Of course, then you have to build your UI in code, which can be a lot for a beginner - which I why I stated QML or GTK Composite Templates, both allow you to design your UI in the relevant tool (QtCreator, Glade) and then just wire it up. Speaking from experience, the trial and error of creating UI's in code instead of through a markup language with an editor that can preview it is a pain.
Re:30 years later, QBasic is still the best by copperx on Thursday May 05, 2016 @08:15PM (#11640738)
Well, Java does have a UI lib of its own and it doesn't make shipping an executable simpler.
Re:30 years later, QBasic is still the best by digi_owl on Friday May 06, 2016 @01:35AM (#11641923)
This is not about shipping executables. Its about kids being able to sit down and bang out a program, complete with a UI.
Re:30 years later, QBasic is still the best by dragonbonheur on Friday May 06, 2016 @04:24AM (#11642482)
Most kids want to make games and have their friends and the world play them. Desktop software isn't dead either. Real artists ship.
Re:30 years later, QBasic is still the best by snuxoll on Thursday May 05, 2016 @12:35PM (#11637570)
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!"
Re:30 years later, QBasic is still the best by dragonbonheur on Thursday May 05, 2016 @12:42PM (#11637640)
GTK in FreeBASIC is simple as well - just translate the C function calls into BASIC. FreeBASIC is really C++ without the curly braces so it's really a good covert way to gradually turn userland programmers into system programmers
Re:30 years later, QBasic is still the best by duaneb on Thursday May 05, 2016 @12:54PM (#11637750)
> I think that Javascript in today's browser is a fine substitute.

I cannot think of a more complicated way to introduce someone to programming. Yes, you can use `alert` and print things, but that's about where the ease of interaction ends.

Re:30 years later, QBasic is still the best by arkad on Thursday May 05, 2016 @03:11PM (#11638908)
Friendly sarcastic mode on: how about ABAP after week long installation of SAP env on your kids lap? :)
Re:30 years later, QBasic is still the best by EugeneOZ on Thursday May 05, 2016 @12:11PM (#11637337)
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.
Re:30 years later, QBasic is still the best by neckro23 on Thursday May 05, 2016 @01:04PM (#11637866)

    var drawing = document.createElement('canvas');
    document.body.appendChild(drawing);
    var ctx = drawing.getContext('2d');
    ctx.beginPath();
    ctx.moveTo(0, 0);
    ctx.lineTo(100, 100);
    ctx.stroke();
There's a bit of ceremony in setting up the canvas, but yes, it's simple.
Re:30 years later, QBasic is still the best by iofj on Thursday May 05, 2016 @01:32PM (#11638104)
1) Ok, in firefox I opened the console window. 29 buttons. The one to type this in was the thing at the very bottom that looked like ">> " with no cursor in it indicating that you could type in it.

2) typing your code (on this page) ... nothing happens. Element was added at the bottom of a very large page, element was not visible, so I didn't see anything happen.

3) the added element is a white box on a white background. Grand total indication of it getting added was a small adjustment in the (hidden by default) scrollbar on the right of the page ...

4) after that you want to start people out with paths and stroking and state storing and evaluating ?

Making a program like this that responds to keyboard input at all in javascript is dozens of lines, and you have to know DOM, properties, and event handlers in addition to the base language to make anything happen. Getting keyboard handling good enough to have a simple game ... let's not go there. Hundreds of lines. And of course, doesn't work on your friends machine (different browser ...).

I hope you can see that this is less than optimal to get people exited.

I am one of those guys that thinks web programming sucks, that it's far inferior for most programs as compared to Qt/QML and even to Delphi/VB like languages.

Re:30 years later, QBasic is still the best by billforsternz on Thursday May 05, 2016 @04:54PM (#11639600)
Your little typo is almost Freudian. Yes it's optimal for getting people to exit. But you're right, not so much for getting them excited.
Re:30 years later, QBasic is still the best by DanBC on Thursday May 05, 2016 @01:19PM (#11637998)
qbasic:

    SCREEN 13
    LINE (X1, Y1) - (X2, Y2), COLOUR
Re:30 years later, QBasic is still the best by zeckalpha on Thursday May 05, 2016 @05:46PM (#11639888)
Maybe there's room for a qbas.js which introduces some helpers like this?
Re:30 years later, QBasic is still the best by voltagex_ on Thursday May 05, 2016 @09:05PM (#11640964)
turtle.js please (see another comment about import turtle in Python)

https://github.com/davebalmer/turtlewax

http://berniepope.id.au/html/js-turtle/turtle.html

Re:30 years later, QBasic is still the best by dceddia on Thursday May 05, 2016 @01:05PM (#11637876)
Sure! Just locate the element you want to draw in, set up a 2d context, start a path, move to one end of the line, draw a line, and then stroke that line so it fills in! How much simpler could it be really?
Re:30 years later, QBasic is still the best by EugeneOZ on Thursday May 05, 2016 @03:49PM (#11639167)
In QBasic it takes even less symbols than your response has :)
Re:30 years later, QBasic is still the best by reitanqild on Thursday May 05, 2016 @01:38PM (#11638158)
> How much simpler could it be really?

The howto could be a whole lot simpler it seems, see this example, helpfully provided by neckro23 https://news.ycombinator.com/item?id=11637866

Re:30 years later, QBasic is still the best by qb45 on Friday May 06, 2016 @09:54AM (#11643950)
Welcome to the Internet and let me be your guide:

http://www.bing.com/search?q=sarcasm

I sincerely wish that the post you linked was sarcastic as well, but it was probably serious which makes the (former) QBasic programmer in me a little bit sad.

Re:30 years later, QBasic is still the best by reitanqild on Saturday May 07, 2016 @07:52AM (#11649235)
I'm smiling now :-)

I thought it was a well intended explanation that just wasn't detailed enough.

Re:30 years later, QBasic is still the best by dceddia on Friday May 06, 2016 @11:18AM (#11644540)
This was intended as sarcasm ;)
Re:30 years later, QBasic is still the best by kragen on Friday May 06, 2016 @06:17PM (#11647091)
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,<svg><line x1=0 y1=30 x2=40 y2=50 stroke=black>
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 <canvas>, 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 by krapp on Friday May 06, 2016 @06:41PM (#11647222)
>and that works.

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

Re:30 years later, QBasic is still the best by kragen on Sunday May 08, 2016 @09:31AM (#11653974)
Are you saying processing.js doesn't work in IE after IE 8?
Re:30 years later, QBasic is still the best by krapp on Sunday May 08, 2016 @10:54AM (#11654269)
IE 8 and above only supports image data URIs within CSS, link and image tags[0]. Processing.js probably works around that with Canvas or something.

[0]https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs

Re:30 years later, QBasic is still the best by tyingq on Thursday May 05, 2016 @12:58PM (#11637789)
It's not one line of javascript, but drawing a line with an html5 canvas is fairly straightforward. https://jsfiddle.net/4cwmcagp/
Re:30 years later, QBasic is still the best by technomalogical on Thursday May 05, 2016 @02:11PM (#11638454)
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 by protonfish on Thursday May 05, 2016 @12:52PM (#11637729)
|0

How's that?

Re:30 years later, QBasic is still the best by icebraining on Thursday May 05, 2016 @11:51AM (#11637150)
As someone who actually learned programming with JavaScript, back in IE 5 days, I agree. Writing dumb little "guess the number" games or copy-pasting snippets from DynamicDrive.com to study and adapt made it very easy to get started, and that you can upload it to a free host and share the link gives you an extra incentive.

I've since learned a few more languages, and I don't particularly enjoy writing complex JS programs, but I'm very glad it was there when I got started.

Re:30 years later, QBasic is still the best by Annatar on Thursday May 05, 2016 @05:51PM (#11639913)
You missed out - there is nothing quite like getting your first picture on the screen with the Copper, or doing your first scroller with the Blitter, or hearing your first Future Composer tune play correctly inside of a working level 3 interrupt request...
Re:30 years later, QBasic is still the best by icebraining on Thursday May 05, 2016 @06:55PM (#11640319)
Yeah, we couldn't afford a computer back then. I learned by spending my Saturdays on the public computers at the library, hence why having access to an interpreter that didn't need to be installed was awesome.
Re:30 years later, QBasic is still the best by Annatar on Thursday May 05, 2016 @07:18PM (#11640447)
I coded a good bit of my first Amiga intro on my neighbour's Amiga 500, because I could not afford my own...
Re:30 years later, QBasic is still the best by Voltage on Thursday May 05, 2016 @08:16PM (#11640741)
I've had life long friendships start based on the fact that they had a C64 Disk Drive and/or printer.
Re:30 years later, QBasic is still the best by onion2k on Thursday May 05, 2016 @11:41AM (#11637060)
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 scoping issues, data typing difficulties. Those are things that could easily frustrate an interested person.

A hour or two of JS as an introduction followed by learning a BASIC variant is probably a really good bet.

Re:30 years later, QBasic is still the best by rbanffy on Thursday May 05, 2016 @11:58AM (#11637214)
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.

Re:30 years later, QBasic is still the best by lettergram on Thursday May 05, 2016 @12:32PM (#11637542)
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 by TeMPOraL on Thursday May 05, 2016 @03:46PM (#11639155)
> 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 makes sense.)

Re:30 years later, QBasic is still the best by eropple on Thursday May 05, 2016 @04:23PM (#11639393)
> I think this is something you need to blame UNIX for. Or who knows, maybe something made even earlier.

Continuing forward with bad designs doesn't absolve you from them, though. Plenty of languages avoid this--look at how .NET handles dates and times, it has no real relation to the underlying OS on either Windows or *nix.

Re:30 years later, QBasic is still the best by wvenable on Thursday May 05, 2016 @04:32PM (#11639451)
The fact that we typically represent dates as "05/05/2016" kind of ruins the argument that we don't represent months as numbers.
Re:30 years later, QBasic is still the best by kragen on Friday May 06, 2016 @06:20PM (#11647117)
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 by news_to_me on Thursday May 05, 2016 @12:31PM (#11637532)
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 by rbanffy on Thursday May 05, 2016 @01:10PM (#11637934)
An array was a poor example. Think instead of an object:

  for (item in myObject) {
    // process item 
  }
Re:30 years later, QBasic is still the best by dragonbonheur on Thursday May 05, 2016 @12:18PM (#11637405)
Part of learning HOW to program has always been how to SELL your program. The BASIC programming language has always offered an easy path to doing just that. No googling what to use to turn the code into an executable like Python, no learning a whole library to do that either like Javascript& the node.js nightmare. Code -> Ship -> Profit (or get famous) - Any Basic, any platform, whether your machine runs at 8Mhz or 4Ghz.