Hacker News new | past | comments | ask | show | jobs | submit login

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.



Python, 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).


> 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:

What! I've been looking for a nice easy to use turtle program for ages and it's been right in front of me the whole time!

Thank you for this.


I ran across this book (http://www.greenteapress.com/thinkpython/html/index.html) several years ago and had a lot of fun with Python and turtles. See TurtleWorld at around the fourth chapter.


Here's something I've exposed my young children to (not python, but turtle-ish): https://www.playcodemonkey.com/


> Python, fwiw, is a better BASIC.

The justifications you give for that make it seem like JavaScript is the new BASIC while Python is a better Logo (less ubiquitous language that is structurally better for pedagogy, though disadvantaged simply by being less ubiquitous.)

> Windows is the place where it hurts.

And still the dominant desktop platform. Which would be less important, as mobile eclipses desktop, if mobile environments included a standard, bundled interpreter that users could easily access for tinkering, but that's very much not the case.


> The justifications you give for that make it seem like JavaScript is the new BASIC while Python is a better Logo (less ubiquitous language that is structurally better for pedagogy, though disadvantaged simply by being less ubiquitous.)

You quoted me -- I said Python is a better BASIC; implying that while Javascript might be the new BASIC, Python is better at being one. Let that be clear!

The turtle graphics module is only one example. Python ships with plenty of other useful libraries and tools that make it great for experimenting and learning.

Let's not sell BASIC short -- its success wasn't just about ubiquity. It was designed by John G. Kemeny and Thomas E. Kurtz to help Dartmouth students write programs to do work. They thought it was a shame more people didn't know how to program computers. I think they succeeded with their original goals[0].

Python has the advantage of being invented some twenty-five-ish-odd years later. After a couple decades of development it has grown into a language and system that far surpasses BASIC in its ability to teach people how to write programs and be productive right away. It's better than BASIC and teaching more people how to program, imho.

Javascript is definitely more ubiquitous. I wish it was easier to use and came with better libraries and things in the browsers. It's everywhere but it's not easier to use than Python. And Python's not as obscure as you'd think... don't discount the market share of Apple + Linux systems combined. If Windows jumps on board and packages a Python distribution: watch out (as if, but hey).

The new BASIC... jury is still out for me. I like both languages just fine. Javascript is a little bit more ubiquitous but it's not any easier to get into in my experience; at least not with modern browsers hiding the web console and providing little in the way of built-in code editors (and to say nothing of the DOM getting in the way of everything from drawing graphics to the screen to accessing the keyboard).

[0] http://time.com/69316/basic/


Frankly i fear that the tech world is getting less and less tinker friendly decade by decade. At least in the case of off the shelf products.


> Frankly i fear that the tech world is getting less and less tinker friendly decade by decade.

That's kind of a constant in the tech world with every technology; I remember as a kid old timers making that complaint about radios. For a long time, its been made about cars. And, yeah, more recently, personal computers.


yes and no.

With radios it has been that moving for tubes to transistors to ICs has upped the minimum tools needed to get anything done.

With cars emission laws and such had introduced something similar via computerized injection etc.

But with computers etc the complexity was there for the start, but the tinker hostility has, IMO, come from a change in business from selling hardware to the hardware being a terminal for "content". Thus the tinkering hostility comes from propping up DRM under the guise of "security".


turtle wasn't BASIC... turtle was Logo!

my first programming language, approx age 9 on the BBC Micro at school :)


I'm well aware. That's what makes Python a better BASIC. It is simple and has some useful batteries included.


I believe my first exposure to Turtle was via a Logo cartridge for the C64.


Nice, turtle is awesome. BTW .turn() seems to be left() or right()


Right, sorry. Off the top of my head.


Well well, thats nifty. I recall playing with something similar on a old school computer using basics.

BTW, a team at Intel put Python into GRUB recently. And IMO they produced something that strongly reminded me of firing up something akin to the C64 and be greeted with a basic prompt.

Also, i swear i recently read about someone making a python enabled shell. Meaning that you could mix shell commands and python code on the same input. Had some small issues where python syntax overlapped with command switches or something.


Probably 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.


My 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.


I 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.


Yes, thank you, I almost forgot about how it really began with tweaking the code for the game itself! Great memories. Reminds me of how so many old games had .dat files (or something similar) that you could mess with initial settings or screw with the sounds.

This gives me a good idea for teaching my kids to program. Why start from scratch? I'm going to give them a game like this, with code, and see if they can do something crazy with it!

P.S. For me, I became the computer lab teacher's assistant in order to skip recesses or other activities in middle school. Fixed printers, made .bat file menus, good times.


I 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.


Basic 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.


There 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.


The browser is the "de facto operating system" for the web and javascript is its programming language. Javascript really is the new BASIC...


That'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.


And the average Chrome user is not likely to discover View->Developer->JavaScript Console, and enter console.log("Hello world!")

They aren't meant to.


> 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.)


Agreed. 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.


console.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 (and it is even very simple). That is just a matter of style.


> 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)


Python 3.5 is out, are you still using the legacy version? SyntaxError: Missing parentheses in call to 'print'


I think you missed the joke.


(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.


JavaScript 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.


We'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_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.)


I 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'.


I 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.


It was taught mainly because it is the only language teachers could really understand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: