Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am in the unique position of actually having taught/tutored/TA'ed several intro courses in several different languages, which included Python, Java, and Scheme. I would actually say that I had an easier time teaching elementary concepts to people in Scheme, but that the transition from elementary concepts to general-purpose or practical programming was easier for people who started with Python. Overall, I'd argue that Scheme is a better language for introducing computer science, but that Python is a better language for introducing programming and development.

I think one of the biggest problems with advocating Python as a teaching language is that programmers don't understand what the hard parts of Python are. Python is great because it's sort of a lingua franca for people who are well-versed in conventional, Algol-based imperative programming—it boils it down to its essence and omits anything unnecessary—so to a person who was versed in Java/C/C++/Perl/PHP/&c previously, moving to Python feels like everything unnecessary has dropped away. Consequently, it feels easy, and you look at it and think, "Oh, wow, this would be no big deal to teach someone, even a non-programmer."

In reality, though, you'd be surprised at the concepts people struggle with. Assignment poses a huge problem to beginners, and I have spent hours and hours of my life trying to explain the concept to baffled undergrads. Not that Scheme concepts are necessarily easier (e.g. recursion—although loops are not necessarily easier to a beginner) but that Scheme makes a point to have far fewer of those concepts to begin with. Keep in mind that in an introductory class, every new feature, no matter how small, can mean another week of instruction, which is why an intro class in C++ could mean almost no projects at all, but an intro class in Scheme could very easily give way to writing object systems, programming languages, and adventure games, as my first computer science class—using Scheme—did.



I've taught introductory computer programming in Scheme and Pascal. (I think I just dated myself.) And I find myself concurring with this.

People who taught themselves to program often have a hard time understanding what novices find difficult. The one that gobsmacked me -- and I only ever ran into this when teaching Pascal -- was twofold: one, that the computer does things in the order they are in the program, and two, that the definition of a function or procedure does NOT execute the function or procedure. Something about Scheme made the distinction between "we are defining a function" and "we are executing a function" much easier to understand.

And I concur about the terseness of Python. I've been using Perl professionally for, um, 15 years now (and I just dated myself again). I've written a few toy programs in Python, enough to establish that it's a worthy programming language.

But the pedagogical problem is that there's a lot of depth under the surface of Python (Perl, PHP, Visual Basic) - a lot of things going on that the experienced programmer understands and that the novice programmer needs to. It's often easier to learn in languages that have less going on, because the programmer needs to do more explicitly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: