Live data from Hacker News

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

cacm.acm.org

361–370 of 375 posts

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

#361
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…

My first language was Basic (in 1982).

The second was assembly.

I've gotten by in my career (to put it mildly).

What "top tier" undergraduate program is graduating students that can't lay out data structures in memory, don't know types, and so on?

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

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

> 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

Groovy (the JVM version) is marketed towards programmers who already know Java, and its main use cases (e.g. manipulating/testing Java objects, gluing together Java apps, and scripting in Grails) make the syntax terser but the programmer still needs to know what's happening underneath at the Java language level or they'll quickly hit a snag they can't solve.

The only use case where they don't need to already know Java is Gradle, where the script for a whole project is typically 20 to 100 lines long, usually copied and pasted from another project, and only using a tiny subset of the Groovy grammar, i.e. the DSL which is the least Java-like, so programmers won't be introduced to Java by using Gradle.

I even tried writing a Groovy(JVM) tutorial a while back for those new to both Java and Groovy [1] but found I had to introduce most Java and Groovy concepts at the same time. Groovy only gives some syntactic tersity via collection syntax, closures (though now obsolete with Java 8), and getter/setter syntax, nothing more.

[1] http://groovy.codehaus.org/For+those+new+to+both+Java+and+Gr...

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

#363
post #361
post #354

Earlier quoted context omitted.

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…

My first language was Basic (in 1982). The second was assembly. I've gotten by in my career (to put it mildly). What "top tier" undergraduate program is graduating students that can't lay out data structures in memory, don't know types, and so on?

Having recruited 3 dozen interns/jr.programmers from schools in the tri-state area and overseas in the past 5-6 years, you would be amazed how many students don't get these basics.

Those schools actually DO try to teach students about these concepts. How do I know? I personally have spoken to the deans of CS departments. Now imagine these same students, who no longer even hear of concepts such as garbage collection, pointers, etc. because it just works in their chosen language.

I believe the era of a single language for your career is long gone. Most people in their 20s and even 30s today will go through at least 4-5 different languages throughout their career.

Personally, I learned and enjoyed C++ 15 years ago but I do not find it practical for anything I do today. However, the same "impractical" knowledge allows me to get familiarized with a new language in a few weeks and start producing working software.

I don't quite care what language students learn as long as the concepts are understood. However, if the language they first start with hides most of these fundamental concepts, they no longer have any incentive to even learn how anything works.

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

#364
post #26

Earlier quoted context omitted.

Indeed, the discipline of computer science is really the study of computation and the ideas we want to convey from a first language are things like abstraction, recursion, proof by induction, equational reasoning, sequential/parallel time-complexity. It's much easier to address these foundational concepts in a functional setting (Scheme, SML, etc) and then once undergrads know how to formally reason and do proofs abo…

>> 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 don't think high level abstract concepts like functional programming are even relevant in the real world of software development

This is nothing but FUD and you should be ashamed of yourself.

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

#365
post #359
post #356

Earlier quoted context omitted.

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…

Agreed, the C compatibility and piling off features on top is a serious legacy.

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

#366

Earlier quoted context omitted.

Maybe, I'd have to see the actual class. Remember that if this is a 4-year curriculum, they may eventually be expected to write code for a hashmap in C or some other low-level language as part of a data structures or algorithms class. And often, a class like that will spend time on analysis and algorithm design tradeoffs. The best way to understand why accessing a hashmap can be done in O(1) time is to actually code…

> they may eventually be expected to write code for a hashmap in C or some other low-level language as part of a data structures or algorithms class (...) > This may simply be a preview. No, this is it as far as the core units go. This is the first course on data structures and algorithms. There is a second year course that deals with further data structures and algorithms: we teach amortized performance, proofs by i…

> Of course nobody is going to write actual functioning data structures in Python

Or even http://toolz.readthedocs.org/en/latest/

Daft, indeed! :-)

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

#367
post #29

I think Python is the perfect first language for beginners. Yea we all know it's not fast or low level or the best language to teach about types or advanced CS topics etc. But it is extremely readable and easy to understand, it makes coding fun and once the students are engaged and know the basics it is much easier to teach more advanced concepts like typing and memory allocation.

Couple of thoughts: 1) I hope they are teaching Python 3.x instead of 2.7.x. 2) A good portion of the schools cited in the Appendix are not "computer" schools. UC Davis for example, is the last place I would attend for a CS degree (I know many students at UC Davis -- it's much better suited for other degrees). 3) My school (CSU Sacramento) does not even offer any Python courses, but there's a lot of Java and C course…

Just as a contrasting opinion and at risk of sounding defensive -- I'm a UCD Alum (BS in a different field) who took the lower div CSE track there.

ECS10 (Intro to CS using Python) was my first formal CS class. Took it as a filler elective and was hooked. It was definitely geared toward first-time programmers and used Python to ease into fundamental CS/Programming concepts. I found it successful in that.

Following that was ECS30 which is in C and the first major-track CS class. The difference in difficulty/workload substantial, mostly due to the introduction of things like pointers, dynamic memory allocation, etc. But the intro class helped a lot. From ECS30 on, it's primarily C/C++ for OOP/Software design, Data Structs, systems, algos, etc. I don't think Python is used much if at all in major track CS/CSE classes I can remember.

I'm a little surprised at the dismissive tone toward UCD's CSE program relative to CSUS. I've audited classes at CSU in consideration of applying for a master's there, and while not outright disappointed, nor was I impressed.

I got the feeling that the CSUS programs are not as geared toward fundamental research and "CS" to the same extent as UCD and are slightly more skewed toward developing employable skill sets. That's not a bad thing, just a different goal. I also disliked the general push toward MS stacks.

Having peers at Cal that took I took summer sessions with at UCD, the feeling was that UCD was less challenging in the sense that there are smaller class sizes, better professor access (especially in classes taught by excellent lecturers like Sean Davis who devote lots of time to students), and less competitive nature of grade curving. I didn't hear anyone say it was easier, simply that it felt more collaborative. Though, that's not hard to imagine when they were in classes with nearly 1000k students split across two simulcast lecture halls in freshman CS classes at Cal.

Being in the shadow of Cal and Stanford makes it harder for UCD to get noticed, ut it has world-class faculty, smaller class sizes and great options for research. I have friends/acquaintances that ended up at Goog, Twitter, MS, SpaceX... etc. Is it MIT, Stanford, CIT? Perhaps no. Is it more known for it's Bio Sciences? Sure. But it's far from the 'last place' I would matriculate into for CS.

Just presenting (an admittedly verbose) alternative opinion.

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

#368
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…

>This is the same reason I dislike Java as a teaching language: having to tell people "don't worry about what public static void main(String[] args) means just yet" when teaching "hello world" isn't a great introduction to programming. This is exactly why I have always thought that the move to Java for intro courses was a terrible idea. C/C++ were never ideal for beginners, but it was still possible to strip it down…

>C/C++ were never ideal for beginners, but it was still possible to strip it down to building blocks without immediately resorting "don't worry about this now."

I agree. Except during that first C lecture when reading console input and was told 'don't worry about the ampersand, just remember to use it for scanf variables, we'll get to that later'.

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

#369
post #29

I think Python is the perfect first language for beginners. Yea we all know it's not fast or low level or the best language to teach about types or advanced CS topics etc. But it is extremely readable and easy to understand, it makes coding fun and once the students are engaged and know the basics it is much easier to teach more advanced concepts like typing and memory allocation.

Couple of thoughts: 1) I hope they are teaching Python 3.x instead of 2.7.x. 2) A good portion of the schools cited in the Appendix are not "computer" schools. UC Davis for example, is the last place I would attend for a CS degree (I know many students at UC Davis -- it's much better suited for other degrees). 3) My school (CSU Sacramento) does not even offer any Python courses, but there's a lot of Java and C course…

UC Davis is an excellent, albeit not elite, university.

CSU Sacramento would probably be the last place I would attend for a CS degree.

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

#370

Earlier quoted context omitted.

Care to elaborate? I wasn't aware scheme was known for its usability (easy to learn).

IMO Scheme is one of the easiest languages to learn. Have a look at SICP ( http://mitpress.mit.edu/sicp ), one of the best introductory programming courses available, complete in Scheme. They just _use_ the language, without actually _teaching_ it, and students just pick it up on the go. Sure, there are lots of corners omitted, but at the end of SICP, you've written your own Scheme interpreter / compiler combo that y…

Is that just your opinion, or was there the kind of research that went into ABC?
Post reply on HN