Live data from Hacker News

Python is now the most popular introductory language at top U.S. universities

cacm.acm.org

231–240 of 375 posts

Re: Python is now the most popular introductory language at top U.S. universities

#231

Help me out. I love the idea of Python as a first language. But do you think there's an issue teaching a whitespace-sensitive language as a first language? When students eventually move to Java/JavaScript/C#/Swift/whatever, will this be more difficult?

If you indent your code consistently, you'd never notice that python had syntactically significant whitespace. So the only reason it would ever cause you a problem was if your indentation was wrong. In many languages, programmers specify blocks using both braces and indentation. Python merely loses the redundancy.

Re: Python is now the most popular introductory language at top U.S. universities

#232
post #6
post #4

Earlier quoted context omitted.

rust? please. maybe 3 years from now, once it matures. python is good for teaching programming because it's easy to read - a feature that not a single language you mention can brag about.

It's easy to read and it just makes more sense when someone only knows English. I could show this to my 80 year old grandmother and have her understand what it does with minimal help on my part. word_list = ["hat", "dog", "cat"] for word in word_list: print(word) The same example in Java isn't extremely hard to understand, but it definitely is a decent jump in complexity from the almost plain English syntax of Python…

In modern Java(8) it is now

    asList("hat", "dog", "cat").forEach(System.out::println)

Re: Python is now the most popular introductory language at top U.S. universities

#233

I work at Monash University in Melbourne, Australia. Last year we moved our foundational course in data structures and algorithms from Java to Python, with great success. This is a course that used to be taught in C, then moved to Java. I tutored it as a Java course, and was in charge of adapting the tutorial (classroom exercises) and laboratory (programming assignments) materials when we started using Python to teac…

Are your classes available online to view?

I don't think so. Monash is now starting its own MOOC, so the unit could end up online, but that's beyond my knowledge or decision.

Re: Python is now the most popular introductory language at top U.S. universities

#234
post #230

Earlier quoted context omitted.

I may have made this term up myself; I am on the go and can't check it. As I use the expression "lexical typing", it means that the type of a variable can be ascertained from examining the text of the program, without needing to run it. Python is strongly typed, but dynamically typed: you can only know for sure the type of a value by checking the value at runtime. This by analogy with "lexical scoping", where you kno…

Thanks! I had expected you meant static typing, but wasn't sure.

Yes, a co-worker just chastised me in very nice terms for making up stuff. Static typing.

Re: Python is now the most popular introductory language at top U.S. universities

#235
post #105

Earlier quoted context omitted.

I think C makes a great second language. Use Python to teach if statements, variables, control structures etc - then later use C to teach low-level algorithms, pointers and how computers actually work. I don't think there's any harm in learning Python first. I think they may be harm in learning C first - it's much more likely to frustrate people and potentially even put them off programming. This is the same reason I…

You should really know how the soil and weather works before starting to farm. Otherwise you will end as a seasonal worker.

To get a turing complete programming language all you need are functions and function applications. Pointers and low level memory management are just an implementation detail :)

Re: Python is now the most popular introductory language at top U.S. universities

#236

Earlier quoted context omitted.

Author here. Thanks for your comments blahedo. I'm a bit short on time right now, but I will convert some parts of this response into more coherent form and edit my article accordingly to clarify. I'll address each of your paragraphs in turn: 1.) Re: CS0 vs. CS1. Like you mentioned, I was very upfront about the methodology for this analysis. And I am very aware that most CS majors do not ever take a CS0 course. But p…

...it's a very important one since those are students who, without CS0, would not major in CS. These students are more likely to be female or from underrepresented minority groups. I'm curious - would the group be less important if they were less likely to be female/non-asian minority? I get this impression from your text, though you don't actually state it explicitly. As a result I'm curious what your actual view is…

English isn't very good at expressing set logic, and I'm no mathematician :)

You can delete this sentence -- These students are more likely to be female or from underrepresented minority groups. -- and the meaning of the previous sentence remains unchanged. The key point is that CS0 is important for attracting people who didn't have prior background in computing and thus could have a latent interest in CS that would otherwise go unmet. Now, it turns out that a larger fraction of those students are from certain underrepresented groups, but even if that weren't true, it wouldn't make the case for CS0 any less important for the "group" that I think you're referring to, which is "students who have latent interest in CS but not enough prior exposure to know that they would love CS." (I wish I could've expressed that in an elegant mathematical equation!)

[Edit: when I wrote "even though this is a minority population", I didn't mean "minority" in the underrepresented minority sense ... I meant that this is a small population compared to all CS majors. Again, English != set logic]

Re: Python is now the most popular introductory language at top U.S. universities

#238

Python was heavily based on ABC, a language which targeted new programers and made syntax choices based on user testing: http://python-history.blogspot.ca/2009/02/early-language-design-and-development.html It says a lot about our understanding of our field that new languages generally do not formally test their syntaxes (and other "mental model" features) for usability.

Thank you for that link. I finally understood why Guido added the colon before an indented block (second paragraph). It's not needed by the parser, it's only to make it easy for programmers to understand that a block is about to start. Actually: "after early user testing without the colon, it was discovered that the meaning of the indentation was unclear to beginners". So it's aimed to beginner programmers. That's why Guido inflicted that useless and silly looking colon to all of us. How about making it optional in future?

Re: Python is now the most popular introductory language at top U.S. universities

#239
A few points that will likely get lost in the noise here:

1. It is weird to take the top graduate schools and ask about what they teach to undergrads. I'd rather see this done with the best national universities list - http://colleges.usnews.rankingsandreviews.com/best-colleges/... - as the basis for this study since that's where the top undergraduate students will end up.

2. I'd rather see trends than raw numbers - the fact that python has grown quickly over the last decade in terms of adoption is more interesting than it being "the top," to me.

3. It is sad that Java still has such a stronghold both in terms of being the intro language and being on the College Board curriculum. It is not the right language for beginners, or, really, anyone.

4. While I didn't take "CS1" in college (thanks AP exam) - I did take CS2 or whatever, and it was taught in scheme with SICP. Scheme was the great equalizer in that it was unlike any language anyone in the class had ever seen and that syntax no longer mattered - only concepts did. I hope it continues to keep its place in second-level courses.

5. It is unfortunate that garbage collected languages are extremely highly represented on this list - memory management may be unpleasant, but acknowledging that we are programming on limited-resource devices should be acknowledged early and often. Forcing students to experience this first hand seems that it serves both the purpose of teaching them abstraction (isn't this garbage collector great!) while maintaining a respect for the fact that resources (cpu, memory, power, network, disk, etc.) aren't free.

Re: Python is now the most popular introductory language at top U.S. universities

#240

Earlier quoted context omitted.

...it's a very important one since those are students who, without CS0, would not major in CS. These students are more likely to be female or from underrepresented minority groups. I'm curious - would the group be less important if they were less likely to be female/non-asian minority? I get this impression from your text, though you don't actually state it explicitly. As a result I'm curious what your actual view is…

English isn't very good at expressing set logic, and I'm no mathematician :) You can delete this sentence -- These students are more likely to be female or from underrepresented minority groups. -- and the meaning of the previous sentence remains unchanged. The key point is that CS0 is important for attracting people who didn't have prior background in computing and thus could have a latent interest in CS that would…

My question was slightly different - would the helping the group of people taking CS0 be less important if that group was comprised entirely of asian males?

I couldn't tell if the sentence was meant to support your main argument ("we should help group X because lots of non-asian minorities") or if it was merely a curiosity that was irrelevant to the main argument ("ooh look, lots of non-asian minorities, statistically unlikely therefore interesting").

Post reply on HN