Live data from Hacker News

Retiring Python as a Teaching Language

prog21.dadgum.com

131–140 of 238 posts

Re: Retiring Python as a Teaching Language

#131
A few months back I wondered whether one could have an introduction to programming based on the language equivalent of "Evoland"[1].

For those who don't know this, it basically recreates the history of (console) role-playing games. You start out in something that resembles Zelda, then you'll get color, 3D movement and other perks.

One could do the same with a programming language, by using different features, or even slightly tweaking syntax and semantics. One approach might be similar to how some BASICs operate: line numbers and goto in the beginning, than subroutines, objects etc.

Or something where people don't have to follow actual history and we're going at things from a more mathematica/functional point of view (shouldn't be a problem to do this with Racket dialects).

Then again, IANAT. Never mind that I would think that the environment is actually more important than the language itself (for most normal values of "language"). So please don't inflict Eclipse on newbies.

1: http://evoland.shirogames.com/

Re: Retiring Python as a Teaching Language

#132

The purpose of a teaching language must be to show students core concepts of programming. Since JavaScript doesn't have proper polymorphism, inheritance, hell even types, I don't see how they would benefit from being introduced to it initially. We started with Java and while it was a pain in general, the concepts were clear and you could easily go ahead with any other language afterwards. We also had some scheme and…

>The purpose of a teaching language must be to show students core concepts of programming.

Wrong. If the student isn't inherently interested in CS, teaching them all of that up front will mask the fact that it actually takes very little to get basic programs up and running.

For example, a sysadmin might want to learn some programming to automate some basic tasks. You don't need to learn about polymorphism or type systems to learn enough to become productive.

Re: Retiring Python as a Teaching Language

#133

Earlier quoted context omitted.

It sounds like the goal is to get people programming. That means a combination of teaching them, and getting them excited. Being able to show the thing you created to your friends is a powerful motivator.

If you get excited by showing your friend some silly webpage, but aren't absolutely thrilled by function composition in haskell then you're a coder, not a programmer. You're in the wrong class. The point of programming classes should not be to hide what programming is and show this silly mockery of it which javascript is. It shouldn't veil true programming issues, like correctly reasoning about the structure of your…

slow clap

It's rants like these that really harm the perception of the functional programming community. It just portrays you as the archetypal 'misunderstood genius' trying to show everyone in the world how wrong they are and how only the 'true programmers' do what you think is right. Yet none of this is backed up by evidence that the benefits of functional programming lead to better software.

Re: Retiring Python as a Teaching Language

#134
I think there are a lot of commentators here that are failing to appreciate that this is not about which programming language provides the best introduction to Computer Science or Software Engineering, but which language will inspire students to continue programming.

The readership of HN is self-selecting. Almost everyone here was drawn to the world of programming. Very few of you probably had programming thrust upon them.

I teach in the UK where all students from the age of 5 to 14 are now required to study computing. I personally teach students from the ages of 11 upwards, so when I'm looking at the best programming language to use, I don't even think about which will provide the best introduction to Software Engineering.

My primary concern is what will interest an eleven year old, who's only experience with a computer is using his iPhone, and whose primary interest in life is football. Or how can I make this interesting for a student whose ambition in life is to perform on stage, and has already decided not to continue studying Computing for their GCSEs.

Re: Retiring Python as a Teaching Language

#135

I'm saddened by the lack of academic rigour displayed in this thread. If you have not taught introductory computer science courses, then you have NO CLUE what makes a good introductory language choice. It appears James Hague isn't working as a teacher either, just giving advice to newbies, so his opinion is just that -- opinion. What you want is field studies: "This year we used Haskell and 75% of all students gave u…

> What you want is field studies: "This year we used Haskell and 75% of all students gave up on programming stating that it was to hard. Last year we used Visual Basic and only 20% did. Ergo Visual Basic is probably a better first language than Haskell."

Why is that necessarily a good thing? What are we optimizing for here, understanding or popularity?

SICP review by Peter Norvig:

> Donald Knuth says he wrote his books for "the one person in 50 who has this strange way of thinking that makes a programmer". I think the most amazing thing about SICP is that there are so FEW people who hate it: if Knuth were right, then only 1 out of 50 people would be giving this 5 stars, instead of about 25 out of 50. Now, a big part of the explanation is that the audience is self-selected, and is not a representative sample. But I think part of it is because Sussman and Abelson have succeeded grandly in communicating "this strange way of thinking" to (some but not all) people who otherwise would never get there.

http://www.amazon.com/review/R403HR4VL71K8/ref=cm_cr_dp_titl...

EDIT: People seem to be downvoting a sentiment Knuth and Norvig expressed, rather than reflecting on the question posed - what should we optimize for in a intro to CS class and why?

Re: Retiring Python as a Teaching Language

#136
post #5

It's with all of this in mind that my recommended language for teaching beginners is now Javascript. I know, I know, it's quirky and sometimes outright weird, but overall it's decent and modern enough. Javascript is a flawed, quirky language, but with the upcoming ES6 and ES7 standards it's going to be a much, much better. I'd call it a tossup comparing it to Python or Ruby. I wouldn't have recommended JS to a beginn…

Is rigor even that important? Is a flawed and quirky language really a problem when you are learning? I'd expect that keeping the learner's momentum going is more important – if they keep producing they will be able to engage with the crap, or make their own new kinds of crap. Quantity over quality, you know? With that in mind, stuff like developer tools is more important... and maybe community (which is eclectic for…

A quirky language might slow a learner's momentum by making it necessary to explain all the quirks. As a simple example, javascript's rules for casting values to boolean is quirkier than scheme's rule in the sense that scheme's rule ("#f passes conditional tests, everything else fails") is shorter to explain than javascript's rule ("NaN, false, 0 etc fail conditional tests, except new Boolean(false) passes it, etc"). As an experienced javascripter I've grown used to the quirky parts of JS, and some of the quirks are even rather convenient; however it's that much more that needs to be explained to the beginner that isn't strictly necessary.

Re: Retiring Python as a Teaching Language

#137
My impression is that Python is certainly not a better language than JavaScript. They both have their quirks, so it ends up being a matter of preference. For example Python doesn't have real lambdas, on the other hand it has named parameters.

The only reason to use Python that I can think of is maybe SciPy.

I made me sad to witness Python gaining so much in popularity as a beginner language in the last year.

Re: Retiring Python as a Teaching Language

#138
post #127

When I took an introduction to Computer Science in college, it was taught in Racket. Over winter break, I then learned Python, and I was baffled -- why would any curriculum not start with Python? Python was easy, expressive, and allowed the user to get lots done with little effort. It was great at motivating programming by showing its use and power. It seemed like an ideal introductory language. Over the last few yea…

> A language like Racket is great for teaching because it lends itself to exploring so many core concepts: complexity of algorithms, functional programming techniques, recursion, data structures, etc. ... >I don't really think Python is very good for illustrating either the theoretical or the systems-level CS concepts. It's a nice language for motivating programming and showing off how much you can do with little ser…

Racket has hygienic macros.

Re: Retiring Python as a Teaching Language

#139

Earlier quoted context omitted.

It sounds like the goal is to get people programming. That means a combination of teaching them, and getting them excited. Being able to show the thing you created to your friends is a powerful motivator.

While I disagree with the author that this is the penultimate goal that should be overriding all other concerns. I'll bite for the sake of discussion. If that's the goal then Javascript was obliterated before the OP woke up to write this ill-conceived blog. What people are building with Python on Kivy (chose the nearest example)- https://itunes.apple.com/us/app/deflectouch/id505729681?mt=8 Vs. What people are buildin…

Just because someone doesn't have a javascript heavy blog (which is designed to be mostly text) in no way means they think must think the whole web should be kept JS-light, or that JS isn't a worthwhile technology to build interactive applications with. They could believe in an appropriate use of technologies.

There are plenty of technologies for getting JS based apps into app stores, just as there is for Python based apps.

If your argument is is "Here is a highly interactive Python app and a low interactive blog post, therefore Python is more compelling" then:

What people are building with Python-

http://learnpythonthehardway.org/book/ex1.html

Vs.

What people are building on the webstack-

https://itunes.apple.com/us/app/biolab-disaster/id433062854

I agree that some of the arguments such as library longevity and health are debatable, but in terms of being able to get your application out to people, JS undoubtedly wins.

Re: Retiring Python as a Teaching Language

#140

I'm saddened by the lack of academic rigour displayed in this thread. If you have not taught introductory computer science courses, then you have NO CLUE what makes a good introductory language choice. It appears James Hague isn't working as a teacher either, just giving advice to newbies, so his opinion is just that -- opinion. What you want is field studies: "This year we used Haskell and 75% of all students gave u…

> What you want is field studies: "This year we used Haskell and 75% of all students gave up on programming stating that it was to hard. Last year we used Visual Basic and only 20% did. Ergo Visual Basic is probably a better first language than Haskell." Why is that necessarily a good thing? What are we optimizing for here, understanding or popularity? SICP review by Peter Norvig: > Donald Knuth says he wrote his boo…

In our environment, everyone should have a rudimentary understanding of programming. If even 10% of your complete beginners class drops out, you're failing to achieve that, so for this purpose, you should be looking for the lowest common denominator. Javascript is that LCD.

The Art of Computer Programming is a college level work - it makes sense for Don Knuth to aim it at the 1 person in 50 who could be a great programmer, someone who could progress the science forward, but his audience is very different to that described in the OP.

Post reply on HN