Life around programming languages

Life around programming language
Does the question of infinite programming languages haunt you? Are you confused which language(s) you should learn? Should you just learn one language? What about frameworks? The article tries to address the philosophical and practical aspects of these questions.

Last project I worked had C++, Python, Java, PHP and JavaScript in it. Obviously, I was not working on all of those components but the point is today’s programmer cannot have privilege of saying he is C++ or some *** language programmer. Systems have become complex like never before and continue to become more. Programmer’s job is not about converting algorithm written in English into machine readable language. Even a trained parrot can do better mugging than that. Programmer needs to look beyond code he has to implement. He has to understand the grand architecture of system. He never works in isolation. His code needs to integrate and service other code. In future, perhaps, he will design system architecture where he will become true developer not just programmer. Once, he completes a project, he has to move to other project which may be completely different in terms of technology stack. In such situation, only thing that he can reuse is his wisdom about past design decisions, architectural patterns, etc. We call this wisdom as experience that makes him less alien to new system allowing him to make better design decisions which are often most critical in early phase of project. The early design mistakes, if not recognized soon, are most dangerous considering the cost impact and effort. This, in short, is the journey from programmer to developer assuming two things are different.

Should you learn more than one programming language?

There are two schools of thought when this question surfaces. One that believes in vertical growth (specialization) while other being horizontal growth (generalization). Vertical growth says one should become specialist in one core technology stack (LAMP, Java, .NET, etc. assuming languages don’t run themselves; they need complete ecosystem) which will help one solves problems in that domain in very minimal time. The argument further says that learning too many things leads to confusion and indecisiveness often causing unnecessary delays. It believes that today’s technology stacks are generic enough to do any kind of development. Even if you decide to learn many technologies, how much will be enough? The count is simply out of any individual’s capacity if at all not infinite. Thus vertical growth discards the notion of learning many languages.

This is easier to say theoretically but reality is never so ideal. Systems don’t work in isolation. And that is probably the biggest drawback of specialization. Anything that is out of scope of the technology, one is completely blind often taking decisions based on presumptions rather than human rational which ultimately leads to chaos.

On the other hand, horizontal growth says one should learn as many technologies as possible. Its fundamental belief is that systems will grow and become complex no matter what efforts are made to keep them simple (Java, for example, is considered to be a language designed to write maintainable and robust code. It has indeed achieved that goal. But, just search around and you will find numerous frameworks for Java; enough to learn for lifetime. Same can be said true for Python, HTML5 and JavaScript. The point here is that once it was enough to learn just Java. But, over the period of time system became complex and so does the underlying frameworks). It says that if one is exposed to more varied technologies, one is likely to make better decisions. It rejects the idea that experience comes automatically with years.

Horizontal learning certainly makes sense from a world view. But, again there are problems with this too. Does learning many things mean that one will be busy for entire life? Where should one stop? Will real life offer such privileged moments dedicated to learning? When learning some new thing, can a person retain knowledge about existing stack? Definitely not! Programming languages, especially syntax if not practiced regularly, are easily forgotten. Plus, there is slight ego problem too. Everyone, at some point, prefers to be called expert of some blah… blah… thing. Also, society tends to respect specialists little more. Because, horizontally learned person will have to rely on experts to get job done and they are always ordinary in a particular context.

In the past, I had many mentors and seniors to guide me. Their opinion was again divided. However, even those who advised specialization i.e. vertical path have said that in typical enterprise setup, one should be able to perform more than one role when one becomes more experienced with time increasing once marketability and employability. While specialization is necessary one should also learn supplementary things. In my case, being a front-end developer, many advised me to look into other areas of product design like user experience, visual design, interaction design, etc. and not keep on learning numerous front-end frameworks.

From philosophical perspective, horizontal and vertical learning are the two prejudices every programmer pass through at certain phase. What about practical side? In one line, it is indeed necessary to learn many things as varied as they can be, while it is also necessary to be master in a particular technology around which one builds the fortress. So, is there any specific way to proceed with it? Unfortunately or fortunately, life is not so easy. There is no simple Boolean true or false for our questions (Else, humans will be machines operating on perfect logic. The fact that human decision making is not simple Boolean is the very essence of being human). On the left one has vertical stairs and on the right, straight horizontal road. The right cord is the balance between the two.

Balance between vertical and horizontal

Next immediate question will be how to achieve that balance. Sadly, there is no straight forward answer to this. Everyone has unique learning abilities and pace. What works for one may not work for another. At the time of writing this article, I have learned JavaScript, PHP, Java, C#, C++; while it is another issue that I now have working knowledge of just JavaScript and PHP. I completed my graduation project in C# and was pretty impressed with the .NET framework. But, I always wanted to develop high performance applications like 3D games, stock market application and thus took my industrial training in C++. However, when I actually started coding at professional level, I was coding user interfaces with HTML, CSS and JavaScript. JavaScript, as I believe one of the most deceptive language ever invented (Functional language in sugar coated syntax of C), caught my eyes and from then on I never looked back. I even started taking trainings as UI and JS instructor. After coding for considerable amount of time, I moved to Java for Android as a business requirement. Finally, in the last project, I had to learn PHP and was actively working on PHP, HTML5, JS and Java.

For JavaScript, when I started, my initial coding was entirely procedural. But, soon as code base became complex, I suffered from code maintainability issues and from trial and error started writing object oriented code. When I returned back to JS after a break with Android, my coding style had become more and more functional programming in nature. Move from procedural to object oriented was probably triggered by my early exposure to C++ whereas, change from object oriented to functional programming was triggered by my experience with Android. For Android, I was writing huge amount of code which I managed to reduce by 40% during refactoring and that’s where I learned the power of anonymous functions that helped me truly realize the power of functions in JavaScript along with clean code.

To summarize, initially I had horizontal learning phase followed by vertical phase and then back again to horizontal learning. The underlying message is “you are the best judge of yourself”.

Looking ahead

After reading this article you may feel that the question of achieving right balance is still unanswered. Well, I leave that answer to each individual to discover what works best for him. But, in the end if you feel the need to learn more, there are many more questions on horizon. Which new language should a person learn? How to approach new programming language? Up to what extend should a person learn new language? Should one also learn framework while learning a new language? When can one call himself proficient in certain programming language? And the list goes on…

In the series of articles to follow, we will try to answer these questions one by one. Till then, please wait for other articles.