Live data from Hacker News

Retiring Python as a Teaching Language

prog21.dadgum.com

81–90 of 238 posts

Re: Retiring Python as a Teaching Language

#81
I taught my son JavaScript (along with html and css) because I think the browser is a great platform to expose new programmers to programming. I also think it's the most relevant because any knowledge and experience acquired is likely going to count in some way in their future.

The JavaScript adventure can continue when we look at node on the server and even use it to control embedded devices like Tessel and Espruino.

Re: Retiring Python as a Teaching Language

#82
post #69

- No memory management - No pointers - No cache - No branch predictor - No interrupts - No endianness - No alignment What exactly are we teaching students to program? It's certainly not a computer.

The best part is you can't forEach or map an HTMLCollection object. You have to [].forEach.call it. lol

HTMLCollection is a messed-up puppy, sadly. Consider this markup:

    
    
        document.images.forEach.src = "something";
    
This works, today, in all browsers. Adding "forEach" to the proto chain of HTMLCollection would make this code no longer work, so no browser is willing to add it for fear of breaking sites.

The answer is to stop using HTMLCollection.

What's worse is that NodeList doesn't have this named-lookup issue, but putting Array.prototype on its proto chain (the obvious simplest way to get all the array goodies) again breaks websites, because some people uses "instanceof Array" to assume things about how an object will interact with Array.prototype.concat.

Long story short, making improvements to the DOM is very hard because of the two decades of weird website hacks that are supposed to not get broken in the process...

Re: Retiring Python as a Teaching Language

#83
post #61

I still recommend Ruby as the first language because it has all of the features you want to know about as a newbie and at the same time there are very few quirks. The things you sacrifice are performance and memory efficiency. I have seen junior programmers picking up Ruby as be able to write production ready code in couple of weeks. I guess the learning curve is not as steep.

I don't think it's a performance and memory issue that the author is raising. Ruby, much like Python, mostly wraps some lower level libraries for game dev. In both cases, you either make sure your users have dependencies installed, or you use one of the clumsy "compiler" solutions that don't always work well. Consequently, Ruby isn't any better for the author's usage case (kids wanting to learn to write games that ar…

> for the author's usage case (kids wanting to learn to write games that are super easily portable)

This is an artificial use case. Kids wanting to learn to write games should be concerned with whatever works on the hardware they have available. Portability is premature optimization at this point.

Re: Retiring Python as a Teaching Language

#84

As a proponent of python and a full time python developer I fully endorse this decision. There is a compelling need to be able to distribute graphical python applications that isn't met (and that https://www.python.org/dev/peps/pep-0441/ isn't even a step in the right direction is an indication of how far away a solution is). Don't get me wrong, python is a great language, but its not the right solution for teaching…

I'm sorry, your comment isn't making clear what teaching programming has to do with distributing graphical applications. Could you clarify what 'these reasons' are?

Re: Retiring Python as a Teaching Language

#85
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 years, however, I've back-tracked on this opinion: if you really intend to teach, not just motivate, then Python is a poor choice. 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.

A language like C (the next course I was to take in the introductory sequence) is also an excellent language because it forces the user to understand programming at the systems-level.

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 serious investment, but it doesn't really motivate learning Computer Science, i.e. learning Programming on a 'deeper' level.

Thus, I don't really think that learning Python offers solid programming foundations. Consequently, if you really aim to teach, not just to motivate, then use languages that bring the student closer to core CS concepts.

Re: Retiring Python as a Teaching Language

#86
post #9

I would actually solve the game/show problem a different way. I would teach kids how to build MVC web apps and set up a cheap server so that apps could be "shown" to anyone on any device. If you use a mobile-first design philosophy for the webapps then phones are not likely to be an issue. Yes, there is still the issue of response time but no language works for everything. You have to accept certain limitations and m…

I don't hear many 13-year-olds wanting a computer with no screen, keyboard, or mouse. I do hear a lot of kids with smartphones who want to play games on them.

Re: Retiring Python as a Teaching Language

#87
post #25
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…

What's pretty funny is that the new features in ES6 and ES7 makes a lot of the patterns/mishaps/X-parts from the last 15 years pretty irrelevant or less-obviously-'the way'. Examples: * "Class" syntax * Comprehensions * Modules * `let` scoping * Generators It's a whole new ball game. I think a lot (over 50%) of JavaScript devs 5 years from now will still be using <= ES5, but only because they've so settled in their w…

> I think a lot (over 50%) of JavaScript devs 5 years from now will still be using 5 years from now, there will still be people whose customers require IE6 support, too. We're still working on that.

Re: Retiring Python as a Teaching Language

#88
post #55
post #31

Earlier quoted context omitted.

This makes the false assumption that resources put into Python 3 somehow prevented "native browser support," something that has always been firmly in the hands of browser vendors and was never blocked by insufficient loyalty to Python 2. The world where just giving up on Python 3 would magically bring huge benefits never existed. If you don't want to use Python 3, keep using Python 2 through its EOL in 2020+ but why…

> This makes the false assumption that resources put into Python 3 somehow prevented "native browser support," Agreed, browser support was probably unrealistic. However other points still stand. Python 3 was a mistake. It at the wrong time (too late), and didn't bring enough. The talks, and the time, and drama around it weren't worth to get dict comprehension and unicode support. A 10x speed improvement (heck, just a…

There were, there were. I think Node.js is the way of the future with their evented IO platform.

Re: Retiring Python as a Teaching Language

#89

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…

If "programming foundations" must include memory management etc, you're certainly correct. However, there's a reason they use Python for intro classes at eg; MIT[0] - the language gets out of the way so you can focus on CS basics. Once you get control flow and the like, you can start to explore complexity et al.

[0] http://ocw.mit.edu/courses/electrical-engineering-and-comput...

Re: Retiring Python as a Teaching Language

#90

As much as i can't disagree with the choice (the realpolitik of programming has made it the most correct choice), i am saddened that the language on which the choice falls is one not chosen based on any merit, but merely due the historical accident of being the first to be implemented in a browser and having had no appreciable opposition due to browsers at the time being in hands of corporations. In "A Deepness on th…

Language of choice for beginners need not mean only language of choice. If Javascript is great to get started with, great. Once someone has that down, they can still continue on to learn C, Haskell, and other more interesting languages that explore CS fundamentals & theory. Or so I would imagine, anyway?
Post reply on HN