Live data from Hacker News

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

cacm.acm.org

81–90 of 375 posts

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

#81

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…

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.

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

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

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

#83
post #33

Python for web development is confusing as a beginner. I would go with PHP since everything is not magic and you can see things right away.

> PHP since everything is not magic

PHP is all about magic.That's why it is popular at first place. And its popularity is an accident we'll have to live with for decades,given the amount of PHP code deployed outthere.

But if you are meant to be a CS student,you need a proper multipurpose language.You can do almost anything in python,from 3D games,to complex scientific computation.

PHP is merely a templating language,with enough good syntax to be bearable for advanced programmers.

PHP popularity is quite unfortunate if you ask me.Not because it is easy to start with or because it's a templating language.But because it could have been way better regardless of its execution model.

It could have been cleaner and more elegant if its original author had a clue about how to design languages.

most of PHP syntax is due to Rasmus inability to write a sophisticated parser.

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

#84
post #39

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?

Python has a way larger community/ecosystem outside of web development. Ruby pretty much only has Rails.

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

#85

Earlier quoted context omitted.

Why do you think the flavor of Python taught matters? I would say that compared to learning how to write and understand a small program, the difference between Python 2.x and Python 3.x is trivial. (I'm talking about learning the language; for a large Python 2.x code base, the transition to 3.x is likely to have unclear payoff.)

I think it's important teach what's relevant in the current day, every likes to parrot the "Python 3 has no support" line but it's simply not true[1]. The developers have said multiple times there will be no 2.8 and the 2.7 line will only receive security fixes. Python 3 is the future of Python and not teaching it to students would be a disservice to them. [1]: https://python3wos.appspot.com/

Sure. My point is that nearly everything you learn about writing a program in 2.x is relevant to writing a program in 3.x.

You do have to keep track of whether print is a statement or a function or how literals map onto types, and some libraries are imported using different names and some APIs have changed a bit, but if you understand all that jargon, it's not that big a deal (I'll repeat my disclaimer here about transitioning a significant code base being a different thing than managing the differences).

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

#86
post #7

Earlier quoted context omitted.

Unless your university is really weird, I can guarantee you will learn many more languages than just the intro language. When I got my computer engineering degree in the early 2000's I was exposed to C, C++, Java, Scheme & Lisp, SPARC & 68k assembly, and even a bit of Python. Learning Python as the intro language instead of C++ would have been much nicer for folks who were completely green to programming.

I would hope that no one in a freshman CS program is "completely green to programming".

I assure you there are many that are. My first year at uni was filled with classmates that could barely operate a computer, there were many like myself that already had a good handle on programming and cs fundamentals but we weren't the dominant group. Most of the greens dropped out/switched majors after a year once they realized how hard it was. I hear from a lot of parents equating spending a ton of time on a computer with being tech savvy and a natural fit for computer science, this may be why most of them tried it out.

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

#87
post #7

Earlier quoted context omitted.

Unless your university is really weird, I can guarantee you will learn many more languages than just the intro language. When I got my computer engineering degree in the early 2000's I was exposed to C, C++, Java, Scheme & Lisp, SPARC & 68k assembly, and even a bit of Python. Learning Python as the intro language instead of C++ would have been much nicer for folks who were completely green to programming.

I would hope that no one in a freshman CS program is "completely green to programming".

Seriously? What do you think it means to be a freshman? I am getting seriously tired of this attitude in the software community that you're only a legitimate programmer if you've been doing it since you were in diapers.

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

#88
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'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 same time.

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

#89
post #33

Python for web development is confusing as a beginner. I would go with PHP since everything is not magic and you can see things right away.

They're majoring in CS not Web Development. PHP doesn't really do anything other than web dev which makes it a poor fit for a general purpose CS curriculum.

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

#90
post #53

Earlier quoted context omitted.

What I took from the Coursera version of the UW course was that SML gets out of the way and let Grossman cover the material at a higher level of abstraction than language syntax. On the other hand, his Programming Languages class is not intended to be introductory. I won't say anything about Python.

I also thought SML worked quite well at that level, but I think the initial negativity on the forums about an unknown language reflected what to expect from a larger portion of 101 students. > I won't say anything about Python. I will try to learn from your wisdom.

I was in the second iteration. There were still plenty of people calling for a pony and M&M's for breakfast. I can only imagine the first iteration.

SML worked well because it's more or less dead. All the documentation is basically on a single unsexy website. There aren't a bunch of blogs cluttering up Google results or even much on StackOverflow. Racket also has a single Canonical source and good clear documentation and not much noise.

I can't say the same about the Ruby ecosystem, where I saw this crazy construct in lieu of a call to super posted in a forum question. The TA asked how the person arrived at it. I knew the answer because I had landed at the same StackOverflow page from Google earlier in the week. Which is not to knock Ruby. I understand why people describe it as beautiful.

Post reply on HN