Python Bumps Off Java As Top Learning Language
itwbennett writes: Python has surpassed Java as the top language used to introduce U.S. students to programming and computer science, according to a recent survey posted by the Association for Computing Machinery (ACM). Eight of the top 10 computer science departments now use Python to teach coding, as well as 27 of the top 39 schools, indicating that it is the most popular language for teaching introductory computer science courses, according to Philip Guo, a computer science researcher who compiled the survey for ACM."
could have been worse, it could have been javascript
2.x or 3.x?
Finding God in a Dog
I can't wait for this generation to saturate the industry. Fewer bugs, better features, from less nonsense to code programs with. They might even be better as people, with clearer heads. Python might even help you think more clearly.
"Top Learning Language" ...OR... "Top Teaching Language"?
Do we have some great metrics as to how well people taught in Python actually *learn*? You know, for things like memory allocation, pointers, and so on?
If you didn't want to learn programming languages, why are you taking computer science courses?
If you're being force-fed anyways, I think python would be much easier to stomach than java for introductory courses. And it would be much easier to grade (if grading consisted of more than "did it output correctly") since introductory students aren't exactly known for their exceptional code organization and formatting skills.
Lots of people hate the whitespace block-delimiting, but I think Python is *way* better than Java for beginning programming classes.
I've seen the transition my alma mater made, between Modula-2 and Java. Modula-2 is trivial to pick up for anybody who cut their teeth on Turbo Pascal or Delphi, and "hello world" is quite easy to explain to anybody otherwise unfamiliar with programming. Try repeating that trick with Java's equivalent, and you'll understand why first-year dropout rates skyrocketed upon the switch. Anyway, Python has some nice goodies in the language which lends itself nicely to teaching both OO, and functional styles in the one language.
I've even seen this in non-IT specialties; at Imperial College here in London, the newbies learn Python (stands to reason, because it's the weapon of choice for many scientists, especially physicists). King's College, OTOH force their first-years to take a unit of Fortran, which actually manages to be about fifty times worse than any other language I've attempted to use.
The steepness of the learning curve is critical AFAICT -- you don't want to spoon-feed kids, but you don't want to crush them in their first two weeks at college either.
now I guess python will be forced fed to people who don't want it
That seems like a silly objection. It is not practical for a teacher to let each kid choose their own language, nor are the kids knowledgeable enough to choose. I don't see any big organizations pushing Python the way that Sun was hyping Java back in the late 1990s.
At my kids' school, they start teaching programming in 4th grade, using Scratch, and move to Python in 6th grade. It seems to work well.
java was only "the most popular" because it was force fed to people who didn't want it.
I don't think you understand how schools and their curriculae work. Nobody is holding a gun to the collective and independently-operated heads of CS departments to demand which language they use for beginner courses.
Java was historically chosen because it was a safe option; used widely in industry, decent documentation and tools, it supports good programming practices, and it provides reasonably powerful options while being relatively beginner friendly. Java largely replaced C and C++, which are not beginner friendly.
Computing science is not about programming, but programming is often used as a tool in computing science and they therefore (rightfully) have you take programming courses before going into the more theoretical material.
It doesn't have pointers, but it does have references - which are basically pointers without arithmetic. In fact, in Python, everything in a reference (even primitive types like int are reference types). This is sufficient to explain the core notion of indirection, and data structures built on that notion, like linked lists or binary trees.
I'm a C++ programmer by trade but there's no way I'd wish that language on a student
Agreed. Its not a learning language.
I only wish Python would allow stricter interface constructs...
I only wish python didn't have semantic whitespace. That's it. Otherwise i like it just fine.
I want the compiler/IDE/whatever to pretty-print and reformat my code to reflect program semantics, not have me spend my time formatting it to DEFINE program semantics.
A programming language that can have its code be destroyed by copy-paste / email / web-forum formatting mangling is simply idiotic.
Python isn't a bad first language. It has all the important advanced concepts - objects, dictionaries, closures, and threads. The syntax is reasonable. Some people are bothered by the forced indentation, but for new programmers, it will seem natural.
Most of the problems with Python are performance related. They come from obscure features of the language, such as the ability to do "getattr" and "setattr" on almost anything, including objects running in another thread. So everything has to be a dictionary. (This is sometimes called the Guido von Rossum Memorial Boat Anchor.) PyPy is struggling hard to overcome that, with some success. (The optimization approach is "oh, no, program did Obscure Awful Thing which could invalidate running code" - abandon compiled JIT code, shift to backup interpreter, flush JIT code cache, execute Obscure Awful Thing, wait for control to leave area of Obscure Awful Thing while in backup interpreter, rerun JIT compiler, resume running compiled code.)
C is very beginner friendly in my opinion. It was my first non-BASIC language. Learning C you learn how those bits and bytes work and how shit gets done. The paradigm is old but not obsolete.
But yes, Python is a great choice. My only gripe is the use of indentation instead of curly brackets to mark blocks.
Back in 2001 I was attending Minnesota State University Mankato. The CS program there did all of the introductory programming courses in Python. A year or two prior to my enrollment all the intro classes were taught in Java. The profs found that students would get hung up on java syntax when their goal was to teach them basic programming concepts so they switched to Python. Courses in Python only lasted for a couple semesters. After that the rest of the curriculum was primarily taught in Java. I think that Python accomplished the CS department's goal quite well.
Our bugs are smarter than your test scripts.
You attribute the mistakes of idiots to their language of choice? What does that say about your ability to judge the merits of technical people you work with?
Yeah, because the concepts of C# cannot be aplied to any other language like Java or Python.
And for that reason python is good for a first course, as it forces the students to indent. I am tired of lazy students that don't indent, and then complain why their code doesn't seem to follow the intended flow. It is hard to teach good habits and practices. And any help, specially from the programming languages, is welcome.
That's rubbish. Most of the major platforms have had Java ported to them. Including various obscure systems is ludicrous. If I want a program that I'm almost guaranteed will run without recompile on Linux, Windows, BSD and even many mainframes, then Java remains the best solution. I'm not saying, from a programming perspective, that it's all that great, but from a platform neutral perspective for most of the systems that a programmer will encounter, it remains the best.
Have fun running an x86-64 Linux binary natively on a Windows 8 machine. I can. however, write a Java program that I can almost guarantee will in fact run on x64 Linux or Windows.
The world's burning. Moped Jesus spotted on I50. Details at 11.
Have you ever been fooled by incorrect indentation that didn't compile the way it looked?
Nope. My editor takes care of indentation for me, in every common language except Python, and when I have to deal with a batch of code written by someone else, I run it through indent(1) first. So, in fact, it's just the opposite: when the indentation doesn't match what I expect, I know there's an actual problem in the code!
With Python, on the other hand, I'm actually more likely to have an error in the indenting, because there's no easy way to see how many blocks I'm terminating when I outdent by an arbitrary amount. Which is a real PITA when you're refactoring.
Of course, things may be different if you're using crappy tools. But professionals shouldn't be using crappy tools.
Brackets, begin..end, and semicolons are crutches for compiler writers not programmers.
No, they're tools to make my job easier. Whatever the historical reason for them may be, they benefit the programmer! They make me more productive.
Now, I'll grant that Python is a remarkably good language despite its horrible flaw of relying on indentation. And many of its good features also make me more productive. But that doesn't mean that relying on the indentation isn't a horrible flaw.