8 ms·
>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
by jasode 11y ago
>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.
- onion2k 11y agoJS 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.
- rbanffy 11y agoAs 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.
- news_to_me 11y agoI'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.
- rbanffy 11y agoAn array was a poor example. Think instead of an object: for (item in myObject) { // process item }
- lettergram 11y agoMy 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/ https://whydoesitsuck.com/why-does-javascript-suck/
- TeMPOraL 11y ago> 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.)
- wvenable 11y agoI 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.
- snuxoll 11y agoNot quite 100% the same, but Python + QML comes pretty close, or once support for composite templates finally lands Python + GTK3.
- dragonbonheur 11y agoIt'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.
- digi_owl 11y agoThe 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.
- snuxoll 11y agoIsn'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.
- icebraining 11y agoAs 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.
- Annatar 11y agoYou 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...
- icebraining 11y agoYeah, 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.
- EugeneOZ 11y agoIs 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.
- protonfish 11y ago|0 How's that?
- tyingq 11y agoIt's not one line of javascript, but drawing a line with an html5 canvas is fairly straightforward. https://jsfiddle.net/4cwmcagp/ https://jsfiddle.net/4cwmcagp/
- technomalogical 11y agoIf 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.
- neckro23 11y agovar 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.
- dragonbonheur 11y agoPart 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.
- duaneb 11y ago> 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.
- arkad 11y agoFriendly sarcastic mode on: how about ABAP after week long installation of SAP env on your kids lap? :)
- deleted 11y ago[deleted]