Live data from Hacker News

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

cacm.acm.org

351–360 of 375 posts

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

#351
post #348

Earlier quoted context omitted.

Yes, many of us here at HN were programming before going to university, or instead of going to university, but at Monash we are dealing with our first year intake, not with the typical HN commenter. I hedge that many of our students have never programmed "with a text editor" before because: 1. Many of them have used spreadsheets in higschool to build quite complex formulas, and spreadsheet formulas are turing complet…

it might be easier to use groovy, for noobs it's basically the same as python and runs on the jvm, also you can introduce java gradually without changing environments. I love python - used it for years, but I am dumbfounded that people enter a CS degree without having ever first tried to write a program. That's like taking english lit without having read a book before.

Most foreign students are like that: taking english lit without having read a 'serious' book before.

The world has 6B+ people and HN is a very very small portion of the world, just like USA and the UK.

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

#352

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…

I have a different experience tutoring (exercises and labs) in an engineering school in France for programming / CS beginners.

We moved from Java to python this year and I miss a few things. Due to the absence of explicit typing the students don't bother to understand types anymore and it leads them to a lot of mistakes and misunderstandings: confusion between simple types, lists, dictionaries, instances of a user created class, etc. Besides I think the verbose and rigid syntax of Java forced them to understand what their wrote and for a first language that was a good thing.

Overall I found that since it is easier to write code in python they rush to writing anything without understanding the algorithmic problem first. Thus they are less able to decompose a problem in sub-problems and write atomic functions to solve each of them.

Note that I think teaching python as a first language is a viable option but in our case the course needs to be intensively rewritten and the labs adapted. For instance my lattest point about algorithms is not a problem with the language: it could be resolved by having a part of the lab being pure algorithmics and then an implementation part.

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

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

Do you think agricultural schools sit people inside for a month to learn geology and meteorology before they let them step on a farm?

C is important to know, but there's lots of stuff you need to learn before that.

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

#354
post #329

Earlier quoted context omitted.

Yes it's funny, these places are teaching Python for the same reason they taught Java: it's "easy" and will get you a job. Yet we slate Java-schools, and cheer Python because it's trendy. The truth is, universities shouldn't care what industry does, because "real-world" computing is more about fashion than it is about any sort of science. And if you do it right people can learn any language they need (case in point,…

Yes it's funny, these places are teaching Python for the same reason they taught Java That's not what I'm seeing at all. What I'm seeing is discussion of specific traits about Python that make it especially suited for a beginner language. And I'm seeing these arguments made over and over and over again, convincingly, in a way that was NEVER done for Java.

If these Python classes were given to an industrial engineer or a chemistry major who just needs enough programming knowledge to crunch numbers/create scripts I would definitely get the approach and agree with it.

However, if you want your Computer Science majors to be able to create the next runtime like the JVMs, .NETs etc. or be able to do some device programming they need to learn C/C++.

A decade after going through a top-tier CS undergraduate program what saddens me is that a lot of university students today, think that Computer Science is cobbling github sourced code with their choice of scripting language. Yes, the startup market is hot and sometimes that's all you need but CS is much more than that. CS is about understanding the underlying models and concepts rather than a language. If you are totally missing how memory management is done, how data structures are laid out in memory, how typing works you are missing a big chunk of code-base out there in the world today.

I think the new wave of CS students, who are expected to solve larger problems, need to understand how billions of devices/apps are running in today's technology so they can create something better in the future.

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

#355
post #354

Earlier quoted context omitted.

Yes it's funny, these places are teaching Python for the same reason they taught Java That's not what I'm seeing at all. What I'm seeing is discussion of specific traits about Python that make it especially suited for a beginner language. And I'm seeing these arguments made over and over and over again, convincingly, in a way that was NEVER done for Java.

If these Python classes were given to an industrial engineer or a chemistry major who just needs enough programming knowledge to crunch numbers/create scripts I would definitely get the approach and agree with it. However, if you want your Computer Science majors to be able to create the next runtime like the JVMs, .NETs etc. or be able to do some device programming they need to learn C/C++. A decade after going thro…

"However, if you want your Computer Science majors to be able to create the next runtime like the JVMs, .NETs etc. or be able to do some device programming they need to learn C/C++." 98% of all developers don't actually need to write the next JVM, or .NET or something.

"think that Computer Science is cobbling github sourced code with their choice of scripting language." This is the beauty of programming, and I'm sorry you can't appreciate that. Not everyone is willing to stab themselves in the eyeball trying to re-implement the .NET/JVM wheel or other low-level library.

It's the same reason the majority of us don't write assembler anymore. We've moved on and abstracted away from that arcane knowledge. Does that mean that arcane knowledge is irrelevant? For most of us, yes. For others, no.

"Yes, the startup market is hot and sometimes that's all you need but CS is much more than that. CS is about understanding the underlying models and concepts rather than a language." Meanwhile, in the real world, CS is not really necessary for most business problems. No matter how much you wish to romanticize it as a discipline.

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

#356
post #261
post #182

Earlier quoted context omitted.

And C++ is horrible for security. By default it inherits C's no-checks-at-all, give-me-performance-or-give-me-death mentality.

While true, at least modern C++ provides the tools to write secure code, if one wishes to do so. Whereas with bare C, there is no hope.

You could add Valgrind and static analysis to your C. (You'd have to do something like this to C++, too.)

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

#357

Earlier quoted context omitted.

Does anybody here know of any resources where I might read up on best practices in CS pedagogy? I'm very interested in helping to reform my university's intro-level CS program.

Best practices differ from context to context. MIT switched from Scheme to Python because a large segment of students in 6.001 were not necessarily going into computer science and were there as because of a common core curriculum. Does it really make sense to teach such people to write language interpreters in an introductory course? But every place isn't MIT, nor is every course a common core requirement for a colle…

"Best practices differ from context to context. MIT switched from Scheme to Python because a large segment of students in 6.001 were not necessarily going into computer science..."

Nope, MIT has an introductory computing course that logically goes before 6.001-4 or the new 6.01-2. For a long while they didn't have one due to resource constraints, they dropped this service course about the time 6.001-4 was developed, but other departments had their own more domain specific introductory courses (see below for more details).

6.001 was canned and Scheme completely purged from the undergraduate curriculum for political reasons, after the Department, and likely School of Engineering and the Institute itself panicked when the dot.com bust more than halved enrollment, after it had been 40% of the undergraduate class for decades. Oh, yeah, after the Institute had also blown a quarter billion dollars in a not very functional new building for the EECS research labs.

"... and were there as because of a common core curriculum."

That ignores that MIT's EECS department has for a very long time insisted that EE majors have serious programming experience, and CS majors the same for hardware. 6.001 programming, 6.002-3 hardware, 6.004 both, all majors had to take all 4. This was true but less coherent in the '70s before that common core was developed, and it's still true with 6.01-2 which combine both. MIT's EECS department started as an EE department, this is not an unusual approach for such, vs. ones that started from the math side or otherwise independent of EE. If you want pure CS, you shouldn't go to MIT or U.C. Berkeley, but to CMU or Standford (or so I gather about the latter three).

"Does it really make sense to teach such people to write language interpreters in an introductory course?"

Yes, if you want them to really understand what it's all about. Since it's Lisp, that's also much less intense than it normally is, essentially all the colossal parsing messes with other language families can be skipped thanks to its S-expression syntax, and you can focus on the very basics.

As for e.g. Civil Engineers, MIT's Civil and Environmental Engineering department has its own 1.000 and 1.001 courses for its type of computing, and as I remember that was true way back when 6.001-4 was developed. In the late '70s 4 or so engineering departments got together and got VAX11/780, which they used for their own education etc. purposes, while EECS later procured first a DECSYSTEM-2060 (which had a CPU twice as fast, but a max of 1 MiB address space), then/in addition HP 68000 workstations (eventually Project Athena took over this sort of duty, I think).

Finally, whatever the pedagogical merits of Scheme and/or SICP/6.001, Python is now winning due to fashion rather than merit (although it does have some merits compared to other languages that could and are often used like Java).

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

#358
post #354

Earlier quoted context omitted.

Yes it's funny, these places are teaching Python for the same reason they taught Java That's not what I'm seeing at all. What I'm seeing is discussion of specific traits about Python that make it especially suited for a beginner language. And I'm seeing these arguments made over and over and over again, convincingly, in a way that was NEVER done for Java.

If these Python classes were given to an industrial engineer or a chemistry major who just needs enough programming knowledge to crunch numbers/create scripts I would definitely get the approach and agree with it. However, if you want your Computer Science majors to be able to create the next runtime like the JVMs, .NETs etc. or be able to do some device programming they need to learn C/C++. A decade after going thro…

However, if you want your Computer Science majors to be able to create [...] they need to learn C/C++.

It doesn't have to be the first language introduced. It should be second. My other comment in this thread: https://news.ycombinator.com/item?id=8004582

CS is about understanding the underlying models and concepts rather than a language.

Programming Language implementations are exploratory tools critical to understanding those underlying models and concepts. Indeed, in my experience the "CS is about understanding the concepts" logic is more often than not used as an excuse NOT to teach C.

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

#359
post #356
post #261

Earlier quoted context omitted.

While true, at least modern C++ provides the tools to write secure code, if one wishes to do so. Whereas with bare C, there is no hope.

You could add Valgrind and static analysis to your C. (You'd have to do something like this to C++, too.)

Valgrind is bandage sadly only available to GNU/Linux developers with lots of RAM to spare. Not fully available, if at all, when other systems need to be targeted.

Fully agree with static analysis.

My point is that at least with C++ you get the help of stronger type checking, RAII and automatic memory management via the available collections.

But of course, the C compatibility is both an advantage in terms of helped adoption, but also a weight in terms of being able to write secure code.

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

#360
post #88

Earlier quoted context omitted.

>> the ideas we want to convey from a first language are things like abstraction, recursion, proof by induction, equational reasoning, sequential/parallel time-complexity. Really? I thought good old imperative programming was the best starting point. Concepts like assignment, branching, looping. IMHO goto is actually useful at that point and structured programming is an abstraction that takes a little while to wrap y…

I'd say just the opposite. Variables are hard , in a way that you don't even notice as an experienced programmer, but when we write x = 1 x = 2 that's immediately very confusing for a beginner - are we saying that 1=2? If we stick to immutable values and recursion, and functions that are, well, functions, we get something that corresponds quite closely to first-year mathematics, which makes it easy to learn at the sa…

that's assignment AND reassignment. Mutable state is fundamental to how computers work no matter how hard the fans of the current fad of functional programming try to deny it.
Post reply on HN