Live data from Hacker News

Python is the new BASIC

coffeeghost.net

91–100 of 137 posts

Re: Python is the new BASIC

#91

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.

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.

Re: Python is the new BASIC

#92
Articles like this remind me of a quote from the German philosopher Arthur Schopenhauer[1] (in the context of Python's great success and proliferation):

    To truth only a brief celebration of victory is allowed
    between the two long periods during which it is condemned
    as paradoxical, or disparaged as trivial.
1. https://en.wikipedia.org/wiki/Arthur_Schopenhauer

Re: Python is the new BASIC

#93
post #81

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…

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

Re: Python is the new BASIC

#94
I think Python is a great first language to learn. It is well designed and is widely supported, for example Visual Studio 2015 comes with it. The only trouble with Python is the Python 2 vs. 3 situation. Both these versions are being improved. Python 3 is the newer and better language, but a lot of libraries are only available for Python 2. The wxpython library, referenced in this article, is an example.

Re: Python is the new BASIC

#95
post #82
post #75

Earlier quoted context omitted.

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

Untrue - start editing a file in a tabs editor, download a snippet from the internet that has spaces in it, and voila - you've screwed up your file. And this happens all the time to professional developers, much less 9-year-old beginners.

Sublime Text's Anaconda will complain about tabs / spaces mismatch.

Re: Python is the new BASIC

#96
post #81

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…

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

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

#97
post #68
post #33

Earlier quoted context omitted.

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…

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

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.

Re: Python is the new BASIC

#98

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…

As much as I love python now for scripting and other simple tasks now, Processing was the first "real" programming platform I encountered (after learning the forgive the pun basics with BASIC on my trusty TI-89). It was simple to use, and introduced me to OOP, which blew my mind coming from TI-BASIC. I would recommend Processing to anyone that asks about getting started in programming.

Re: Python is the new BASIC

#99

Earlier quoted context omitted.

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(outpu…

Using a framework built on top of wsgi such as flask you do get that though.

Re: Python is the new BASIC

#100
post #82
post #75

Earlier quoted context omitted.

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

Untrue - start editing a file in a tabs editor, download a snippet from the internet that has spaces in it, and voila - you've screwed up your file. And this happens all the time to professional developers, much less 9-year-old beginners.

All is needed is to have editor that can show white spaces (i.e. show tabs differently than spaces, after all those are two different characters).

With that the whole issue with tabs and spaces no longer exists.

BTW if you are copying snippets of code from website "as is" in any language you will have to reformat it to fit your structure. Also if you copy code so often that this is becoming an issue I'm not sure I would want someone like that working for me.

Post reply on HN