Live data from Hacker News

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

cacm.acm.org

241–250 of 375 posts

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

#241

Earlier quoted context omitted.

...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. I'm curious - would the group be less important if they were less likely to be female/non-asian minority? I get this impression from your text, though you don't actually state it explicitly. As a result I'm curious what your actual view is…

English isn't very good at expressing set logic, and I'm no mathematician :) You can delete this sentence -- These students are more likely to be female or from underrepresented minority groups. -- and the meaning of the previous sentence remains unchanged. The key point is that CS0 is important for attracting people who didn't have prior background in computing and thus could have a latent interest in CS that would…

(argh can't reply to replies) -- @yummyfajitas -- no i don't think it would be fundamentally different, since the mission would still be to bring out the most of people's natural potential and interest in a subject, to kindle a spark that might have otherwise been unlit due to lack of early exposure.

[Edit: I'm not eloquent enough to make a convincing case at 2:20am, but I don't think that extra sentence was merely a curious non-sequitur, even if it could be cut without modifying the point of that paragraph. I can list out tons of points/counterpoints in my head ("what about redheaded people with thin left eyebrows? why not mention them? would that be a non-sequitur? what about the historical and socioeconomic implications behind this demographic group and its relationship to technological access? ..."), but I don't have enough expertise to give this topic a proper treatment. So I'll leave this thread by recommending the following two books:

http://www.amazon.com/Unlocking-Clubhouse-Computing-Jane-Mar...

http://www.amazon.com/Stuck-Shallow-End-Education-Computing/...

]

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

#242

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

At the University of Queensland, Python is used for mech engineering courses. One of the other considerations that I think helped give Python the edge was its simplicity, in that it can be 'programming for non-programmers' and helps a lot of newcomers meet the simple scripting requirements they have without needing to understand more complex programming concepts.

Secondly, it makes for an easy transition from Python to Matlab, and Matlab is used a fair bit throughout UQ's Mechanical and Mechatronics departments. They both share very similar syntax (the major issue for most mech engineers, who deal with little more than loops, is that Python is 0-indexed whereas Matlab is 1-indexed).

The above makes Python a great introductory langauge for non-programmer beginners like mech engineers. It is ridiculously simple and human-readable, and when you're outside an IT/EE department then you don't end up spending excess time explaining the quirks of a language to those who will never care for it. On the other hand, it still gives more than enough rope for those that do end up wanting to run with it and they can end up doing some pretty fancy stuff with it.

Does Monash align there in that it's used in the non-IT related technical degrees?

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

#243
post #102
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.

No reason to down vote because I prefer PHP for web development. In python you have to learn an entire framework just to do web stuff. PHP everything is right there is that simple.

In PHP you should learn a framework to do web development. For example, my websites were a mess until I used smarty.

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

#244

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

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

#245

Earlier quoted context omitted.

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

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.

I think a strict language in the ML family would even be nicer, because students wouldn't have to reason about laziness.

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

#246
post #132

Earlier quoted context omitted.

you should check out flask. there isn't much to learn to get going... http://flask.pocoo.org/ from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run()

that would be very confusing to understand for a beginner. PHP you can write right in a html file and see it just by refreshing the page.

You can do this in Python too, if you wanted to:

http://modpython.org/live/mod_python-3.3.1/doc-html/pyapi-ps...

But it's not a very good architecture, in the meanwhile we had better approaches, such as MVC and MVVM.

Anyway, CS is not web programming, but should focus on the fundamentals of computer science, for which there are far better languages than PHP.

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

#247

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…

It depends who you are. People who have the recursion muscle tend not to appreciate what an obstacle it is for people without it.

Basic use of scheme requires you to think recursively. If you have that, scheme gives enormous power for a small investment of learning, thinking and typing. If you don't have that, you need to deal with that before you can use scheme.

You could take a group of elite students with a math/physics background and have some confidence that their grounding in mathematics and physics will have prepared them, or that it will be a short and healthy jump for them.

But it would be bigger hurdle for other groups. Python is a useful because you can ease people into this kind of thinking. And people who aren't there yet can still get things done.

Regarding SICP, even in early chapters, it requires you to understand maths concepts that wouldn't be available to you even if you were a professionally-employed person returning to to university. The Little Schemer path would be a better intro for groups without that.

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

#248

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

My college programming intro class is C++, which IMO is a total nightmare.

It is not that I don't agree with your point, actually I think It makes perfect sense. Eventually, anyone who considers him/herself as a serious CS student has to get his/her hands dirty with those relative low level languages in order to have a through understanding of what computer really is and in reality how it works.

Ironically, it is this very same reason that makes C++ as a entry point into programming a horrible idea. Because in order to understand it, IMO, a solid understanding of computer architecture is a MUST. Things like how memory is allocated, how call stack works, and why IO interfaces looks like it is now are unrealistically hard to take in a single course for those new comers with definitely zero programming knowledge, who probably would scratch their head out all night wondering why the following code snippet doesn't work (which wasn't valid back then in my freshman year, don't know whether it is valid now):

http://stackoverflow.com/questions/737240/c-c-array-size-at-...

And as it is a entry level course, usually a lot of details are skipped which makes it even more confusing. Telling from my personal experience, it is really frustrating that I once want to quit programming for good.

Luckily enough, I got to know Python at that time. In relatively short period of time, I could come up with a simple web crawler to scrap and download movie torrent files from the web. This is important to me that for the first time I realize I could do something both INTERESTING and USEFUL with programming language, which in turn gives me the motivation to go back and look at those lessons I run away from.

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

#249
I know, I know, what I'm about to say is just an artifact of the Language Wars and will cost me karma. I can't help myself.

We should not be teaching impressionable students that whitespace has semantic significance. This is a fundamental design flaw of Python, and it's just a Bad Idea.

Sorry, Guido.

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

#250

Earlier quoted context omitted.

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, discr…

Telling me that the class I think of as "new" has been around that long makes me feel old. Point taken that they're just fundamentally different classes, not just the same class using a different language medium. 6.001 had some OOP in there too, actually (you ended up building your own OOP impl in Scheme; it was kinda neat), but otherwise I agree with your characterization of SICP. I definitely see the value of 6.01'…

I'm also an MIT grad (class of 1992). I took 6.001 back in the Scheme days. I loved it, and have found that the lessons learned in that class have stayed with me for a very long time. I now teach professional programming classes, and it's a rare lecture that doesn't use some of what I talked about there.

The irony is that I teach a lot of Python programming classes. And despite that, and my love of Python, I think it's a shame that they no longer use Lisp (or Scheme, or Clojure) for the equivalent of 6.001.

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. And Python is my strong recommendation for everyone's first language, because it's so easy to get into.

But there are some things that are just easier to understand in Lisp than in other languages. Implementing Lisp in Lisp (metacircular evaluator) is a fabulous way to think about programming languages that is harder in Python than in Lisp. (Not impossible, but harder.) Lisp allowed us to think about programming in all sorts of new ways, because it handled so many of those paradigms so well.

So I still think that the intro CS class should be in a form of Lisp, because it opens your mind up to possibilities. But if you're not going to go that route, then Python is a terrific first language, and I'm quite happy to see it getting the attention it deserves.

Post reply on HN