Live data from Hacker News

Why I push for Python

lorenabarba.com

41–50 of 129 posts

Re: Why I push for Python

#42
post #36

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…

Programming languages are tools that are useful to many more disciplines than just computer science.

Re: Why I push for Python

#43
post #36

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.

Re: Why I push for Python

#44
Why do people advocate Python and not a dialect of Lisp for beginners? Are prefix notation and parentheses really that terrible in exchange for a completely unified syntax?

Re: Why I push for Python

#45
post #5

Pushing for Python by comparing it to Java is a first step. But if you really want to do the right choice for all those students, you'd better compare it to other good languages. For instance I'm thinking of Haskell. Imagine that post being about PHP vs. assembly and thus pushing PHP, or about Java vs assembly and thus pushing Java, or...

I think the point the author is making is that Python eliminates a lot of overhead in learning fundamental programming concepts. I think it's easier for a beginner to grasp the meaning of something like for i in range(0, 3): than, say, for (int i; i Haskell is also a great language, but not a great choice for beginners, I think, because it adds a lot of overhead in learning basic programming and CS concepts because o…

I don't understand how your "easier for a beginner" example relates to fundamental programming concepts. Are you talking about variable assignments, jumps, control structure, or about syntax ?

Again how is "the whole purity thing" an overhead w.r.t. to learning the fundamentals ?

If you take your loop example in Python, how does leaking the `i` variable outside the loop's scope (actually there is no such scope) a fundamental that beginners need to grasp ?

What would you say about `map f [0..2]` ?

So Python makes a lot of things easier than in C or in Java I get it. That in itself is not an argument for teaching it instead of, say, Haskell.

If you can choose between A, B, ... Z, sure it is better to use B if it is better than A, but not choosing F because you never use it is a wrong reason (at least if your goal is to teach students).

Re: Why I push for Python

#46

Python was the first language I learned in college, and I have to agree with the OP's opinion on this. While transitioning to C++ in later courses did involve some pain points, I felt like python was a great way to ease into the programmer mindset and get the basic concepts out of the way before delving into the more low-level stuff like pointers, and later with OOP. Not to mention that Python is becoming the Lingua…

PHP would be even more powerful to you ;)

PHP would be among the worst languages you could throw at somebody learning computer programming concepts. I'm pretty sure this was a joke, just the same.

I was learning to program around the time when php and classic asp were gaining ground (1996)... php had far more to offer for free, but the utter inconsistencies irked me to no end, and still do.

Re: Why I push for Python

#47
post #43
post #36

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.

I would disagree that you need an understanding of chemistry to cook... (although it doesn't hurt). However, if you want to teach somebody to cook, you don't teach them how to use the microwave :)

Re: Why I push for Python

#48
post #36

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…

Given actual practical experience of e.g. Software Carpentry that's an absurd view. You actually do not need to know how "print" is accomplished. Print is not a leaky abstraction unless you go into what is (these days) an absurd scenario like a serial console.

Re: Why I push for Python

#49
post #36

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…

Why do you have to teach them the boring stuff first? The point is to get them interested in programming. They can learn how the hardware, compilation, linking, and algorithms work later. Above all, get them interested. If you capture their imagination, they'll be receptive to--even independently curious about--the details. I'm speaking anecdotally now, but please do not bore young students. There's no way I would ha…

Well if somebody is in higher education for computer science, I'm assuming their imagination has already been captured. I'm all for using whatever has the lowest barrier to entry in order to get young people interested in programming.

Re: Why I push for Python

#50
post #43
post #36

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.

I was about to disagree with this criticism of C, since I loved it as the introductory language in college. But then I remembered that Basic was my first programming language, and Pascal was the first language I was actually taught, and I'd been programming for a long time before actually getting to college.

So I totally agree. Python probably makes sense if most undergraduates don't have programming experience any more. And the ones that do probably have experience in JavaScript.

Post reply on HN