Live data from Hacker News

Why I push for Python

lorenabarba.com

11–20 of 129 posts

Re: Why I push for Python

#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 learned Java for my intro programming course and luckily had an instructor who really emphasized those topics. It made learning C and subsequently assembly much simpler. Had I started in Python, I don't see really learning much more than "wow, I can do some cool things with a computer." I suppose that's okay if the class is advertised as programming for non-CS majors, but to teach Python as an introductory course for CS curriculum seems almost like robbery to me. Jump the initial hurdle of learning the (somewhat) low-level stuff, and then the rest will come easily.

Re: Why I push for Python

#12
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...

It looks like the author's audience is applied sciences (MATLAB crowd). Therefore, the author's comparison of Python vs Java is more applicable than Python vs Haskell. This may be due to more "batteries included" in Java and Python ecosystems for scientific computing. The author had 30 existing Java programs to look at for bugs. I can't tell if his/her dataset search would have found 30 student-written Haskell programs.

Re: Why I push for Python

#13
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 Franca for academic research due to its powerful mathematics packages, and I was immediately able to start programming for money at a university research lab right after I took the class. The realization that I could learn a skill like this and immediately earn money with it was incredibly powerful for me. While there may be "better" languages in terms of teaching programming concepts, the fact that python is so immediately useful in a large number of disciplines relevant to students (at least in a university) still makes it the best language to start learning with right now IMO.

Re: Why I push for Python

#14
No doubt Python is a pleasant language to code with (if you don't mind forced indentation of your code). But to be fair this article should compare it to Groovy for instance and probably not Java; doing so would make the push for python a tad more challenging.

I took another look at Groovy again recently (haven't played with it since version 1.8) and i'm beginning to feel that i should have invested more time in learning/adopting it back then. The only drawback for me was the resource requirements of Grails (and the JVM) but now that Linode is giving 2gb ram for $20/mth, the attraction to Groovy is getting stronger lol!

Re: Why I push for Python

#15

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…

> "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"

My first programming language in college was Scheme and I could use exactly the same words to describe my experience.

Re: Why I push for Python

#16
I don't necessarily disagree with her reasoning, however the rundown she quotes is unimpressive. It basically amounts to "Python is Turing complete and has libraries," minus the point about it being English-like.

Re: Why I push for Python

#17

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 ;)

Re: Why I push for Python

#18
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 of the whole purity thing. I certainly wouldn't try to teach first-year CS students how to implement things like stacks, queues and graphs in Haskell.

Re: Why I push for Python

#19

No doubt Python is a pleasant language to code with (if you don't mind forced indentation of your code). But to be fair this article should compare it to Groovy for instance and probably not Java; doing so would make the push for python a tad more challenging. I took another look at Groovy again recently (haven't played with it since version 1.8) and i'm beginning to feel that i should have invested more time in lear…

Python and Java are too commonly taught languages, Groovy is not.

Re: Why I push for Python

#20

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…

[deleted]
Post reply on HN