Live data from Hacker News

Why I push for Python

lorenabarba.com

31–40 of 129 posts

Re: Why I push for Python

#31
post #29
post #21

I think I could have written this article a few months ago, when I was a huge Python fan and would spend a significant amount of time telling my friends in academia to stop using Matlab and start using Python. Then I started working in a research lab myself, and I haven't used Python since. Very simply, there's an immense amount of code written for Matlab that I can learn from in domain-specific instances, hardware v…

"Research" is a wide area. I personally used Python in HCI research during all my time in grad school, and thoroughly enjoyed it. What field are you in, if I may ask?

[deleted]

Re: Why I push for Python

#32
Python is easier for students to learn.

Learning something new is hard, and Python is easier for students to learn.

Really, the ease of learning should trump almost everything else. Especially since Python is actually used in the real world, so it's immediately applicable.

You want students to know more concepts they won't get from just Python? I agree with you. Just not as a first language.

Re: Why I push for Python

#33
post #4
post #2

I'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.

Interesting examples you mentioned. Go, I can understand. But why Ruby? It is just as old as Python, behaves very similarly, and its ecosystem for non-web related tasks pales in comparison. And why Scratch? I really enjoy it (I've taught many workshops to kids 6-14 yo with it) but I would absolutely not use it in anything else but introductory classes.

The reason for Ruby is that more playful things seem to happen in that ecosystem. If you want to push something you want to be at the edge right? And although I believe Python and Ruby are equal in many qualities, Ruby is closer to the edge of where the next development happens. That was the reason behind my decision to add that.

Re: Why I push for Python

#34
post #21

I think I could have written this article a few months ago, when I was a huge Python fan and would spend a significant amount of time telling my friends in academia to stop using Matlab and start using Python. Then I started working in a research lab myself, and I haven't used Python since. Very simply, there's an immense amount of code written for Matlab that I can learn from in domain-specific instances, hardware v…

Well, also consider the point she's making. So you had to switch to matlab, but you were able to, perhaps partially because you already had a grounding in programming in a language you found pleasurable.

Re: Why I push for Python

#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 by the OS ("why do I need void main"), libraries ("what is cout and where did it come from? iostream!", "what else does iostream have?"), operators ("if cout is a function, what is this << thing?"), etc... The verbosity is helpful because it allows the student to ask questions that lead to a more holistic understanding of computer science. If a student with no programming knowledge asked me about how print worked in python, it'd be hard to know where to start explaining!

Re: Why I push for Python

#37
I 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 only visible in a terminal or IDE.

Re: Why I push for Python

#38
post #11
post #7

starting with python is ok as long as theres a C class following. At various work places ive been to, the vast majority of coders know python or ruby or similar languages. They have NO CLUE how the memory is allocated, why some things in python are slower, etc. At some point they go 'its python runtime overhead'. But most of the time they could make the program much faster just by using better data structures in pyth…

I started typing a really verbose and roundabout answer that really just amounted to this. I don't even really agree with learning Python first. If you can get over the hurdle that is learning C (or really even just Java), you have the benefit of learning so much more about computing and the fact that types are implicitly being adhered to, memory is being managed beneath the surface, garbage collection, etc. I learne…

I learned Java for my intro to programming. Later, I guess 2 years or so later, I began to take an interest into how and why programming languages work. Java throws an error if my index is out of bounds, which means it needs to check it itself, but what would happen if it didn't? What do I need garbage collection for? Why can't the compiler stack-allocate most objects whose references don't escape the scope of the method? How does the runtime know when it has run out of stack space? Does it check it on every new stack frame? Does the stack grow dynamically, or is it allocated ahead of time into one continuous, monolithic chunk? Can an ideal compiler infer the maximum size that the call stack will have at run time (modulo Halting Problem)?

I don't feel that my curiosity was permanently damaged by learning Java. On the other hand, I wouldn't have necessarily have wanted to learn anything about lower-level languages for its own sake, except perhaps only out of some sense of duty that 'every programmer should know this and that'. But since I have an interest in programming languages - which I of course didn't know that I would develop when I was learning my very first programming language - these things became relevant to me later.

Re: Why I push for Python

#39

I 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…

I think that's fine to whet a young adult's appetite, but in higher education, "Why?" should be an ally, not an enemy.

Re: Why I push for Python

#40
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 have stuck with it if C was my first language. Javascript and Python are excellent starting points that easily let kids create games and websites and fun things.

We probably wouldn't start someone off with Haskell, but to me C seems on the same level of impracticality for a young beginner.

Post reply on HN