I’ve written before about Python being a popular - if not the top - choice of programming languages for beginners. Many people cite Python as the best language to start with thanks to its low barrier to entry, flexible syntax and the fact that it teaches good programming fundamentals. If the anecdotal evidence wasn’t enough, this week we got some harder numbers to back up Python’s claim to the title of best start programming language.
Philip Guo, an assistant professor of computer science at the University of Rochester, wrote on the Communications of the ACM blog about a study he recently undertook to quantify just how popular Python has become as a teaching language at the college level. Guo looked at the course offerings at the top 39 college computer science departments in the U.S., as ranked by U.S. News & World Report. He tallied up which languages were offered by these schools in introductory programming courses to both CS and non-CS majors.
Guo found that 27 out 39 of the schools (69%) use Python in their introductory programming courses. More specifically, 8 of the top 10 programs, including CMU, MIT and Caltech, use Python as a starting language. Java, a traditionally popular choice as a first language, is a relatively close second, used by 22 of the 39 programs (56%). The other languages that these schools offer beginners (C, C++, Matlab, Scheme and Scratch) lag much further behind.
Not surprisingly, Guo’s work quickly generated a lot of reaction from the developer community. Many people, both educators and students, praised the choice of Python for beginners for many of the same reasons that have been shared in the past.
“The move to Python gained us, among other things, the freedom not to have to explain Java's generics and access modifiers. We used to spend too much time on syntax and other details… that we should have been spending on data structures and algorithms.” candeira
“Python is so perfect for learning on. No special characters for variables, forced neat code due to indentation rules, and its object orientated so you can have that fun discussion.” farking_pko
“Python is easier to understand and get into. And Python has some amazing features that you want, such as first-class functions. And it's a real-world language, which you can't say about Clojure, even with its growing popularity.” reuven
Others, however, felt the results were skewed by Guo’s choice to include introductory programming courses offered to non-CS majors, referred to as “CS0” classes, as opposed to “CS1” classes which are the introductory courses for those choosing to major in computer science.
“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.” blahedo
Guo himself acknowledged this hybrid approach in his blog post. He also joined the discussion on Hacker News to defend his choice of not differentiating between what language CS and non-CS majors learn first, by noting that some CS majors will take CS0 first if they don’t feel ready for CS1. He also argued 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.” Guo wrote that he doesn’t plan redo his analysis separately for CS and non-CS majors.
Given that so many non-programmers need to be able to do some programming these days, I think Guo’s approach makes sense. However you measure it, though, it’s hard to deny the popularity of Python as a starter programming language. It will be interesting to see if the pro-Python trend continues in the future.
Read more of Phil Johnson's #Tech blog and follow the latest IT news at ITworld. Follow Phil on Twitter at @itwphiljohnson. For the latest IT news, analysis and how-tos, follow ITworld on Twitter and Facebook.