What programming language should I learn?

Mar 02 2010

Sameer asks what programming language he should learn. Below is an edited version of my reply.

The plumber comes to your home and asks: “What tool do you want me to use?”.

What will be your reply? “I don’t care! Fix the damn problem”.

That’s right. Everybody wants to get their work done, and get their problems fixed. They don’t care what tools you use. As a developer your job is to solve problems your costumers have in the most effective manner. This in turn means that you cannot use the same tool for every type of problem. Can you use an electric driller to fix a small leak in the pipes? No. You may want to use the duct tape for that.

Which language should I learn is a wrong question to begin with. Languages are tools in the bag of a software engineer. Before deciding upon the programing languages you want to learn, you should decide what type of problems you would like to work on. Would you like to work on web technologies? Would you like to work in the Linux ecosystem? Would you like to work in the mobile platforms? There are a million different niches in programming world and you have to ask yourself all those rhetorical questions that comes to your mind and then decide which language suites your choice.

This does not matter that the tools are not important. They are; but they are not more important than the problem at hand.

How many programming languages should you learn?

There is no point in trying to learn as many languages as you can. What you should do is to try and learn about as many languages as you can, and then decide which languages you should gain expertise in.

Going back to our analogy, what tools do you think a plumber should carry in his bag? “Enough tools to get his work done.”

Exactly. If you know to use just one tool, you may be forced to work with other people who can use some other tools. This happens in most corporate IT companies. In large companies you will be working with other people who have expertise in programming languages and tools which you don’t know how to use. This has the advantage that these people will be real rock-stars in their own narrow fields. Instead if you want to work in places like startups (or if you want to work as a freelance developer), you may want to know a little bit of every type of tool out there.

Of course you don’t have to know to use every type of screwdriver. You just have to be expert in using one good screwdriver model. Similarly you don’t have to be an expert in every web development language. Just learn a pretty decent one and you should be fine.

Every programming domain has its set of tools to help you develop softwares. If you are developing an enterprise website, you may be working with technologies like Core Java, Servlets, EJBs, XML, Unix Shell Scripts, Log parsers, Databases, Various web-servers etc. This means that in addition to programming languages there are many other technologies related to programming that you should master in order to be a good programmer.

One more thing you should know – all the programming languages are inherently different from each other. Some languages are easy to program in (eg Python) while some others are difficult (C/C++). I am not referring to the expertise needed in learning the language. I am referring to the effort required in writing a program after you learned the language. If you work as a programmer in an IT company, you will probably learn a new language (may be as per business requirements) in a very short time span. You will start writing decent code in about 1 week to 3 months time. Then the only thing that will matter is which language you really prefer to work with. So don’t worry much about which langauge is easier to learn; worry about which language is easier to use. (There is a correlation here though. You will find that in most cases the languages that are easier to learn are the easier to program in too)

You can learn a lot about programming from forums were smart programmers hang out (eg Proggit and Hacker News), read the top articles and ask your questions there; you will get in-depth answers.

The biggest secret:

You will become a good programmer only by – programming a lot. Many students don’t program outside their labs and college projects, and they never become good programmers. Try to do some coding in your free time. Try to solve Project Euler problems in your favorite programming language, or try to build a website of your own.

Having said all these here are some specific tips. These may or may not work in your case:

  • Enterprise development: Learning Java is a good. Java is used in many software shops as the primary language. It will take you a long way in most situations. At the same time, I have some objections with using the language from a startup programmer point of view. Read the discussions here too.
  • Web development: Stay away from PHP. It is a badly designed language. Instead, learn Django or Ruby on Rails. If you prefer Microsoft technologies use ASP.Net MVC.
  • Windows development: Learn C# (and probably not Visual Basic). For running C# applications in Linux, check out the Mono project.
  • There are many excellent programming tools or IDEs you should try to master. Eclipse is a popular IDE. Notepad++ is a popular code editor.
  • You should be learn about stuff like Regular Expressions, Unicode, Information Security etc. (I cannot even attempt to list all the topics)
  • Try to keep up with new technologies. You don’t have to learn all the latest languages, but try to have an awareness of the latest trends in programming. For example, web development, mobile phone development etc are areas where lots of innovations are happening. You don’t want to miss any of those if you are intersted in those fields. Then again, the forums I mentioned above will come handy.
  • Learning just one language is not very good idea. Learning a lot of languages is also not a good idea. Strike a balance between the two extremes and try to be good in at least 2-3 different programming languages in different fields. (As explained earlier, different languages are used to solve different types of problems)

Good luck!

73 responses so far

  • Chandan Kapoor says:

    Hello Everyone,
    First of all,you have to decide in which field of I.T. you want to go.There are so much fields like web technologies,mobile technologies,
    software development,desktop applications etc.If you want to go for Web technologies you have two options:
    .1. PHP
    2. .NET Technologies

    Now php is easy to understand than C#.Net more over the learning curve for.net technologies is too steep.So, i prefer go for php.But .net guys are paid well than php.One more thing i want to add here is that if you want to be a freelancer say after 2-3 years in a company you have good opportunity with php ,where as if you want to stick at .net.Mind you, that .net technologies is huge and the projects are huge.YOU CAN’T do it all alone yourself,you will always need help and internet won’t do much here.but in PHP you get small projects that you can handle, another plus point of PHP is that more and more jobs are there in PHP.Client just need PLATFORM INDEPENDENCE, which PHP gives very well.Some say that PHP is dying, thats not true cause there are so much to work on:

    Core php,CMS(WordPress,Joomla,Drupal),
    ShoppingCarts(Interspire,Os Commerce,zen-Cart,x-cart,virtuemartetc),
    Frame Works(Symphony,Codeignitor,Cakephp,Zend).

    WHO SAYS PHP IS DYING!
    Absolutely Wrong!!!!!

    If you want to go for MOBILE TECHNOLOGIES ,I strongly recommend ANDROID.
    For Software development,stick with .net or JAVA.
    For Desktop Applications again .net or Java.

    But i must tell you one more thing that at present scenario WEB Technologies and Mobile Technologies are on BOOM.So, i prefer go with that only.About 80% of the IT MARKET is Relying on the Web Technologies and Mobile Technology, is definitely the coming Future.So, stick with these two.

    One more thing i want to add is HTML5/CSS3,Javascript and Jquery.Knowledge of these technologies is also very helpful if you are going to choose web technologies.

    GOOD LUCK!

  • sandeep says:

    yup php having bright future

  • supinder singh mavi says:

    i want to work in mobile technology as well as . .not becaseu of c# and c++ both r my favourat languages

  • lalit singh says:

    hello sir, i want a brief answer by you of what i should do basically i am pursuing MCA 2nd year(Correspendence) and i have passed BCA regular and i have basic knowledge of c,c++ and HTML. Tell me one language among .net and PHP.

  • Nathan says:

    To Chandan Kapoor

    If you want to go for Web technologies you have two options:
    .1. PHP
    2. .NET Technologies

    You forgot about Java technologies, Ruby, etc….. you can’t limit web technologies to just 2 options.

  • ashaq malik says:

    sir,i want to became a web designer my basic knowledge is Bca 2nd year.what should i do in future.and what programming should i learnt to became a web designer?

    • Eagle says:

      As far as I know, most web designers do not deal with programming languages and the only exception might be the JavaScript to deal with web layouts and animations. For the back end, web designers can use any language including PHP, JSP, ASP.NET etc. but again if you wanna be a web designer, you should learn mostly fron end stuff.

  • Anwar says:

    sir, I want to be a professional web developer, so which programming language should I learn. please help me to go ahead giving me a good suggestion.
    thans

  • Haren Sarma says:

    Hello. I am a PHP developer (Worked on more then 1000 project internationally) from Last 7 years.

    As the author said, don’t learn PHP. I want to say you reason clearly why ?

    REASON 1: PHP is World’s largest used Programming Language (80% + All the Web)
    REASON 2: PHP is used on most successful site like facebook.com google and more
    REASON 3: PHP is easiest to learn language

    I have more then 50 + Unique reason why PHP. If author doesn’t have knowledge about PHP I would like to tell him that there is a search engine name google (www.google.com) and search there why PHP is good

    • Niyaz says:

      :)

      I won’t reiterate why PHP is bad. You may want to Google that yourself.

    • Austin says:

      I am a programmer for Microsoft. I have worked with php for 4 years now. Since it is a weak-typed language the transition between Java/C++ and php is difficult. This may cause a negative experience for those that started with C++/Java as a base. PHP is however (believe it or not) one of the most elegant languages. If you already know a little html I suggest learning php perhaps alongside another language such as C so that you can see how strong and weak type languages differ.

    • bandhan says:

      You will be a good and professional web designer learning HTML, CSS, PHP and Javascript, in addition to you can learn VB script if you can. It is exactly php is a good script language to learn to be a good developer of web technology.

  • anand sonake says:

    can u tell me, is php easier than every other language?
    if yes,then why all top most companies use it?

  • Jammer Man says:

    Stay away from PHP? What a completely idiotic assertion. Dude, you are without a shred of a clue.

  • qwerty says:

    Programming languages are not tools. They are the materials you use to build something. The tools analogy breaks down too easily.

    Yes, people should stay away from PHP. It is a non-designed hacked up, insecure mess. There is no project where PHP is the right answer.

  • tien says:

    I don’t think people that say “don’t learn PHP or stay away from PHP” really have a good ground here, I’m not even sure if they are real coders

    “There is no project where PHP is the right answer.”

    well … facebook.com is one, although they’re sticking with PHP due to a “legacy” thing.

    every language is good, as long as you know how to code it well.

  • Dustin says:

    I don’t agree with staying away from PHP, but otherwise, a good post.

  • TsNarayanan says:

    How about Python and C#? Where are they used?

  • AMA says:

    For freelancer web developer jobs, PHP is the future…….. You also need to lear HTML, CSS, JAVASCRIPT, JQUERY.

  • Georg Peter says:

    I suggest to take a look at Seed7 ( http://seed7.sourceforge.net ), which is an extensible programming language. That means that the user is able to define syntax and semantic of statements and operators. No other language has that feature. Additionally user defined functions can be executed at compile time and types can be used as parameter or function result. Templates are implemented as functions with type parameters executed at compile-time. In most programming languages arrays are a hard coded feature. Not so in Seed7 where arrays and other abstract data types are defined in libraries. Libraries are defined for various areas. Seed7 programs can be moved between Windows and Linux without changing them. Even when they do graphics, networking or copy files. Seed7 programs can be interpreted or compiled. The interpreter starts very quickly so program development can be done quickly. The compiler compiles Seed7 programs to C, which is subsequently compiled to machine code. Therefore Seed7 programs can have excellent performance.

  • Ronnie Momin says:

    Don’t be polish! This guys are making you confuse learn what you’re told to what languages the company prefer. Its not necessary to learn all the languages it will make you confuse instead later you’ll mixed up e.g., in a page you’re told to encrypt a code with PHP and .NET, you’ll start adding up Java language C++, Python which will be results into error.error/php?=unknown. So my suggestion is stay to the point and learn only those language that you’re a suitable with and what company’s prefer. Tools too depends on what language you’re about to use. You’ll not need to worry about that nor your destiny company will recommend a software to install with a full detail of system requirements. First you must decide in which company you would like to work for later you can be a master of your own by creating a new website run the company of your own.

  • sujin says:

    hi friends.. pls help me ..which language i will study..which is most wanted

  • Trung Pham says:

    When i read the first sentence of your article. I know you are right, that is very helpful to me. Thank you very must!

  • outlr says:

    The best post from this site,its a really inspirational post.

Leave a Reply