Live data from Hacker News

Python is the new BASIC

coffeeghost.net

71–80 of 137 posts

Re: Python is the new BASIC

#71

Earlier quoted context omitted.

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 Javascr…

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.

Re: Python is the new BASIC

#72

Yesterday I had to explain to my 9-year-old daughter that the bug in her Python script was due to the fact that she indented with a tab and not four spaces. Trying to publish her program so that her friends could use it was a nightmare (it's a console app). It's 2015 and we have the brightest minds working on this stuff and it's all shit.

Doesn't exposing a 9-year old to Python register as child abuse?

Re: Python is the new BASIC

#73

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 Javascr…

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

Re: Python is the new BASIC

#74

As a Data Visualization enthusiast, I can say that Processing [0] is a great candidate for an introductory language to introduce programming (and computer science in general). It is a less verbose subset and superset of Java at the same time, has a solid IDE providing great visual feedback as the code changes and you can introduce real, physical world concepts through classes, polymorphism and what not in a way that…

+1 For Processing. I was talking to a friend about that the other day and used this very same phrase "Processing is the new Basic". You can't talk about the joy of learning computers without having a very, very easy way to produce simple graphics. Processing delivers on that, it doesn't even require a main().

Exactly,

Imagine introducing programming to kids at the same time they learn the cartesian coordinate system, or allowing them to grasp f(x) = sin(x) visually through experimentation. And pointed somewhere else on this thread, you can publish your work using the HTML exporter - no need for other people to install languages, open the console, etc, etc...

For those of you who don't know Processing, you can take a tour at http://hello.processing.org/

Re: Python is the new BASIC

#75

Earlier quoted context omitted.

it's 2015 and you're still using the wrong editor

What? He doesn't even mention anywhere in his comment what editor he is using

And he didn't need to, any editor that mixes space indents with tabs is the wrong editor.

Re: Python is the new BASIC

#76
post #22

python's problem is that while it goes the distance to make the simplest possible program as simple as possible, simplicity bleeds off very quickly as you add functionality. The shortest well behaved program, for example, looks like this: if __name__ == "__main__": print "Hello World!" and the shortest program that is strictly equivalent to the java program is closer to this: class Hello(object): @classmethod def mai…

Java "teaches" its users OOP by forcing it on them. Python provides the tools to get things done without it - that's why the learners "don't get it", because they don't need it, and they don't see it as a solution to a problem (or at least this was the case when I was learning python).

What you have there is un-pythonic. Once you have a good reason to build a class with static methods, it will most likely not look too bad.

Re: Python is the new BASIC

#77

Earlier quoted context omitted.

This is the one lesson of PHP that seems to be ignored by a lot (most?) new languages. If you want your language to be popular with beginning web programmers, then provide system administrators with a dead simple way to install it. Add package, done. Then make sure it doesn't cause too much trouble or at least upgrades easily. If it takes almost no effort to install your language and any modules that users might need…

It's really only "easy" if you are using mod_php. If you are using PHP-FPM, FastCGI, etc, as most people do who run production PHP, then things get about as complicated as using uWSGI, mod_wsgi, etc with Python. On that note though, getting mod_wsgi up and running with Apache is really quite simple.

You are absolutely right, strictly speaking it is the same thing. Getting a simple 'Hello World!' from the server though is a different thing but it is by no fault of Apache, Python is just not PHP when it comes to web development in the sense that you need this:

  def wsgi_app(environ, start_response):
      output = 'Hello World!'
      status = '200 OK'
      headers = [('Content-type', 'text/plain'),
                ('Content-Length', str(len(output)))]
      start_response(status, headers)
      yield output

  # mod_wsgi need the *application* variable to serve our small app
  application = wsgi_app
Instead of this:

  

Re: Python is the new BASIC

#78
post #67
post #51

Earlier quoted context omitted.

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

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.

Re: Python is the new BASIC

#79
post #67
post #51

Earlier quoted context omitted.

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.
Post reply on HN