News for hackers. Stuff that matters.
Re:Python is the new BASIC by agentultra on Friday July 31, 2015 @09:57AM (#9981764)
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).

Re:Python is the new BASIC by IanCal on Friday July 31, 2015 @10:43AM (#9982046)
> 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.

Re:Python is the new BASIC by jmulho on Friday July 31, 2015 @11:00AM (#9982165)
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.
Re:Python is the new BASIC by jrs235 on Friday July 31, 2015 @11:04AM (#9982186)
Here's something I've exposed my young children to (not python, but turtle-ish): https://www.playcodemonkey.com/
Re:Python is the new BASIC by dragonwriter on Friday July 31, 2015 @01:28PM (#9982996)
> 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.

Re:Python is the new BASIC by agentultra on Friday July 31, 2015 @04:55PM (#9984430)
> 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/

Re:Python is the new BASIC by digi_owl on Friday July 31, 2015 @03:25PM (#9983813)
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.
Re:Python is the new BASIC by dragonwriter on Friday July 31, 2015 @05:44PM (#9984715)
> 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.

Re:Python is the new BASIC by digi_owl on Friday July 31, 2015 @06:35PM (#9984921)
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".

Re:Python is the new BASIC by anentropic on Friday July 31, 2015 @10:10AM (#9981826)
turtle wasn't BASIC... turtle was Logo!

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

Re:Python is the new BASIC by agentultra on Friday July 31, 2015 @10:30AM (#9981965)
I'm well aware. That's what makes Python a better BASIC. It is simple and has some useful batteries included.
Re:Python is the new BASIC by GurnB on Friday July 31, 2015 @02:08PM (#9983296)
I believe my first exposure to Turtle was via a Logo cartridge for the C64.
Re:Python is the new BASIC by stefanix on Friday July 31, 2015 @10:32AM (#9981979)
Nice, turtle is awesome. BTW .turn() seems to be left() or right()
Re:Python is the new BASIC by agentultra on Friday July 31, 2015 @10:50AM (#9982095)
Right, sorry. Off the top of my head.
Re:Python is the new BASIC by digi_owl on Friday July 31, 2015 @03:19PM (#9983773)
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.