Myth: There is a “right” first language to learn.

Learning the "right" languageI can’t even count how many times I have seen someone new to the programming scene ask the question “I am new to programming and want to know which is the right language to learn first.” Then of course there are a ton of veteran programmers that jump in there and start recommending every language under the sun and all sorts of ways to go about learning them. “No learn C++, forget C and go learn it on codeacademy.com!” or “No what you should do is learn Python because it is easier than Ruby and has an awesome green snake logo to boot! Find a tutorial article online.” I think we all need to take a minute to stop and think about what we are actually telling the person new to programming and stop pushing personal preferences.

I found that typical replies to this question come in one of three flavors. Some are better than others but they often include:

  • Learn language “X” because it is the best and way better than language “Y”! – This, in my opinion, is often the worst of the three answers because it assumes that the new person learns like you, will find the language just as exciting as you and that they will hate the other language you mentioned. All premises which could be, and often are, wrong.
  • Pick the best language that fits the job. For your job I recommend “X” – This is a pretty good answer and in the last 5 years I am seeing this answer appearing more and more which is better than nothing. I even recommend it if I know what the newbie is trying to do. No use saying learn “X” when “X” doesn’t even address the task they are trying to do. No use recommending a web language if they want a desktop app.
  • Pick a language, any language, just make sure it makes sense to you and which you can learn easily. – I feel this is the best answer overall, especially if the newbie doesn’t care what type of work they want to do or don’t already have a goal. They just want to start making software.

I recently answered such a question for a new person on Google+ and told them that they should really go to a bookstore, sit down with a few books that interests them (or maybe even recommended to them) and read a few chapters to see if the material made sense to them. Maybe read up through the first “hello world” example and by then they should have an idea if the language is going to work for their learning style or not. They should do all this before they even buy the book. Unfortunately shortly after making such a recommendation I got blasted for the remark. This person then proceeded to mention that reading books was a waste of time and that the newbie should focus on a language “X” through general practice. Mainly they were recommending the first option from the options above.

What followed was a heated debate on the merits of a few main ideas. First reading books about programming as a way of learning. I believe that books should always be “part of” a comprehensive learning process to start any new language. More importantly the first language. Books are often vetted, reviewed, worked on by multiple experts in their field and usually fairly complete (or at least as complete as one can get in X number of pages).

I always recommend that newbies learn through books over YouTube videos to start because YouTube video tutorials are often too short, made by less than expert people, sometimes poor quality and people tend to skip what they don’t know of a topic. This is because when on video people don’t want to be seen as not having the answer right off the top of their head. In other words, they play it safe and leave out material. I also recommend that they learn with a book in conjunction with a class (if they have access to some) so they can have discussions, articles they read online (preferably that mimic the material they are currently reading in the book) and a really good active web board to ask questions and get answers on code they write for practice.

Another idea in the debate was the idea of picking a book/language that makes the most sense to the person. The debater I was talking with said something along the lines of, and I am paraphrasing here, “If they did that then we would have a bunch of Ada programmers”. I chuckled because obviously Ada books fill our modern bookstore shelves didn’t you know? *sarcasm*. But I replied by saying “Hey, if they did find an Ada book and started with that because it made the most sense…well…good! They will learn generics, strong type safety and even object orientation in later versions. All this would be helpful for that person then to go into a language like C++ or Java to learn even more. Besides only people like the US Navy are looking and willing to pay well for such Ada programmers.”

I felt it turned into a lopsided debate quickly after that. Debate aside there is a few things we, as professionals advising newbies, need to remember when advising those new to programming:

  1. Not everyone learns like us. Two programmers who know C++ may both have found another language easier to start with but came to the same language at different points in their career.
  2. We also need to remember that we have our preferences and biases. We need to make sure that someone new to programming understands that there are certainly multiple choices beyond a handful of the popular languages and not to be afraid to explore others. The key is that they learn some of the basic building blocks in programming theory which will carry over into other languages.
  3. We should also let them know that they really should expand their minds beyond one language and that one language isn’t going to solve all of their problems or keep them marketable. The industry is always changing.
  4. While there are languages that may be better suited for the job it is not always going to be the “right” language to learn first. It is more important to pick up the ideas and paradigms behind programming and choose the sources that make that as easy as possible to obtain. Don’t jump into a steep learning curve if you don’t have to. Once you pick up the basics then you can jump into others with little less effort.

Thanks for reading and I hope this helps those newbies out there that always get confused by the conflicting replies from the professionals when they ask that question! 🙂

About The Author

Martyr2 is the founder of the Coders Lexicon and author of the new ebooks "The Programmers Idea Book" and "Diagnosing the Problem" . He has been a programmer for over 20 years. He works for a hot application development company in Vancouver Canada which service some of the biggest tech companies in the world. He has won numerous awards for his mentoring in software development and contributes regularly to several communities around the web. He is an expert in numerous languages including .NET, PHP, C/C++, Java and more.