FAQ: What programming language should I learn first?

Python LogoThere are hundreds of different programming languages out there. As a newcomer you can ignore the fact that most of them exist. However, even if we narrow the list to just a dozen mainstream languages, deciding on what programming language to learn first can be a daunting task. You might find yourself asking, should I learn C, C++, Java, C#, or PHP first? If you ask ten programmers this question, you’ll probably hear ten different answers. Here is my take.

Much as with human languages, programming languages are used to communicate. Interestingly they still involve communication between people, whether other programmers will end up reading/modifying/enhancing your code or you’ll do at a later point in time. Unlike natural languages however, programming languages are unequivocally understood by computers, thanks to the aid of interpreters, compilers, and similar types of software.

Depending on the kind of program you’re trying to write, and in which environment you’re working, you’ll find that some programming languages are better suited than others for certain tasks, even if most common programming languages are labelled as being “general purpose”.

For example, if you want to create iPhone and iPad applications, your best bet would be to use Objective-C. For Android smartphones and tablets, in most cases, you’ll need to become accustomed with Java. If you want to build web applications, you’ll want to learn client-side technologies such as HTML, CSS and JavaScript (of those three only JavaScript is an actual programming language, but the other two are necessary nevertheless). For the server-side of your web application, you’ll probably want to learn a language like PHP, Ruby, or Python (all three have frameworks that will help make most web programming tasks easier and less time consuming), rather than a system programming favorite like C. (And of course, one has to mention SQL if you’re interfacing with a relational database).

So should you start your foray into the world of programming languages with JavaScript? What about Objective-C? SQL? My advice is to avoid starting your programming journey with a language that is tailored to a specific environment. This early in the game, your main objective is to learn how to program – and how to reason like a programmer – rather than learning a specific language. Once you have mastered the fundamental concepts with the aid of a general purpose programming language, you can ease into other languages as the need arises, depending on the type of software you’d like to develop.

This is a profession where most of your skills are developed and honed by actually “doing”. If you grasp the fundamentals of programming outright, you can easily pick up a specific language and framework when you need to build iPad applications or whatever else you’d like to create.

A well-rounded programmer will end up learning several programming languages and tools over the course of their career. That said, if you are just starting out, focus on one language first. While this might seem a tad dull on the surface, the good news is that unless you pick a truly exotic programming language, a lot of what you learn will be applicable to other programming languages as well. Remember that at this stage, above all else, you are learning how to communicate your thoughts in precise statements for other programmers to understand (and for the computer to execute).

For this reason, you can’t really go too wrong with any of the “somewhat mainstream”, general purpose programming languages (e.g., C, Java, C#, Perl, Ruby, Python, or Scheme). That said, particularly if you are learning on your own, I’d advise that you go with a language that will make your learning trek easier. In other words, opt for a programming language that is widely used, well documented, and beginner-friendly. You’re looking for one that isn’t overly bureaucratic, doesn’t require you to manage memory directly, or have a deep understanding of mathematics to get started.

As such, my suggestion would be to start with Python, and use it as a tool to learn the general craft of programming. Learning Python is fun, easy, and useful. You’ll be able to use it for a wide array of projects in several environments (scripting, web, scientific research, etc…).

There are a variety of free tutorials on the web, but if you want a more rigorous/systematic/academic introduction, I highly recommend “Python Programming: An Introduction to Computer Science (2nd Edition)” (USA | UK | Canada).

Once you have learned the fundamentals of programming, have a decent command of the Python language, and have gained some experience with practical Python projects, you should be better armed to evaluate and pick up other languages and frameworks based on the projects you intend to develop or contribute to in the future (Open Source projects are awesome for this purpose).

Get more stuff like this

Subscribe to my mailing list to receive similar updates about programming.

Thank you for subscribing. Please check your email to confirm your subscription.

Something went wrong.

11 Comments

  1. Aaron March 28, 2011
  2. Leon Katsnelson March 28, 2011
    • Antonio Cangiano March 28, 2011
  3. Harsh September 8, 2011
  4. Kai Hoop June 29, 2012
  5. Kai Hoop June 29, 2012
  6. Methun November 6, 2012
  7. Seramick November 14, 2012
    • Antonio Cangiano November 14, 2012
  8. Cayden November 18, 2012

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.