which programming language? all of them

September 16th, 2007

Which programming language should I learn?

It's a question that comes up a lot, especially by novices who are trying to get into programming. It's a good question, but I'm not sure if it's the *right* question. It is a bit like walking into a tool shed and asking which tool should I use? To which the answer is... all the ones you need.

Peter Norvig wrote an opinion about novice programming a few years ago, called Teach Yourself Programming in Ten Years. He argued that a lot of people underestimate what it is to learn programming, judging by how many books there are on the subject of learning it quickly. And he said that people should realize it takes long and not be in such a hurry.

I find myself past the 10 year mark myself, since I started some time in junior high. Or maybe even elementary if you count modifying integer variables in Basic to make the gorilla throw a banana and cause a bigger explosion (and MsDos hackers here?), but without any interest in learning to code at the time.

At this point you might be tempted to ask... so did you? Well, I can't say that I know how, but I know enough to get by. I know enough to code the kind of things I have use for. And I never set out to accomplish more than that.

But returning to the question, whatever language you choose, it will be your first language. But it won't be the only language. There are people who have spent 10 years writing nothing but Excel macros, and never touched another programming language. But if you're asking this question, presumably you're not willing to limit yourself to Excel macros. And unless you actually spend decades writing the same kind of applications you will definitely touch multiple languages. So whichever does or doesn't come first isn't really that important.

In 10+ years I've touched quite a few languages. Aside from Basic, my very first attempts were with Pascal, and a few years later it was Delphi, writing silly desktop applications, in particular encryption software. (Along with a friend we made up a mock company called MicroProgz, and inexplicably, the website has somehow survived to this date. :proud: ) In college, they were big on Java, which I didn't particularly love from the start. But since that was the language du jour, I saw quite a bit of it; gui, databases, threading, networking. The gui was the worst by far. We also built mock applications for mock businesses for assignments, so that's the first time I encountered SQL. Around this time I was into web programming, so I started playing with PHP on my own. I also wanted to get into C++, which was sort of the "real" language you were supposed to know, or that was my impression at least. I took a course in it (through which I also had a modest introduction to C) and ever since... I've never really needed it. My college thesis introduced yet another language: Python. I took to it immediately, it was incredibly... readable. Since then I've also been introduced to Haskell at university and played a bit with Ruby on the side. And inevitably, as a linux user I've also had the opportunity to use Bash for all kinds of small things. I even took a stab at Perl a few weeks ago, and ran for the hills over the gruesome syntax.

So it's not so much which language to learn? as it is what do I want to do right now? Eventually you will probably see them all. Or many of them. And what's more, the tools of today are not the tools of tomorrow. Fortran, Cobol, Smalltalk, Algol.. these were the languages preceding my time. Perhaps I'll find some historical interest in some of them one day, but for the moment I have no use for them. In 1995 Java was a new thing, today it's perhaps the most used language out there. C# arrived in 2001, I haven't really had the opportunity to use it yet, but it's definitely making inroads. The thing is that whichever language you choose it becomes a means to accomplish something today, yes, but in the long run it becomes a stepping stone to another language you'll need in the future.

Of course, jack of all trades, master of none holds true just the same. Like a craftsman needs years to master his tools, achieving excellence takes a long time. Although I've encountered many languages (and I expect to see more in the future), I don't know any of them inside out. But... is that really a problem? There isn't a perfect language, each one teaches you to think about code in a different way. And that's really more important than any single language. Unavoidably, there are regrets that I can do X in language A, why can't I also do Y as in language B argh. But you gain something from all these different styles and methods. Your thinking becomes clearer, your code gets better.

:: random entries in this category ::

3 Responses to "which programming language? all of them"

  1. erik says:

    Hovering over this entry as I landed on this page:

    C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.
    Bjarne Stroustrup

    fun :D

  2. numerodix says:

    Oh yes, it's true. And Bjarne created c++, so he knows what he's talking about. :D

  3. sinx says:

    D looks very reasonable ;) . Talking about C++ it's good for large and complex aplications, where speed is prio ;). For other i think pyython is good enought ;), for text extraction i would prefer perl (no, way! the syntax isn't creapy ;)). Shellscripting is nce for writing short programs which helps you administer systems, on more complex things it's too slow and hasn't got floats, so it's in many cases useless. Something about PHP - strange for me, hasn't got many features and writing object oriented code is not so easy as it is in Python :(. I've been writing something in Delphi/Pascal - it has got strange syntax (looks just a little bit outdated - i prefere braces {} instead BEGIN-END). It's probably the end of my comment.