I'm struggling with figuring out which programming language to teach students would provide the most effective learning experience.
It's easy to find tons of statistics showing how Java is the most popular language with tons of community and books, etc. That, however, doesn't say very much about the learning experience of the student at all, or what the students will come away with.
I found the following from a respected hacker in the community, for example:
"For example, if your company wants to write some software, it might seem a prudent choice to write it in Java. But when you choose a language, you're also choosing a community. The programmers you'll be able to hire to work on a Java project won't be as smart as the ones you could get to work on a project written in Python. And the quality of your hackers probably matters more than the language you choose. Though, frankly, the fact that good hackers prefer Python to Java should tell you something about the relative merits of those languages.
"Business types prefer the most popular languages because they view languages as standards. They don't want to bet the company on Betamax. The thing about languages, though, is that they're not just standards. If you have to move bits over a network, by all means use TCP/IP. But a programming language isn't just a format. A programming language is a medium of expression.
"I've read that Java has just overtaken Cobol as the most popular language. As a standard, you couldn't wish for more. But as a medium of expression, you could do a lot better. Of all the great programmers I can think of, I know of only one who would voluntarily program in Java. And of all the great programmers I can think of who don't work for Sun, on Java, I know of zero." (Great Hackers, Paul Graham, 2004)
So essentially, the idea here is that if you choose a language based on whether it's the popular "standard", you've lost sight of the fact that programming is very much an art, and the language is a medium of expression — why would anyone wish upon students the torture of a lesser blub language?
The better language is Python, according to the best hackers in the community known to Graham (and he knows plenty, given what he does as his "day job" now).
Consider this, also from a respected hacker in the community:
Here the essential idea, I think, is that Java can help you build stuff, but it doesn't help you very much in learning to think and express your thoughts programmatically. Being good at putting together code in Java that uses what other people have written doesn't help you solve problems better in a hacking or engineering kind of way."If you don't know any computer languages, I recommend starting with Python. It is cleanly designed, well documented, and relatively kind to beginners. Despite being a good first language, it is not just a toy; it is very powerful and flexible and well suited for large projects."I used to recommend Java as a good language to learn early, but this critique has changed my mind (search for “The Pitfalls of Java as a First Programming Language” within it). A hacker cannot, as they devastatingly put it “approach problem-solving like a plumber in a hardware store”; you have to know what the components actually do." (How To Become A Hacker, Eric S. Raymond, 2008)
It gets worse for Java according to this critique, as ESR mentioned in the quote above, which details failings of teaching Java at the University undergrad level.
But I am interested in this question in terms of high school students. The difference for high schools is that they may offer an AP or IB program, which may mandate the use of Java for their exams. In that case, of course for the sake of writing an exam, Java must be taught.
Looking longer term, however, teaching Java as a first language in high school raises lots of questions (some already answered above).