Live data from Hacker News

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

cacm.acm.org

111–120 of 375 posts

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

#111

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

This is about an introductory language. No one is saying CS students shouldn't eventually learn those concepts, but why would you want to bog down an introductory course (with non-CS students, many of which probably haven't written Hello World before) on that material?

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

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

Most Python material that I've seen that is an intro course makes limited use of changing variable [1] values , being written in a mostly-functional style (generally, preferring, at least initially, recursion to iteration to achieve that -- even though recursion is generally the wrong approach in production Python code.)

Using a modern imperative language doesn't prevent you from adding complexity a bit at a time, and -- especially initially -- getting the advantages of teaching things in a functional style.

[1] but not object fields, as objects are taught as containers of mutable state, usually late in the course.

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

#113

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?

> But do you think there's an issue teaching a whitespace-sensitive language as a first language?

No. Most languages are whitespace sensitive, though what whitespace differences matter varies from language to language.

> When students eventually move to Java/JavaScript/C#/Swift/whatever, will this be more difficult?

I doubt it. If anything, the indentation discipline they've learned will make their code in those languages more readable.

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

#114
post #2

a language without types, without extensive research? Then, why not C/D/Pascal. i strongly believe for universities sml/ocaml/haskell or even rust are far better choices. I prefer sml.

> i strongly believe for universities sml/ocaml/haskell or even rust are far better choices. Rust is a horrible choice now , because it hasn't stabilized. When it has stabilized, it may be a suitable choice (at one point, it looked like it would be too large of a language to a be a great intro language, but since then its been getting smaller , so I'm less convinced that it will remain unsuitable for that role.) Pyth…

The computing courses at my university use Haskell in the introductory programming course - apparently it works rather well as a vehicle for exploring algorithms and data structures.

The students move on to Java, C++, Perl, Prolog and others after that; not sure about Python.

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

#115

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 langu…

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 reperto…

> So in my opinion for a beginner Python is more future proof than Ruby

Which is more future proof: Python v2 or Python v3?

I figured that I was least likely to regret Ruby for a green-field data analysis project. So far it's been a delightful experience.

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

#116
post #45
post #6

Earlier quoted context omitted.

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…

Who cares? If I'm a teacher I don't want to have to update material extensively every semester / year because the language is changing rapidly. Three are plenty of good, stable languages to use.

So we should teach the students old stuff because it's easier on the teacher? This isn't history, the tech world is changing daily with new languages and technologies being created. Sticking to one curriculum because it's easier on the teacher is ridiculous.

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

#117
post #47

Earlier quoted context omitted.

mapM_ putStrLn ["hat", "dog", "cat"] I'd say the above is pretty simple if explained after: putStrLn "hello world" You don't really have to go into Monads for this to be understood/used. You can just leave it at "you use functions ending with an M if they do something like print out to the screen or get stuff from a web page".

My first reaction to this was that this was definitely less understandable, but I realized there were two pieces to this. One is banal - mapM_ and putStrLn are not near as simple as `for' and `print' (the latter have English meanings directly). The second piece is interesting: Is something of the sort " " easier to explain to someone who's new to programming than " "? I've always thought the latter was easier to unde…

Right, I think that once the concept is taught of what mapM does/means it will be easier to keep applying than something like a foreach loop.

The reason being that " " is more declarative, whereas the foreach loop is ambiguous. Something we often take for granted is how hard it was at first to come up with what exactly we need to do or mutate inside that loop to build the right result.

If nothing else, there is interesting discussion to be had ;)

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

#118
post #71
post #50

Earlier quoted context omitted.

For reference, the ranking used by the author is from US News & World Report[1]. While it's far from objective, it certainly holds enough merit such that UC Davis being the last school you would attend for CS sounds ridiculous. [1]: http://grad-schools.usnews.rankingsandreviews.com/best-gradu...

You linked to Grad School rankings -- hardly what anyone would consider "beginner programming courses".

Grad school rankings are a proxy for the strength of the professors, grad students (who TA/grade classes), and the overall CS research strength.

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

#119
post #82

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 pe…

I think the intense focus on OOP is a problem, and it is symptomatic of teaching students Java as their first language. Just as if you learn BASIC first you love GOTO, if you learn Java first you love classes and think everything should be a class. What especially concerns me is that some people are interested in whether a program or language is object-oriented, and endeavor to make their programs more object-oriented. Object-oriented programming is a design aesthetic, perhaps one of the most nebulous design aesthetics, and it should not be considered a goal or a dogma but rather a source of inspiration for design. Java is a particularly bad example because Java's brand of OOP conflates encapsulation, data structures, and polymorphism. The languages we'll be seeing in the 2020s and beyond will probably be more sensible about these things. Look at the new languages with the most mind share these days (Go, Rust, Swift) if you want an idea of where the wind is blowing.

The other problem is that the farther you get from being a freshman, the farther you get from understanding which concepts are necessary in an introductory curriculum. As a senior you might say that OOP must be taught to the freshmen because so many freshmen don't get it, as a junior developer you might want the program to teach the standard library, and as a senior developer you might want to teach people about testing. This is all wrong. The most important things to teach freshmen CS students are very simple. Control structures, data structures, references / pointers, and recursion. Never forget that while OOP is warm and fuzzy and makes you feel good, the number one priority of the intro CS courses is to get the freshmen to write programs that work correctly.

Or, since OOP is a design aesthetic, it is only useful once design becomes important. Design is not important for small programs that freshmen write. Let them get off the ground with correct programs, and teach them paradigms once they have enough context to understand them.

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

#120

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

C++ makes it harder to work with functions/lambdas and the memory management makes some easy things much harder (for example, list and string processing)
Post reply on HN