The short answer is yes, as a beginner you should stick with one programming language in the beginning. Now some people might disagree with this answer so let me try to elaborate and show you why I think it is a yes.
First of all before even getting into let’s consider some of the common objections that people might have against this.
- As a beginner you want to expose yourself to many programming languages to see which one you like.
- Sticking with one programming language for too long will make you narrow-minded because different problems might be solved better with different programming languages.
These are the 2 main common objections that I have gotten (if you have more please don’t hesitate to add them in the comments section).
Now let’s get into it. For the first objection I would say that as a beginner you are so overwhelmed by all of the information being dumped on you that also being exposed to multiple programming languages on top of it all might discourage you from programming altogether.
Sticking with one language allows one to master its intricacies and understand programming design/structure/pattern principles well without being distracted by learning and memorizing various keywords for different languages. This is much more important.
Once you have mastered one language and understood core design principles in general then learning more languages will be a TON easier because most of them are very similar. Also programming languages are just tools to solve problems.
You shouldn’t try to understand how tools work if you don’t know how to solve a problem well… first learn how to solve a problem well by learning about the core principles and sticking to one language and from there learn how to solve the problem using different tools.
As for the second objection I would say that one has to stick with a language until one is comfortable solving complex problems in a well-designed manner.
This might take longer for some people than others. For example it might take you 2 years and someone else only a year. It depends on how much work you put into it. How much time you are willing to allocate to solving problems on your own. So that purely comes down to your choice.
That was the rule of thumb for me because it shows that as a programmer you are comfortable using the tool (that being a specific programming language used along with the IDE + knowing hotkeys and options to make life easier) and it also shows that you are comfortable with design patterns and principles in general which could be used alongside any other programming language learned in the future. This puts you in a very nice position to go ahead and try out other programming languages.
I do agree however that knowing 3-5 programming languages makes one a better computer programmer not only with depth but also with breadth. Different problems require different approaches and by knowing different programming languages you are opening yourself up to more possibilities, more ways of being able to tackle a specific problem at hand.