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).
my first programming language, approx age 9 on the BBC Micro at school :)
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.
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.
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.
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".
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).
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.
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.
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.
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.
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's just nothing like that today. Computers today keep regular users as far away from programming as possible.
They aren't meant to.
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.)
Actually, it is (it requires a package prefix) and it's:
print "hello"
(Print was never a function in BASIC but a statement)Yes, you can use promises instead of callbacks, and get in promise-hell instead of callback-hell. It's indeed a matter of style.
* 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.)