Live data from Hacker News

Python is the new BASIC

coffeeghost.net

21–30 of 137 posts

Re: Python is the new BASIC

#21

As a javascript fan, console.log("Hello World") seems pretty simple. Sure, when you get into async it might confuse young kids (or experienced programmers), but most beginner stuff won't need callbacks.

I usually JavaScript is a great second language (after you pick up Python)

Re: Python is the new BASIC

#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 main(cls):
      print "Hello World!"
  
   if __name__ == "__main__":
    print "Hello World!"
Based on my experience, there's a lot people learning python who spend a lot of time at the stage where they "just don't get OO", and my opinion is that the reason is the language is bad at teaching them. It's like a submarine of complexity waiting under the simplified syntax for basic scripting.

Re: Python is the new BASIC

#23
Very true. It probably can't happen for various reasons, but I would love if windows just folded python 3.2 in as part of the default install.

Python certainly feels, to me, like the most similar language to the old QBasic. Simple syntax, with advanced features that you can use, or not use, pretty robust standard library, not great, but usable IDE built-in (I assume IDLE still comes in the install?)

One of the really cool things about QBasic was that it had support for doing such a wide spectrum of things natively, and easily. In my first semester-long high-school course, we went from Hello World, to doing VGA graphics with the different SCREEN modes and FILL, LINE, etc, making programs that could play christmas carols using the built-in MIDI commands, and doing some animations that relied on some of the old-school page-flipping techniques that we take for granted with modern hardware and APIs.

I don't know of another language that makes it as easy to do all that now. Python with pygame would be a start, but it's still much more complicated to get a window created that you can draw in than it was with QBasic.

Re: Python is the new BASIC

#24
Its a bit more nuanced because we are all people who know varying degrees of code and have already "been there," so to speak. To learn Python I'd argue you'd have to know a bit (read: not much) of the UNIX environment and args before you jumped in, and my difficulty with it in college was that I had only learned from compiled languages with all of the libraries pre-built for me. However, I would have bypassed all of those difficulties if I had learned how to be a "sudoer" from the beginning. I think going the HTML --> CSS --> Vanilla Javascript route could possibly get kids coding before they lose their first teeth. Kids are already very savvy with their mobile browsers.

Re: Python is the new BASIC

#25

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.

There are linters to handle syntax issues like tabs for spaces. Furthermore every text editor I've ever used has supported automatic handling of tabs/spaces and how many to indent.

Not sure on publishing but maybe try packaging it properly (I believe python apps can be wrapped into .exe files) and putting the package into something like dropbox folder?

It's 2015 and these problems are solved already.

Re: Python is the new BASIC

#26
> PHP is not the new BASIC. Combine the HTML/CSS/JavaScript arguments above, and throw in setting up Apache and a thoroughly bloated namespace. PHP is a poor candidate.

Yes, we hate PHP. Hurrr! It is so hard to setup Apache to run it especially considering how easy it is for Python. OH, and yes, PHP doesn't have a CLI! PHP is only good for web because I say so.

What? PHP does have a CLI? It is in fact the same process to set it up with Apache (mod_wsgi/mod_php)? It is also possible to build an emulator in PHP?! (http://phspectrum.sourceforge.net/) NOOO! PHP is only good for web and it is used by mindless guys (a certain asian population like it a lot!!!) so all of this is irrelevant!!!

Re: Python is the new BASIC

#27

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.

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

Re: Python is the new BASIC

#28
post #9

I remember trying to program some BASIC back in 1st grade, which was 31 years ago. I was terrible at it, but I was hooked. Fast forward to today: my 4th grader asked me the other day which language he should learn, and I was stumped. I ran through the languages I know well in my head: Java, PHP, Perl, Python, Ruby, Javascript, Go, Swift... Wasn't sure what to tell him. His expectations are fairly high, due to Minecra…

How about minecraft written in python? https://github.com/fogleman/Minecraft https://github.com/boskee/Minecraft

or python bindings to original minecraft http://www.jjinux.com/2013/05/drawing-sierpinskis-triangle-i...

http://python-minecraft.readthedocs.org/en/latest/contents.h...

Re: Python is the new BASIC

#30
post #9

I remember trying to program some BASIC back in 1st grade, which was 31 years ago. I was terrible at it, but I was hooked. Fast forward to today: my 4th grader asked me the other day which language he should learn, and I was stumped. I ran through the languages I know well in my head: Java, PHP, Perl, Python, Ruby, Javascript, Go, Swift... Wasn't sure what to tell him. His expectations are fairly high, due to Minecra…

> It isn't turing complete

It is!

Post reply on HN