It seems the only argument for pushing Python is that it sidesteps the need to understand fundamental programming concepts. Sure Python is easy to read and easy to write, but that's not really the point. To teach somebody print "hello world" in Python is not really teaching them much at all... Teaching someone the C equivalent would cover functions ("what is 'void main()'?"), entry points and how programs are loaded…
This is like saying that when teaching people how to cook, you should start with chemistry lessons. Sure, at some point you have to have some understanding of chemistry in cooking, but does that really mean you have to start out there? Yes, every programmer should eventually learn about the things you're talking about. But C is a terrible first language.
Why I push for Python
51–60 of 129 posts
Re: Why I push for Python
#52Earlier quoted context omitted.
This is like saying that when teaching people how to cook, you should start with chemistry lessons. Sure, at some point you have to have some understanding of chemistry in cooking, but does that really mean you have to start out there? Yes, every programmer should eventually learn about the things you're talking about. But C is a terrible first language.
I think it all depends of your goals, if you learn to cook in order to impress your friends, no you probably don't need chemistry lessons, but if you plan to win 3 Michelin stars for your restaurant, you probably need to. Same for programmation, if you just want to ease your work, compute quickly some math formulas, etc, you can start with Python. But if you plan to write the next big OS, you better start with C...
Re: Why I push for Python
#53I'm a huge Python fan (90% of my code is Python, work and private), but I don't think any more it's still the language to push. I have not much experience but it seems Go, Ruby, and Scratch seem to be the one's people should be heading towards (which one depends on the level of skill required). But it's really just my feeling, I have no data to proof it.
> Go Requires curly braces and type declarations. These are easy for beginners to screw up. > Ruby Ruby's syntax makes me want to gouge my eyes out -- it's every bit as bad as Perl. I'm an expert and I hate Ruby. I wouldn't dream of exposing beginning CS students to that crap unless I wanted to convince them to change their major. > Scratch This is a toy language in a toy environment. I don't know the language well e…
From a non-superficial standpoint, you haven't brought up a single thing wrong with Ruby— or Go, aside from explicit typing.
The thing about syntax is that, to some extent, it's subjective. You say Ruby syntax is awful? OK. Personally, when I first started programming, I hated Python syntax¹ so much that I called it quits. It wasn't until later, when I started learning Ruby and its "eye-gouging" syntax, that I could get past that hurdle. So I wouldn't exactly describe its syntax as an argument against using Ruby as a teaching instrument.
¹I've since grown to love it, but as a beginner this was very much not the case.
Re: Why I push for Python
#54I teach 11 to 18 year olds and I've stopped teaching them Python and started teaching them JavaScript. My main reason for the switch is to overcome the "What's the point of this?" questions that I used to receive. With JavaScript the kids instantly see a result on a platform they're familiar with - a browser. window.alert() is instantly recognisable to them and seems far more relevant than print"" where the output is…
Eg. > [2,1,3,10,6, 200].sort()
[1, 10, 2, 200, 3, 6]
is both unexpected, and is just one of many landmines that can completely derail beginners.
Re: Why I push for Python
#55It seems the only argument for pushing Python is that it sidesteps the need to understand fundamental programming concepts. Sure Python is easy to read and easy to write, but that's not really the point. To teach somebody print "hello world" in Python is not really teaching them much at all... Teaching someone the C equivalent would cover functions ("what is 'void main()'?"), entry points and how programs are loaded…
Python suffers from this less than C, but still much more than Scheme. I really can't imagine advocating for something other than some dialect of scheme (maybe racket) for an intro undergraduate course.
For kids I can see choosing something like Javascript (as terrible as it is) just for the immediate feedback that someone before me mentioned.
Re: Why I push for Python
#56Re: Why I push for Python
#57I teach 11 to 18 year olds and I've stopped teaching them Python and started teaching them JavaScript. My main reason for the switch is to overcome the "What's the point of this?" questions that I used to receive. With JavaScript the kids instantly see a result on a platform they're familiar with - a browser. window.alert() is instantly recognisable to them and seems far more relevant than print"" where the output is…
My main problem with Javascript is the various truthiness rules as well as the numerous implicit conversions to strings. Eg. > [2,1,3,10,6, 200].sort() [1, 10, 2, 200, 3, 6] is both unexpected, and is just one of many landmines that can completely derail beginners.
Re: Why I push for Python
#58Earlier quoted context omitted.
> Go Requires curly braces and type declarations. These are easy for beginners to screw up. > Ruby Ruby's syntax makes me want to gouge my eyes out -- it's every bit as bad as Perl. I'm an expert and I hate Ruby. I wouldn't dream of exposing beginning CS students to that crap unless I wanted to convince them to change their major. > Scratch This is a toy language in a toy environment. I don't know the language well e…
I feel like you're placing way too much emphasis on syntax here. From a non-superficial standpoint, you haven't brought up a single thing wrong with Ruby— or Go, aside from explicit typing. The thing about syntax is that, to some extent, it's subjective . You say Ruby syntax is awful? OK. Personally, when I first started programming, I hated Python syntax¹ so much that I called it quits. It wasn't until later, when I…
Re: Why I push for Python
#59Earlier quoted context omitted.
This is like saying that when teaching people how to cook, you should start with chemistry lessons. Sure, at some point you have to have some understanding of chemistry in cooking, but does that really mean you have to start out there? Yes, every programmer should eventually learn about the things you're talking about. But C is a terrible first language.
I think it all depends of your goals, if you learn to cook in order to impress your friends, no you probably don't need chemistry lessons, but if you plan to win 3 Michelin stars for your restaurant, you probably need to. Same for programmation, if you just want to ease your work, compute quickly some math formulas, etc, you can start with Python. But if you plan to write the next big OS, you better start with C...
You might as well start with the stuff that is common to most of (contemporary) programming.
Re: Why I push for Python
#60I grew up using a Borland C++ compiler that didn't list which line numbers were missing semi-colons. I didn't mind going over my code to find the missing semi-colon, but plenty of my classmates were frustrated. They weren't interested in how compilers worked, how code was parsed and debugging information was lost in the transition. They just wanted to build a game, a web site, something.
At college I had a difficult time with Scheme and looked down at it. Where's the manual memory management? The pointers? The for loops? Scheme abstracted away a lot of plumbing and let users focus on algorithms.
Nowadays I think Python is the ideal first language followed by C and Haskell. It's starting in the middle, and then moving towards opposite ends of the programming spectrum: systems and functional programming.
Some make the argument that CS students should be dedicated enough to plow through an introductory course taught in Java / C++. I think that's an elitist attitude. CS is not growing in popularity despite increased demand[0], and new students should be welcomed instead of facing artificial filtering measures like "dedication". At the same time, this is not a proposal to water down the major--just a plea to ease students in instead of kicking them off a cliff and hoping they can fly.
Edit: Another front page article (https://news.ycombinator.com/item?id=7760790) discusses this issue:
> One might also argue that these tools are simple enough once you learn to use them. I would only point out that, emperically, that bar is too high. Despite the clear benefits, the vast majority of the world was chosen to remain illiterate. Even tools for which there is a clear need (eg version control) have largely failed to make a dent. Clearly there is a need for a less hostile programming environment.
[0] http://www.itworld.com/big-data/418701/american-college-stud...