Which programming language should I learn?

The most difficult choice for someone who is new to programming is what language to learn.

You are in the worst position to choose for yourself because you don’t have enough knowledge yet to assess the pros and cons.

If you ask people that do know, you will get tons of different responses.

Most important things:

  • There are enough learning materials.
  • The community is active and helpful to newcomers.
  • The language is difficult enough to challenge you, but easy enough not to discourage you.

Why it doesn’t matter:

  • Over the course of the next few years you will learn many languages (if you plan on being any good).
  • People say that if you pick an easy language (Python or Javascript) you will not learn the important concepts. This can be true, but only if you stop learning a few months in.
  • You’re going to do it wrong in the beginning no matter what language you pick.

The most important thing when learning to program is staying motivated. The easiest way to stay motivated is to work on projects that you think are cool and actually complete them. If you pick a language that is too hard, you are likely to give up in frustration. Nothing is stopping you from learning the harder languages after you pick up the basics of the easier ones.

Pros and Cons of Specific Languages

In order of best to worst languages to learn as your first IMHO.

Pros: Beginner friendly, lots of community support for newbies, lots of libraries to get you going quickly
Cons: If you don’t continually push yourself to learn, you can miss out on a lot of important computer science concepts that Python abstracts away for you.

Pros: Very easy to start with, lots of libraries and code in the wild for you to study.
Cons: Community is full of non-programmers, you will pick up bad habits,

Pros: Beautiful language, great books for intermediate level study
Cons: Small community, not very beginner friendly, few books that start at the ultra-noob level.

Pros: Will force you to learn all of the difficult concepts.
Cons: It will be hard. There are many traps and pitfalls that await you.

Pros: Huge community and libraries
Cons: A sizable portion of people who only know Java (The perils of Java schools), forces you into a single way of thinking about programming. I strongly recommend staying away from Java as a first language.

More Tips

You should spend about a year getting to know your first language. After that you will want to start learning other languages. In my opinion you can’t call yourself a programmer until you are at least familiar with 3 languages. Meaning that you have written a small/medium sized program in each (~3,000 lines each).

But that’s not all. Programming isn’t really about languages at all! Programming is about being familiar with data structures, algorithms and other fundamental computer science concepts and how they apply to solving real problems. In the end it’s all about experience, build applications and solve problems and eventually you will look back on what you have done and say, “Now I think I’m a programmer”.

But wait! That’s not all! Next year you will look back on the year before and say, “I had absolutely no idea what I was doing last year.” The year after you’ll say the same, and the year after that, and the year after that, and so on. Learning to program is a never-ending process that will keep challenging you until you decide to hang up your hat.

Also read Tips for a New Programmer.


4 thoughts on “Which programming language should I learn?

  1. Python was the language that got me to break through my preconceptions about programming and start building little projects to learn different concepts. OOP took me forever to get, but wanting to use the sprite system in Pygame motivated me and gave me a lot of example code. I always recommend Python as the best starting language.

    • Python is a great language all around. It is simple to pick up yet still allows you to build real projects. Probably the best thing for beginners is that Python is a multi-paradigm language so they can learn about many different concepts from OOP to functional programming all in the same language.

  2. If I were starting to learn a new programming language, I would pick a JVM language, Clojure or Scala, or Ruby. I don’t know enough about Erlang to know how difficult it is to use.

    As to learning C, the third production language I learned after PL/I and Bliss, it is a language more for machine architecture than anything else, although it does have good string handling. Its pitfalls today would be not many application programmers would have cause to use it.

    I agree with everything you said about Python. Unless the GIL problem is addressed, I don’t think Python is going to fare well in a concurrent environment.

    As to me, I started learning Clojure a few months ago (May). It is interesting, and I have a small production applet running.

    • I think learning Clojure and/or Scala is a great idea, but not necessarily for a new programmer. I think the most important thing to have in a language, for the beginner, is plentiful learning resources. A new programmer really has to learn the fundamentals of programming, not a language. So whatever language they start with should have lots of educational material targeted at beginners and a community that is tolerant of them.

      Clojure is an interesting language, especially its focus on immutability and that sweet sequence abstraction. I haven’t played with the language much at all, but I have watched a lot of Rich’s videos. I’ve been planning to incorporate some of the awesome ideas in Clojure into my own language.

      As for the GIL in Python, PyPy may be getting rid of that:

      Global Interpreter Lock, or how to kill it

Comments are closed.