The link on "No! You can't be serious!" was to Hackety Hack, by _why_the_lucky_stiff. The language was Ruby, not a random, closed-source, "4 kidz" programming language. And it's a good language for teaching.
Python is the new BASIC
101–110 of 137 posts
Re: Python is the new BASIC
#102I'll just point out that Python suffers from a deployment issue. Getting a web project up and running can be a nightmare (no, using Heroku merely hides the problem...it's still there). Even on the desktop it can get really cryptic and confusing for a newbie. And, of course, releasing and sharing your app is --from the vantage point of a newbie-- just about impossible.
On something like VisualBasic you can package-up and create an installer for your app with one click. Anyone can then install it and end-up with an icon on the desktop they can click and run the app. The "path to exe" is simple.
Again, I don't have time to dig deeper. We love Python and use it extensively for our web (with Django) and desktop work professionally. And, yes, I am teaching my kids programming with Python. But, no, I don't think Python is the new Basic, on more than one front.
Re: Python is the new BASIC
#103I 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…
Re: Python is the new BASIC
#104Earlier quoted context omitted.
I think minecraft red stones are turing complete. Someone built a simple processor with those red stones.
Ah, good to know! Got any links?
Re: Python is the new BASIC
#105> 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 proces…
The fact that PHP is hated by anyone who learned PHP and moved onto other, ostensibly better things is the reason why all the hate exists. Given any programming task, you're just going to end up with better code in pretty much any other language, especially a functional one.
I shudder when thinking about the damage that showing == vs === stuff (PHP's type coercion rules, in general) to someone new to programming! It is such a waste to force someone new to learn a bunch of edge cases and weird behaviors and an endless list of php lol's that literally have zero value outside the context of PHP.
Re: Python is the new BASIC
#106Nope, 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…
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
#107Nope, 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.
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 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.)
Re: Python is the new BASIC
#108I 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…
To be fair, BASIC wasn't a very good BASIC either.
Re: Python is the new BASIC
#109python'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…
Why is this being downvoted? Classes might not be what everybody needs but this pretending that hello world can be written in 1 line is just inviting people to write sloppy code, false advertising is what it is. In my experience namespace pollution because things are written outside a function is a very common cause of bugs and maintenance problems in production python code. People coming from C/Java/similar think th…
IMV, sloppy unstructured code is a fine place for many (especially very young) programmers to start, and it simplifies the onramp significantly (and, actually, for simple scripts, relatively unstructured code in python is sufficient for lots of real-world uses, too.)
if __name__ == "__main__"
...is the k of thing you need only if you are deliberately designing something to be used as both a script and a library, which there are very good reasons to do for many real world python files, but it certainly is not universally necessary. And using classes for hello world is excessive Java-ism.Re: Python is the new BASIC
#110Earlier quoted context omitted.
The fact that PHP is hated by anyone who learned PHP and moved onto other, ostensibly better things is the reason why all the hate exists. Given any programming task, you're just going to end up with better code in pretty much any other language, especially a functional one.
> Given any programming task, you're just going to end up with better code in pretty much any other language, especially a functional one. This is the exact bull * that good hearted Haskell and Lisp guys have to face and fix because of arrogant people like you. First of all, a good PHP programmer is a good programmer. End of story. You can write crystal clear code in PHP that anyone who started with C (how many I won…
No. It is not. It takes a lot more effort to produce the code of same quality in php. For one thin, you have to consider that one has to keep and endless list of gotchas and edge cases (yes, all languages have these, but the list is nowhere near as long as it is in php) in mind when writing any amount of php code.
>You can write crystal clear code in PHP that anyone who started with C..
tell me, what does this code do, in php?
$a = array('1' => 'one');
What is the value of $a after this statement?
Answer: It appears that it is creating a dictionary with a string key that maps to another string value, but instead it creates a numerically indexed array with value 'one' stored at numeric index 1.
Do you call this 'Crystal clear'?
PHP is a language that breaks the principle of least surprise at every turn. Please don't say you can write crystal clear code in it, if you are actually interested in spreading information and knowledge, as you put it.