“Five million, bitches”
—my new reply every time someone mentions Ruby
A friend of mine is learning to program, and how to learn a programming language came up.
The issue is that there is a lot of people who are non-programmers and have taken programming classes and not learned to program. When I was a kid, those languages were BASIC, Logo, and Karel the Robot, now they are things like C#, Java, and Ruby. Still the same problem rears its ugly head.
Recommending what you know
The big thing that bothers me is, too often, I think people recommend what they know already or are are learning themselves. Ignore these people, they’re idiots.
The first language I ever became an expert in was Pascal. It’s a highly structured language that was great for learning. The last time I coded in Pascal was in 1991 in order to prove computationally that some differential equation doesn’t approach e^x but rather the curve e^x-1. It’s not a forgiving language to be programming in today, the popularity of Delphi notwithstanding. I’m sorry, if you want to learn a language with OOP bolted on, you might as well put the C gun in your mouth, pull the trigger, and blow out your brain with C++.
I don’t code in Pascal anymore. And I don’t plan to.
(I’m sure there is someone out there recommending people learn Erlang as a first language. I’d be offended, but I figure they’ll be dismissed because they long ago lost the ability to speak coherently.)
Filing for divorce
One time at a McDonald’s in San Jose, I watched a guy talk to about six different people in their native language. Asking him on how to learn a language is futile. He is so far removed from the “learning” stage that he forgot. He picks up languages as easily as I pick up new cuss words.
It occurs to me:
We’re that guy.
It’s hard for a programmer to give good advice on what language to learn because we’re so divorced from the learning part that we don’t know the answer ourselves.
Answering by analogy
But maybe that incident clues us in to the answer. If words have meaning through paradigm the reason we call it a programming language is because it is a language.
Programming languages are a lot like real languages—maybe the best way to learn a language can be derived from how we learn real languages. You know you can learn it in a classroom, but immersion is a much faster way to learn.
The best way to learn to program is to have an itch that needs scratching.
If you have a need to program, then you will immerse yourself and learn fast. If you learn in a class, oftentimes it’s a lot like those years spent diagramming sentence grammar…
or memorizing declensions…
Sure, my understanding of the future-perfect tense has helped me write marginally better, but you’ll learn much faster and better if you really need to speak/write/use a language.
I believe the fundamental problem with most programming courses is that they’re more an exercise in “look how smart the teacher is” and the theory behind the language rather than actually learning the language. You can’t get more than ten pages into an introductory book on programming before being hit by a wall of terms like “object-oriented” “run-time” and “compiler.” WTF?
When I look back at how the best programmers I know learned to program, I remember the people who had staked out their own workstations in Caltech’s Jorgensen undergraduate computer lab.
Not that I’d try to take their spot—you could smell the stench of stale sweat left over from weeks of working and sleeping at their workstations with nary a visit to the shower.
Now that is language immersion.
What language to learn
I don’t think that PHP is the best language to be learning programming with—if only because it makes no sense as a first language. It’s a haphazard language that was really designed to be the easiest second language to be picked up If you already know programming and want the shortest distance to apply that knowledge to the web.
But as a first language? Hell, the language confuses the heck out of me!
However, there was a recent estimate that there are 5 million PHP developers worldwide. If true, that’s an impressive number. It makes PHP one of the most popular languages in the world, and more so, because it is a language that takes a back seat to Java and C when taught in universities.
But why are there 5 million PHP developers worldwide?
I believe it’s because the web is all about immersion. You have an itch (making a website) that you want scratched, and PHP makes that scratching pretty darn easy—you can do just about anything most people can think to do on the web for about $10 a month to a LAMP hosting service and a couple good open source downloads—no other language comes close.
Then again, there are 5 million PHP developers out there. If you want a job, learning PHP is not enough of a unique experience to warrant a set of experiences that will be valued. And someone telling me that they “know PHP” doesn’t tell me anything other than that person has learned what mysql_connect and mysql_query do.
So I told my friend she should learn Python.