6 ms·
Nope, sorry. Python is an easy, good language. Basic was not popular because it was easy, or even good, it was popular because it was everywhere. JavaScript, fo
by ZitchDog 11y ago
Nope, sorry. Python is an easy, good language. Basic was not popular because it was easy, or even good, it was popular because it was everywhere. JavaScript, for all its warts and foibles, is the new basic. It's easy enough, and it's everywhere.
- petilon 11y agoJavaScript is great because it is so versatile. You can make command-line programs (using node), server programs (node) and even native apps (using react native) using JavaScript. However JavaScript is not a well-designed language and for that reason it is not a good first language. That's why things like TypeScript exist and it makes OOP easier among other things. ES6 is a big improvement too. In the long run I think JavaScript will win because it is being improved and has huge momentum, but right now Python is the better first language.
- hliyan 11y agoAgreed. Callback hell in JavaScript is reminiscent of the GOTO-hell we used to suffer as BASIC programs grew larger. Like you said, with all its problems it was still ubiquitous and practical. So is JavaScript.
- scriptproof 11y agoconsole.log("Hello") is not more complicated than print("Hello"). For the callbacks it is actually possible to not use them. See how to: http://www.xul.fr/javascript/no-callback.php http://www.xul.fr/javascript/no-callback.php (and it is even very simple). That is just a matter of style.
- jacquesm 11y ago> console.log("Hello") is not more complicated than print("Hello"). Actually, it is (it requires a package prefix) and it's: print "hello" (Print was never a function in BASIC but a statement)
- Sami_Lehtinen 11y agoPython 3.5 is out, are you still using the legacy version? SyntaxError: Missing parentheses in call to 'print'
- jacquesm 11y agoI think you missed the joke.
- marcosdumay 11y ago(Is that a joke? Am I falling for that rule that says that jokes on the Internet can not be recognized?) Yes, you can use promises instead of callbacks, and get in promise-hell instead of callback-hell. It's indeed a matter of style.
- bjz_ 11y agoI would definitely agree with you now, but this article was written in 2008. Maybe the landscape was a little different then? But I guess even then, Python wasn't really 'everywhere'.
- dpcan 11y agoProbably the best point here by far. I didn't start learning to program because I wanted to program, I learned to program because I saw a file called GORILLA.BAS in one of the folders on my MS-DOS machine. Once I figured out I could open it in QBASIC and just press F5.... that was it... I would be a programmer for my next 20+ years and counting. EDIT: I would also like to point out how important the QBASIC IDE was as well. F5 to run. Put your cursor over any function and press F1 and it gave you a full description. It fixed your syntax (somewhat) as you coded too. It would highlight the line where the error happened. It literally held your hand through creating whatever you could dream up at the time.
- jawns 11y agoMy experience almost exactly mirrors yours. When I was in grade school, there was a shared computer in the hallway outside the eighth-grade classroom, and if the teachers trusted you enough, you could stay in and use it instead of going outside for recess. A few buddies and I would congregate around the PC and play Gorillas. And once we figured out how to edit the source code and do weird things with gravity, or cause tremendous banana explosions, we were hooked! (And, I think several of us went on to become programmers.) It was kind of like the thrill you'd get when you used Game Genie on an NES game for the first time.
- Vexs 11y agoI think that's the best way to get kids into coding, not some forcefed programming gui, but "Hey, here's a game you can play in class!" and then just give suggestive nods towards the source code and "what happens if you change this?" Next thing you know, kids are all trying to one up each other's programming, pulling apart the source and putting it back together without realizing that they're programming. I got into electronics by pulling apart toys and looking what makes them tick, there's no reason the same couldn't be done for code.
- digi_owl 11y agoI recall a friend doing something similar with mobs for Quake 1. The game used its own dialect of C, iirc. And it was possible to decompile the relevant files. So after some time he started modifying mods. That Quake 2 and later required Visual-C++ and such kinda took the spark out of the creative mods, as the entry price became too high. For instance Quake 1 had a "flight sim" of sorts that was basically done by one guy using Quake-C and some simple, freeware, modeling tools. There was an attempt at making a successor for it in Quake 2, but even with a larger team etc it basically ran out of steam thanks to the complexities involved etc.
- rasz_pl 11y agoI agree with your assertion. Javascript is as ubiquitous and horrible as Basic was in the day. One of the WORST languages to learn as a first.
- IndianAstronaut 11y agoIt was taught mainly because it is the only language teachers could really understand.
- jacquesm 11y agoBasic was popular because that was all you had. It was everywhere because computers shipped with it and other programming languages were simply prohibitively expensive. And so many of those working with computers at the time would roll their own assemblers to escape from BASIC (slow, inefficient use of memory). Agreed that Javascript is the new BASIC, Python needs to be installed, just like BASIC javascript is already present on your computer whether you like it or not.
- deleted 11y ago[deleted]
- agentultra 11y agoPython, fwiw, is a better BASIC. It includes a built-in Turtle graphics system and a decent IDE. You can teach loops and draw graphics in just a few lines of code: import turtle turtle.setup() turtle.forward(100) turtle.turn(90) turtle.forward(100) And so on. That initial experience has been one of the easiest to teach kids outside of a visual environment like Scratch. Some friends of mine have tried teaching Javascript but it's just frustrating: you have to teach looping with intermediate values and mutation, you have to teach the DOM, and if you want to get turtle graphics... well you have to scour the net for a poor implementation that barely works and teach the <script> tag... you get the idea. It's painful. The ubiquitousness is a huge advantage. Installing Python on a Windows machine and running programs is not as easy as "just being there." And being able to share your programs with a URL has so much potential... potential I feel is wasted by the walled-garden nature of code and presentation in modern browsers, crappy developer tools, and a lack of usable built-in batteries. Python will never be as ubiquitous as Javascript. But it's pretty close: OS X includes a Python distribution as do most Linux distributions. Windows is the place where it hurts. I don't know if it could be, "the new BASIC," but it could certainly be a better one. (This coming from someone who has fond memories of BASIC on the Apple IIc and Amiga 500).
- anentropic 11y agoturtle wasn't BASIC... turtle was Logo! my first programming language, approx age 9 on the BBC Micro at school :)
- agentultra 11y agoI'm well aware. That's what makes Python a better BASIC. It is simple and has some useful batteries included.
- GurnB 11y agoI believe my first exposure to Turtle was via a Logo cartridge for the C64.
- stefanix 11y agoNice, turtle is awesome. BTW .turn() seems to be left() or right()
- nsxwolf 11y agoThere is no new BASIC. BASIC was the de facto operating system for most personal computers. You would turn it on and you'd be presented with BASIC. There's just nothing like that today. Computers today keep regular users as far away from programming as possible.
- kawa 11y agoThe browser is the "de facto operating system" for the web and javascript is its programming language. Javascript really is the new BASIC...
- nsxwolf 11y agoAnd the average Chrome user is not likely to discover View->Developer->JavaScript Console, and enter console.log("Hello world!") They aren't meant to.
- marcelluspye 11y agoThat's a big stretch. Javascript is underneath everything in the web, but users aren't forced to interact with it every time they open their browser.
- dragonwriter 11y ago> BASIC was the de facto operating system for most personal computers. The de facto OS shell for most personal computers before IBM compatibles and DOS took over (it still came with BASIC, but it was no longer in a shell-equivalent role.)
- AlSweigart 11y agoWe're looking at it from modern eyes though. Compare BASIC to the other programming languages of the 70s and 80s: https://en.wikipedia.org/wiki/History_of_programming_languages https://en.wikipedia.org/wiki/History_of_programming_languag... * Pascal * Prolog * C/C++ * Ada * MATLAB * Eiffel * Erlang * Perl * Tcl If I were a beginner, I'd take BASIC over most of those. BASIC does have warts and having it ubiquitous did help its adoption, but the language itself was "easy to use" for its day. (Perl is pretty good, but BASIC had a two decade head start on it.)