The idea for this post originated from a question asked on Reddit the other day, one that is often asked, ‘I have learned languages A, B and C should I learn D?’. The person in question had learnt several languages over the past few months and wanted to know if learning this new language would prove beneficial because it was popular. It had occurred to me that their approach to learning languages had missed the mark. It was something which I also failed to grasp early on in my development journey. If I had, I would not have wasted so much valuable time with little to show. They had failed to realise that learning a given language is only a prerequisite to reaching a professional role. Thus, choosing to learn another language based on its popularity can often be viewed as an exercise in wasting time.
Note: I had written an answer to this question on Reddit but decided not to reply because I had noticed that the person asking the question had asked it many times over many days. I felt they were looking for something more than just an answer. So instead of wasting my effort, I will share my answer here in the form of an analogy.
The mountain range
Imagine a mountain range with thousands of mountains of various shapes and sizes. One mountain represents some specialised role in the field of software development. Special climbing equipment and techniques are needed to climb each mountain. However, just because someone is wearing climbing equipment does not mean they have any experience in climbing. Whilst the topics are related, climbing and equipment are two separate things.
Turning our attention to the valleys beneath the mountains we find thousands of individuals trying to be climbers. These people often look at the climbers up on the surrounding mountains and notice that some share similar equipment. Those at the bottom believe they must start learning how to use all this equipment. Then later, when they have learnt the ins and out of the various kit, many will still not decide on which mountain they should climb. Often they will end up trudging around the foothills and valleys with all this extra equipment. It ultimately slows them down from the goal of climbing a mountain. So if we think about it, it is not like they are achieving much. This in many ways is comparable to those who try to learn one popular programming language after another, but don’t do anything with them.
We can solve this issue by approaching the problem much the same way we approach climbing real mountains. The most reasonable approach is for us to research the surrounding mountains for our area of interest and select one that we feel would be the best fit for our capabilities. Then we can explore the equipment being used on that mountain by others. From this, we know where our focus should lie and the equipment to use. Finally, we start our climb with the end goal of making our way to the top.
Essentially the top priority should be on selecting a desirable software developer role. A role that the individual believes is achievable and takes their interest. Knowledge of what is needed for a role can be obtained from those who have experience in that role. The budding developer can then familiarise themselves with the basics, such as learning the fundamentals of a supporting programming language. From which they can start working on projects relating to it.
A wrong mindset
Artists at the beginning of their careers have a vast range of art media and subject matter to select from, combining in many ways provide them with a multitude of paths to take. Yet most artists early on tend to have a clear idea about the type of art they wish to create. One person may want to paint industrial landscapes, another wants to sculpt figurines. I suspect this is not the case for many junior developers. Often the mindset is if I learn this, hopefully, this will land me a job. I do not believe this is the right mindset to have. It should be: if I want to do that, then I should learn this, and when I am good at it, I will end up with a job doing that. And THAT ideally should be something a person enjoys spending long hours doing.
Benefits of learning new languages?
Going back to the analogy. If a person has climbed up some mountain and then finds that they want a new challenge of climbing another. They can just climb another. There seems to be a consensus in the software development community that there is a benefit to knowing more than one programming language. In doing so, the experience is meant to expand the developer’s insight into programming. It is a valid point. Yet, it is more a case that a particular language enforces some programming paradigm; and it is through that exposure that developers develop insights. For example, Haskell forces developers to write programs in a functional style. But we do not need Haskell to understand functional programming or write our code in other languages which support a functional style. Very few can deny that programming in another language can help us build upon our understanding of programming in general. But if we think about it, for there to be any great benefit gained from learning a new language, it must contrast somewhat with the language(s) we already know. Such as having a good understanding of C# and then learning Haskell because it introduces us to a paradigm shift.
When learning another language, it is reasonable to expect a person should develop a thorough grounding in one language before they can compare it to another. Simply learning a language and completing a few tutorials would not provide them with the sufficient level of insight needed, as opposed to using it to develop a real-world solution. So, I would argue that it would be better for new developers to stick to one language if they can, and try to master it within the role, rather than move from one language to the next. I made the point earlier that the focus is not on the language but on the role or domain in which that language is used. Developers, including myself, should strive to become experts in their role, which generally implies proficiency in a specific language.
For those who lack direction.
As stated artists generally have a good idea about the path they wish to take early on in their careers. When thinking back on my own experience, I had left university having learnt all sorts of information about roles and technologies, but even so, I had no fixed direction in mind. The cause of my indecision is likely a lack of play.
To play is to explore, test, learn and have fun. Artists will play with all sorts of materials, they chose a subject for their artwork because they find it enjoyable. New developers without direction should learn to play. Play with developer roles, not languages. Python, in my opinion, is one of the few languages that is versatile enough to allow individuals to play and explore multiple roles quickly. From developing web services to developing games, Python can do it all. As a general-purpose scripting language, it comes with many drawbacks, but its high-level nature provides an often pleasant experience for developers to try out various things. So for those without direction, learn a language like Python. They should use it to find a role they enjoy and move on from there.
When all said and done
I believe that developers should not learn programming languages or any piece of technology unless there is a need to do so. Time is valuable, so it should not be wasted on what-ifs, like “one day I might program in C, I might as well learn it”. Programming languages are software tools designed to make coding for specific domains easier. Within each software domain, there may exist numerous roles. With that in mind, the focus should always be on finding a desired professional role within a domain. Then learn the technologies needed to support that role.