top | item 8001337

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

743 points| pbui | 11 years ago |cacm.acm.org | reply

359 comments

order
[+] blahedo|11 years ago|reply
This methodology is suspect, and the headline is extremely deceptive. Note that Guo has conflated CS0 (meaning: CS for non-majors) with CS1 (meaning: intro to CS major). He is upfront about this fact and he does it intentionally, but comments about "first officially-sanctioned exposure in college" and such make it sound like he's unaware that most CS majors do not ever take a CS0 course; and among instructors of CS, phrases like "introductory language" without further qualification is usually understood as referring to CS1.

If we then look at the table of actual data to filter a little bit, the story changes. There are certainly some schools, big ones, that use Python in CS1. But a lot of the Python representation is coming from CS0 at schools where CS1 is taught using Java.

(I can also clarify one of his other comments: he says of the AP exam using Java that "it's unclear whether that will change anytime soon." This is untrue. It will not change in the next 3-4 years at the very minimum---and that would be the time frame if the College Board said right now today that a change was happening. In fact, though, although the idea's been mentioned, there has been no study or apparent motion on that front, so a more realistic earliest-date-of-change would be around 2019 or 2020. And I wouldn't count on it, given how many CS1 courses are still taught in Java.)

[+] pgbovine|11 years ago|reply
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 please also be aware that there are a minority of CS majors that do take CS0 before moving onto CS1, usually because they feel ill-equipped to take CS1 right away. I harp on this point because even though this is a minority population, 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. On a related note, a larger and larger fraction of non-CS majors are taking CS courses because they recognize the value of programming and computational thinking. (Again, these non-CS majors are more likely to be female and from underrepresented minority groups.) So I would argue that CS0 is just as important as an "introductory programming" course as CS1, if not more important, due to the rise of the non-software-engineers-who-want-to-learn-programming population. [Edit: And I think that a CS department's choice of language to offer to the CS0 student population is still very significant, and a decision that is not made hastily.]

2.) Re: Python CS0 and Java CS1. You are absolutely right, and in my original article, this sentence appears in the discussion section: "Some schools have fully switched over to Python, while others take a hybrid approach, offering Python in CS0 and keeping Java in CS1."

3.) Re: AP exams using Java. Thanks for the clarification. I will remove "it's unclear whether that will change anytime soon." from the article.

[Also, as to cyorir's comment that the chosen data may have been cherry-picked, please rest assured that I tried my best NOT to cherry pick. If I had cherry picked, wouldn't I have made Python look even better? ;) Any incomplete data is strictly due to human error or oversight on my part, and I gladly welcome any correction requests via email.]

[+] cyorir|11 years ago|reply
I think this is a good point. And in this respect I feel like the chosen data may have been cherry-picked or are somewhat incomplete.

As an example, take Northwestern. At Northwestern there are several intro routes you could take, depending on your major. CS Majors are not required to learn Python - it is used in some 300-level classes but not in very many 200-level classes (although that may change in the coming years). I've actually taken classes with projects using Python without ever taking classes teaching Python. CS majors will likely take C, C++, Java, MATLAB, or a variant on scheme for their first language, depending on which sequence they take, whether or not they are double-majors, or course scheduling.

In contrast, non-CS majors may learn C++, Python, MATLAB, or a variant of scheme as a first programming course, depending on why they are learning a programming language.

So while schools like Northwestern may offer introductory courses in Python, I think the truth is more something along the lines of "students may learn Python, or they may learn any of a number of different languages as their first language, depending on what their academic goals/requirements are."

[+] tripproberts|11 years ago|reply
Using Georgia Tech as an example, the two classes mentioned are the introductory courses for industrial engineers and business majors. The article excludes the introductory course for CS majors (1331) which is taught in Java and the introductory course for most engineers (1371) which is taught in Matlab .
[+] pgbovine|11 years ago|reply
Author here: Please email course correction requests to [email protected] ... I'll probably miss a few important corrections amidst the hundreds of comments.

As a clarification, a CS0 or CS1 course usually has no CS prerequisites, so if a course you're trying to mention has other CS prereqs, then it's probably not CS0 or CS1.

ha, feel free to DOWNVOTE so that this appears at the very bottom, so that it's visible :) but don't downvote so much that it disappears.

[+] pgbovine|11 years ago|reply
wow y'all are really bad at downvoting this comment; it's still hidden in the middle :) why does it have 4 points?!?
[+] spenrose|11 years ago|reply
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.
[+] brudgers|11 years ago|reply
If programming language selection for introductory university courses was based on pedagogical research on introductory computer science courses, I suspect Scheme would be nearly universal given its roots and nearly forty year track record.

But that's not how languages have typically been selected for 15 years or so. The direct vocational skills argument has held much more sway.

[+] spdy|11 years ago|reply
And this exactly what everyone needs in the beginning. Simple and clear syntax where you are able to produce results in a short amount of time to keep you interested.

I just remembered some people i learned with who struggled along time to get behind the concept of pointers and how to use them when they thought us c/c++ as an intro language to programming.

[+] pmontra|11 years ago|reply
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?
[+] Daishiman|11 years ago|reply
A lot of the recent Rust syntax changes are based on applying proposed changes to the Servo codebase and analyzing the changes subjectively across the entire sample. In cases where new semantics help with inference of types or annotations, the metric becomes quite objective.
[+] gaius|11 years ago|reply
But there is some weird stuff in Python syntax. Like, why do you create a dict with {} but access it with []? It always felt to me like an organic language, not one that was planned with consistency in mind (which is fine, of course).
[+] icambron|11 years ago|reply
I've always been of two minds about this. My intro course at MIT was in Scheme, a class that has since been renamed and is now taught using Python. On the one hand, it was a great course, and the FP was an awesome mindfuck (previous programming experience: TI BASIC). Though I took it all for granted at the time, it definitely set me up to think about programming better for years, and I still reread the book sometimes. The downside was that for a little bit, I couldn't really program in anything really practical, because by 2001 Scheme kinda wasn't. In other courses, I found myself crunching data with Perl that I only sort of understood, or writing C programs in situations where C probably wasn't the ideal tool, because it was the only other language I really knew. The thing where people say "once you know all the theory, you can learn a language in a couple days" isn't really true, and anyway, you probably don't have that couple of days. Point to Python.

So the question is really: can you use Python to get most of the benefit of teaching using Scheme while at the same time giving the student a practical tool for future use? I haven't taken the new Python courses, so I don't know how well the material bends to the language, but I remain skeptical of the "most of the benefit" part. Maybe I'm just a curmudgeon, but I sort of think they should keep Scheme and then just have a short (e.g. over IAP) course on practical programming techniques using Python (or whatever). Or maybe someone should rewrite SICP in Clojure? Finally, I know Scheme has continued to evolve, and I wonder if it's really still true that Racket is impractical as a day-to-day language.

[+] stepstep|11 years ago|reply
MIT grad here. I took the new course (6.01) 5 years ago, but I'm reasonably familiar with SICP. They are _very_ different. 6.01 has an emphasis on robotics and AI, probably because it's supposed to be an intro to EE as well as CS. SICP is more focused on the semantics of programming languages and the power of abstraction. 6.01 teaches some of the latter, but with some OOP mixed in. But it also teaches circuits, discrete signals stuff (e.g., the z-transform), probability, graph search, state estimation, etc. It's a breadth-first intro to EECS, whereas SICP is more of a depth-first intro to the building blocks of computer programs.
[+] rayalez|11 years ago|reply
I'm not sure that this is what you're looking for, but just so you know - there's a lisp written on top of python:

http://hylang.org

It's relatively new, but I'm really excited about it, and that is what I'm learning, it allows you to get the benefits of learning lisp and python at the same time. It's compatible with python in both directions, so you can use it in any practical project - with django or with machine learning libraries, etc.

I think it's really cool =)

[+] silverlake|11 years ago|reply
What is the purpose of CS101 for CS majors? Is it to teach a tool you can use in your future courses? Then Java, Python and C++ are good choices.

Or is it to teach the fundamentals of programming? Then Scheme is the ideal choice, but they should map concepts to mainstream languages. I.e., here's how OO works in Java, now we'll simulate it in Scheme. If more people took a course like this, we'd have fewer language fads IMO.

[+] leccine|11 years ago|reply
Clojure would be a great language for teaching, keeping LISP and SICP but giving a tool that compiles something running on the JVM. Teaching Python definitely has the advantage of being more ready for the market, even though Ruby is nicer and friendlier and probably better OOP, also having better lambda functions support.

SICP is such a great book, it is a must have for programmers...

[+] Igglyboo|11 years ago|reply
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.
[+] kriro|11 years ago|reply
All imo... Python as the "101" language is a pretty good idea for universities in general because many fields do data crunching of sorts and Python is fairly widespread in the scientific community.

As long as signup to the class is open for all (and not just CS-students) there will be healthy benefits for other departments (economics, biology etc.)

Aside from that I've always kind of defended high level languages as entry level teaching tools. The closer to pseudocode/natural language the better. Once you start to think about solving problems like a programmer you can switch languages relatively painless anyway.

With the advent of RubyMotion etc. I'm starting to wonder if there would be some value in starting to teach programming on mobile platforms in a high level language as 101 (i.e. the first ever code they write is mobile code). From my experience the "app classes" are always popular because there's a certain cool factor in being able to show a friend stuff you did on your own mobile device. If you'd tailor those classes to low-level phones it would be pretty helpful for certain areas of the world where many families have at least one cell phone but often no computer. Writing the code on the cellphone itself is pretty painful but at least one could write it at a university/school with a computer and carry the stuff that was built home.

[+] lettergram|11 years ago|reply
Honestly, I'm not surprised, but I believe this is bad news. Learning C programming (first) was probably the most advantageous thing that has ever happened in my life of programming. When you understand C you understand how the computer functions, and in turn can write better software. It prepared me for virtually all programming and has enabled me to understand concepts correctly, the first time, and has made my life significantly easier.
[+] franparga95|11 years ago|reply
Hey there! I've just started learning to code for building web apps (I know about Fortran 90, it doesn't fit very well on the browser haha), and it took me a while to decide. I looked up in an endless number of hacker websites, but at the end I'm sorry for betraying Python lovers... I'm learning ruby on rails..!

I've just started learning, please tell me If it's best to learn python (I'm not looking for an easy language, but for a powerful and versatile one :) Something to develop some ideas I have..

First post on HN!! :D From the center of Spain!

[+] jarrett|11 years ago|reply
My take on Ruby vs Python is this:

While Python has a healthy web dev ecosystem, Ruby's feels much larger to me. That's almost certainly because Rails is so wildly popular. And Rails is an excellent, mature framework. So for web dev, I would consider Ruby the winner.

Python is the clear winner for scientific computing. That's not really due to anything inherent in the language. It's an ecosystem thing. If you were using Fortran before, you might be working in a problem domain where Python dominates.

Both are excellent for miscellaneous scripting work. E.g. reading in a CSV file and doing something with each row; batch-processing a bunch of images; renaming 1000 files according to some ruleset; gathering some system data and sending nightly status emails.

In terms of syntax and features, they're very very similar. Python has meaningful whitespace, which you may like or dislike. (I think it's good for enforcing proper formatting, but you're free to disagree.) Ruby has multiple ways of expressing the mathematical concept of a function (methods, blocks, and procs), which has its pros and cons. Both have metaprogramming facilities, though I find Ruby's more pleasant. If I remember correctly, it was in large part the metaprogramming that made DHH pick Ruby for Rails.

[+] advocaat23|11 years ago|reply
Welcome to HN! Ruby is a good idea for webdev but keep in mind that Python is also dominant in other domains of computing in particular scripting and scientific computing. So in my opinion for a beginner Python is more future proof than Ruby [activate language-flamewar-prevention-daemon] and if you later add a system-language (e.g. C) and a modern general purpose language (e.g. Haskell or Scheme/LISP) to your repertoire you are in a very good position to tackle most kinds of software development problems.
[+] Igglyboo|11 years ago|reply
Ruby is great for webdev, RoR is insanely popular so if that's your route you'll do fine. Ruby doesn't really do anything else well however, Python is pretty much a jack of all trades with a massive library ecosystem. It's used in scientific computing(numpy), web dev(django, flask etc.), game development(pyglet pygame), and a ton more areas. I'd say learning python is better in the long run.
[+] mutagen|11 years ago|reply
I really like Python but I think there's nothing wrong with continuing to learn Ruby and Rails. Be sure to learn both Ruby the language and Rails the framework, there's more to Ruby than Rails. You'll likely also want to at least get your toes wet with Javascript so you can write native code for the client side of the browser, while you're learning that you'll be comparing with what you've learned with Ruby and from your previous experience with Fortran.

After learning those picking up Python will be fairly easy. Again, you'll be comparing with what you know, finding differences and similarities.

Don't worry too much about finding the perfect language, it doesn't exist. Spend your time building nice things in languages and frameworks that are good at at what they do. Be ready to try new things, you might like them, they might work well for a particular task or have a great ecosystem to accomplish specific things.

[+] pmontra|11 years ago|reply
Ruby is perhaps more dominant than Python in web development. Not that Rails is necessarily better than Django, but it seems there are more Rails developers than Django ones. However Ruby seems to be pretty much confined to web development and deployment tools. It also makes great DSLs thanks to its block syntax. However in general Python is more popular than Ruby.

One reason is that Python is used for system programming (e.g: the Linux apt system), desktop applications, big data (thanks to numpy) so you might find it a better investment for general purpose software development.

Another reason, which maybe explains the first one, is that Python looks more similar to C++/Java. Basically it's a simplification of those languages (the {} pair traded for a single colon, no type declarations, etc) plus some handy shortcuts. Ruby is from a somewhat different lineage (Smalltalk) and it shows in many places (e.g. the do |variable| ... end blocks). It can be used to write more natural language looking programs and combining that with some metaprogramming sometimes both amazes and unsettles programmers that come close to the language for the first time.

I suggest that you learn a little of both of them, working on the problem you want to solve, and decide by gut feeling what you would like to work with. I went the Ruby way because I can't stand some of the syntax of Python, not that Ruby is perfect.

[+] lmm|11 years ago|reply
There's really not much difference between Ruby and Python. I prefer Python and would argue it's a little more versatile (at least in terms of library support - people do command line scripts and scientific computing in python whereas Ruby is quite webdev-focussed) but honestly, who cares. Pick one or the other, learn it, have fun with it, use it to solve problems. And then make your next language something radically different from either of them (Haskell?)
[+] CodeDiver|11 years ago|reply
When you say you've just started learning to code for building web apps, do you mean you

(a) already know HTML/CSS/JS and now want to learn a server side language, or that (b) you are going from no experience straight to server side programming?

Regardless of whether you learn Python or Ruby, there is practically no way around having to learn HTML, CSS, and JavaScript for building web applications. You will be reading/writing HTML/CSS/JS in your Python or Ruby projects.

So if you have no prior HTML/CSS/JS experience, I would prioritize those skills first. Otherwise you will learn Ruby or Python then be disappointed to discover that browser technology is a giant hole in your skillset, impeding you from doing the useful things that got you to start learning in the first place.

You can do great things with just HTML/CSS/JS, especially since the browser environment supporting dynamic client-side applications in JavaScript has become so powerful.

Then when you're finally doing something that genuinely requires that logic and/or data be hosted on a server, managed by server-side tools, your knowledge of browser technologies will provide a solid foundation for stepping into that ecosystem.

If you already know HTML/CSS/JS, Ruby vs Python comes down largely to personal taste and whimsy. There are indeed differences, but the differences don't matter till much later, if ever. The greater danger is not that you will learn a language that isn't future-proofed, but that you could waste far more time picking what to learn than you ever might have wasted by picking the wrong language, especially since there isn't truly a wrong choice between two great languages. The debate between them is largely a religious war.

Since you seem focused on web apps, and have already started learning Rails, stick w/ROR. You're on a great path and your current choices won't hold you back. Good luck.

PS If you're interested in learning HTML/CSS/JS, I am thinking of teaching these subjects to beginners (no charge of course). PM me with a contact if interested.

[+] johnny_utah|11 years ago|reply
I would not worry too much about making the "wrong" choice between Ruby and Python. I found it fairly easy to learn Python after coding Ruby for a year. Have fun!
[+] pyfish|11 years ago|reply
Python/Django and Ruby/Rails are both clean frameworks and have fantastic communities. When I did the "Hello world" on both I was drawn to Python/Django. When it comes to moving away from the framework I tend to like Python more than Ruby. But it's just personal preference.
[+] slapresta|11 years ago|reply
Most of the time (unless you choose something horrid like PHP) the language doesn't matter that much. Pick one (Python and Ruby are comfortable for learners) and stick to it while you learn the basics. Research on data structures, algorithms and the like. Have fun.

By the way, since it happened to me: if you find Rails to be too complex for what you need, there are more lightweight alternatives. Don't get me wrong, Rails will get you up and running fast; but when I was a beginner, it left me with the sensation that I didn't really know what I was doing. Using more lightweight frameworks, like Cuba or Sinatra, can help with that.

[+] okaram|11 years ago|reply
It is perfectly fine to learn ruby; Rails is one of the nicest frameworks to get started with --I do prefer python and django, but rails is pretty nice too
[+] candeira|11 years ago|reply
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 teach the unit.

The main content of the course hasn't changed. Complexity, Big O notation, sorting and searching are introduced in the first two or three weeks. Students work through the usual implementations of arrays, linked lists, stacks and queues (both array and linked-list based), trees, heaps, tries, etc. All these data structures are explained first as chunks of data with external functions for the operations; then a second time as objects with methods for operations, once object orientation is introduced in week 5 or 6. Iterators are introduced as an abstract interface to list-, array- and tree- walking. Where relevant, we explain every operation twice, showing the iterative and recursive approaches. The course ends with two weeks of lower level work, where the students hand-compile pseudo-Python to working MIPS assembly.

The move to Python gained us, among other things, the freedom not to have to explain Java's generics and access modifiers. Many of our students have never programmed with a text editor before our unit, and dropping them into the big boilerplate world of Java micro-management was not good for them or for the course. We used to spend too much time on syntax and other details ("native types are like this, reference types are like htat") that we should have been spending on data structures and algorithms.

With Python, we even have time to explain idiomatic Python iterators and generators, and to discuss Python scoping rules (which come up again when we work on local variables in their hand-compilation tasks). So we still teach a bit of language-specifics, but we don't feel we are shackled to have to teach them. Also, teaching them idiomatic Python is a good deed after spending the first three or four weeks in a not very idiomatic subset of Python where we maintain explicit indices, update them by incrementing or decrementing them manually, use while loops the condition checking on the index value, etc. as required by the course content.

I don't have data on the results, because I was only the adjunct adapting the tutorial materials. The only difference I noticed was that students had less support from their IDE, and that some common errors (attempting to access attributes on None is the top one) that used to be picked up statically are now runtime errors, as expected. There didn't seem to be any big problems from Python's lack of lexical typing. Type errors are still caught, again by the runtime instead of the IDE and, if anything, this is a better exercise for students, since fixing them requires better understanding of what the program is doing.

If anyone is interested, I can ask the lecturer about the outcomes, but just from the fact that neither she nor anybody else teaching the unit has raised any issues the second and third times the unit was taught I can tell it's all going smoothly.

[+] hans0l074|11 years ago|reply
I do not know any Python (yet) - and my comment is probably off-topic. I spent a fall semester at Northeastern U, Boston in '97 and took a graduate course in Data Structures which was taught in C. I loved this course and finished top of the class (It helped that I was already familiar with C from an undergrad engg course). I fell in love with C. Implementing dequeues, linked lists, trees etc. with C was a pleasure - I learnt a lot about memory management responsibilities, smart error handling and began to understand how programming can be beautiful. Many years later when I started learning and working with Java, I felt that if this course had been taught with Java, I would not have gained as much (I could be wrong). The simple steps of typing your code in the standed editor supported by the environment (we were using a flavour of Unix in school), saving your work, compiling on the CLI and seeing the results - we just had to focus on our algorithm and nothing else. Your sentence "Many of our students have never programmed with a text editor before our unit, and dropping them into the big boilerplate world of Java micro-management was not good for them or for the course" stands out for me in this context. Since I know zero Python, I wonder how it compares. This reminds of Joel Spolsky's essay : http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...
[+] mandalar12|11 years ago|reply
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.

[+] advocaat23|11 years ago|reply
Good news! I would like to add that another advantage of Python is its usage for scientific computing (Math, Physics, Biology, ...) so students hopefully choose Python to help solving problems for their math classes e.g. using numpy and co. They can then get easiliy into IPython which is IMHO a very important FOSS project.

At my university I feel that proprietary scientific programs and CAS like Matlab, Maple and Mathematica are still the preferred problem solvers for students in the hard sciences (except CS).

[+] enrmarc|11 years ago|reply
Yes, Python is an excellent language for beginners, but so is Ruby in my opinion. Not trolling: why nobody is using Ruby in introductory courses?
[+] sagargv|11 years ago|reply
While I agree that teaching Python to non-EECS majors is a great idea, it's sad to see the decline of C/Scheme in university courses.

Much has been said on this topic. So, I'm just going to post two links that I think are interesting.

Joel Spolskey claims that Java isn't hard enough to separate good programmers from the bad: http://www.joelonsoftware.com/articles/ThePerilsofJavaSchool...

This article claims that competency of CS grads is going down: http://www.education.rec.ri.cmu.edu/roboticscurriculum/resea...

[+] micahasmith|11 years ago|reply
In college our intro classes were in C++. While its a tough language I do wonder if it was advantageous to forcefully learn about 1) value vs reference types via pointers and 2) how allocation maps into memory space. Not having that level of depth kinda worries me
[+] givan|11 years ago|reply
Is sad that students never get to learn something like http://ocw.mit.edu/courses/electrical-engineering-and-comput... they could easily learn any other language after, learning just java or python is practical only to prepare them for a corporate job.
[+] Igglyboo|11 years ago|reply
The article only talks about introductory classes, most universities with decent CS programs will teach more than one language.
[+] postnihilism|11 years ago|reply
It's not as though students won't dive deeper after their introductory CS course.
[+] etrain|11 years ago|reply
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.

[+] aruss|11 years ago|reply
It would also be useful to include liberal arts colleges. I don't think it's representative of top institutions if you only consider research universities. For example, Harvey Mudd, has a top notch CS program, but wouldn't be considered under that metric as it doesn't have any grad programs.

I'd be interested to figure out the whole intro sequence. For example, my college begins with Java for the first class, then the next two classes can be taken concurrently, which respectively consist of functional programming/basic CS theory in SML, and Data Structures/Advanced Programming (memory management!) in Java and C++. I'm sure a number of other colleges follow similar procedures.

Also - I don't think that "CS0" classes should be included on this list as most are not taught with the intention of further CS education. For example, we have an "intro" CS course that is taught within the context of cognitive science (in Python).

[+] pvnick|11 years ago|reply
One of the classes offered in my major (biochemistry) is "Python Programming for Biology" which is generally the first exposure that most of my peers get to programming, and I tell anyone who will listen how important that class is. Especially in the sciences, Python has a plethora of scientific libraries and great resources to do just about anything that a non-career coder would need. Except in computational chemistry everyone's stuck with ancient libraries, and I recently met an anarcho-capitalist grad student doing all his research in Fortran. Cool guy.
[+] david_b|11 years ago|reply
OT: Since I don't have permissions for an Ask-type post I'll do this here. The lines in this thread break extremely 'late' (http://imgur.com/IzmwWBo), causing me a lot of painful sideways scrolling - my screen only has a 1024x600 resolution, but all other threads I have open look normal (http://imgur.com/Q45ZDQ6). What causes this and how can I get rid of it (FF30 with NoScript and Disconnect)?
[+] ToastyMallows|11 years ago|reply
Same here, Chrome 35, all extensions disabled. Oddly, if I open this page up Incognito (logged out), it works fine.

Even more off topic, horizontal scrolling can be less of a pain if you just hold shift and scroll up and down.

[+] arihant|11 years ago|reply
CMU transitioned from Java to Python when I was an upperclassman there. I'm not sure what other similar places do, but CMU splits introductory courses into 2 parts - 110, 112. 110 is the basic programming with gradual intro to OOP and stuff. 112 is where the datastructures come in - it's a programming primer to implementing datastructures and algorithms, so to speak.

Here is the issue I feel goes unnoticed as most people place out of 110 and never take it - CMU moved both courses to Python. While this helped 110 in a way by making it more accessible, it also resulted in people getting out of 110 with far less OOP principles than they did before. On the other hand, python works great in 112 because you spend more time building datastructures rather than running into the wall with Java OOP layers over and over. It's also cleaner so how a datastructure works becomes more transparent. But since the curriculum assumes OOP mastery from that point on, with no software engineering course required - I always wonder if replacing Java from 110 (a course for people with no coding background) was a mistake.

They put the transition to vote and Python won very clearly. But I always wished they continued 110 in Java (or shifted to Scheme, or anything that follows a stricter regime than python - so one gets comfortable with one way of abstracting problems, be it OOP or Functional) and taught 112 with Python. It probably isn't worth even discussing given how few CS majors take the course, but it always makes me wonder why we needed same language for both courses.

[+] krisdol|11 years ago|reply
At my university, Python was primarily introduced when teaching certain concepts: scripting & untyped programming, web application development, and deeper diving into list comprehension functions. It was not the first language taught in CS, but many were exposed to it. That said, it was the first language taught in non-CS/non-major courses, and I imagine several other non-CS/Engineering majors were introduced to the language later in their academic career.
[+] chatmasta|11 years ago|reply
Yale teaches CPSC 112 (CS non majors) in Java. Or at least, they used to. I think I heard this term they switched to Python. I would say that was a wholly good move. The only downside is that CS majors who take 112, and might prefer to learn Java in a class but Python on their own, do not get exposed to Java in any part of the curriculum.

The "introduction to CS" course, CPSC 201, is taught in MIT Scheme. It's interesting because for CS majors, the first class is functional programming. A sizeable minority (including myself) skip that class though, since it's only offered in the fall. I chose to skip it because I started the major late, already had programming experience, and Scheme isn't actually used outside of education. From what I gather, I missed out on some valuable lessons in simulating circuits and binary logic. My knowledge there is still weak.

After that course, the rest of the core curriculum is taught in C. Scripting languages like Python/Perl/Ruby, you are encouraged to learn on your own, and will often help in assignments. But they aren't explicitly taught as the focus of any course.

I absolutely hated some of my programming assignments in C, but I think learning systems programming in such a low level language is timelessly valuable and makes picking up new, higher level languages significantly easier, since you already know the tradeoffs of the underlying data structures and algorithms. For example, if I had not been exposed to pointers, I would not understand the difference in Python between "is" and "==" when comparing strings. In general I think learning c is a valuable albeit masochistic move.