A while ago I’ve made an article to named “How to Start Programming from 0”. In this article I was trying to help the beginners by giving them advices and links to get started. Many people are still asking me the very popular question: “What is the best language to start programming?”. If you already asked me this question in the past, I can bet that I answered you something like: “It depends on what you want to do…” or something like that but today I’ll try to answer objectivly the question.
Should I learn C?
In many articles and many post I’ve been saying that C is the best first programming language to learn. Well… it can be but the problem is that C is a very low level language and it has the reputation to be hard to learn because of the complexe concepts like pointers, structures, dynamic allocations. C has still some good advantages. The syntax is pretty simple and once you can code in C you can learn basically any language very easily because C makes you understand the logic of programming… to code in C you have to know what you are doing.
Java and C#?
I’m going to be honest, I really don’t like to recommend these languages to start. Even if many computer science courses start by learning Java and C#, I don’t think it is necessarly a good idea. Why? Because when you start coding with these languages you already start seeing and using classes without knowing what is a class. Classes are very abstract for beginners and I really think it is a concept that needs to be introduced progressively to a beginner, there is so many stuff a beginner doesn’t know when he runs his first “hello world” (doesn’t know about functions, conditions, loops, arrays…) and that’s why I would personnally not choose a high level OO language to start.
Then what about Python?
I have been (and I’m still) bashing Python for his terribly weird syntax. When I first started playing Python I was hating this language because of all the indentation rules but I have to be fair… Python is probably the best or one of the best languages to start. The reason why the syntax is so weird for me is because I started programming with the good old see but if I’m objective, Python is perfect for beginners. Sure, it is not perfect, (it is slow and the indentation rules can be annoying in the beginning) but you can do in 1 line of code things that would take you 10 lines in C language. One of the things I love in Python is that you can chose to do pure function programming or OO programming depending on what you prefer or what you need to do. Also, the user doesn’t have to really care about memory or variable types in Python and the class are introduced very progessively (they are really easy to implement). One of the things I love with Python is how easy it is to install libraries using PIP, you just have to write one line to import it and there is a huge amount of libraries for Python!
Now I think you have a part of the answer, choosing a language mostly depends on what you want to do, how fast you want to learn, what you want to learn… For a beginner who knows nothing about programming and just want to get started I would say go with Python, for someone who wants to learn the logic of programming and have a better understanding of computers I would say go with C, for someone who wants to get into game development I would say go with C#. I don’t think we can all agree on which is the best language is the best to start but I’m going to give you an advice, do what you love, learn what you want to learn and I promise you that the learing process will be easier!
Written by Samuel Gauthier