How to choose a programming language?
In this era of technology first world and artificial intelligence one of the challenging problems is which programming language to learn and apply. Programming languages are a way to express instructions to the machines to act in specific scenarios. The modern world has a plethora of programming languages each designed to solve a particular problem properly and of course, support the basic construct of software engineering. Even an experienced programmer gets lost in this myriad and most often chooses the programming language they know or have experience with. Most of the job openings too mention the programming language you need to have to even be considered for an interview. Most often that becomes a priority and to an extent rightly so. But cracking an interview is not a guarantee of future success in the job, what matters is adaptability. The adaptability to learn, unlearn, and figure out how to best utilize all available resources at your disposal. Coming back to the topic, the question remains which language to use in certain scenarios.
I want this article to be future relevant as and when more programming language evolves and hence instead of giving a concrete answer, I would rather write down a framework that just works considering future changes too. Let's start.
1. Focus on the business domain of the problem you are solving with your code.
Every useful software ever written has always solved a business problem that creates value. Without that, the software is living on borrowed time. So always ask this question what is the business problem I am solving with this code? Let's take some examples - You are working in a logistics company and have been assigned to write a module that will be a part of a larger system that will be used as a backend for route navigation. Hypo-thetical problem. Let's solve this - Pick up the top 3 (can be more) requirements for a route navigation system. Accuracy, Speed, Polling or Frequent Data exchange. Now you have a narrow zone to focus on while selecting from the available language pool and have a logical way to defend your choice. You need to understand we are not talking about the functional accuracy of the system itself here as it depends on the overall system design and a lot of other factors like hardware etc.
The idea here is to come up with a personalized approach to figure out selecting criteria for the programming language based on the business problem you are trying to solve.
2. Focus on the human aspects of the problem you are solving with your code.
The above approach was product-focused but we live in a world full of people with emotions. Emotional beings have a certain tilt or preferences toward certain languages due to non-scientific reasons. Hence you find a huge community backing certain technologies and completely ignoring other potential candidates. So pragmatically approaching this, you also need to consider the non-scientific facts like -
So now you know what kind of questions you need to think about under this broad pointer of human or social aspects of the programming language.
领英推荐
3. Focus on investors' aspects of a product that you are building with the programming language.
We as engineers always tend to think we have to deliver the best product. End of it. But that's the start. A product built with the best features and technologies if not sold and accepted by the masses is of no use. The investor loses money if there is no ROI essentially. Most of the time we as engineers think we are at the bottom of the pyramid and have very little influence on how a product is sold. Well, that's a mindset problem. How? Let's look at this problem differently. Companies are competing based on
We as engineers can select programming language based on criteria like the above to give a marketing advantage to the product over other competitors. The marketing teams can then exploit these additional data points to create a positive narrative in the minds of users where they are emotionally connected with the products. Once that is done the ROI is assured for the investor and maybe you get a chance to get appreciated for your far-sightedness. So the more long-term you plan and execute and provide more leverage to other cross-functional teams in your organization the better chances of success you will have.
Concrete example - You found that your programming language runs on less computing power compared to others - this provides an opportunity to create a narrative backed by data around the environment friendliness of the product while in operation. So while selecting a programming language you should exploit everything you have to say to quantify the environmental impact that comes up by using the product. This creates a positive brand perception among the users.
4. Focus on how the programming language interacts with other sub-systems within the context of the organization.
This is the most underrated aspect which is often ignored even by big tech players thinking that they can always leverage either standards like REST APIs, RPCs, IPC, etc., or third-party libs for the purpose. This area is quite under-invested since the problem is left to be solved by an external framework and is never considered as a part of the language itself. It's like a human who is born without communication aspects and then supplied with external aid to do the same. The interface areas need some good investment to optimize the way programs written in language interact with each other. This field will evolve with time and will form important criteria in the future for selecting a programming language.
Let's do an example to understand this area more. Suppose you are asked to write a program that interacts with the database. Easy problem right just include the library that contains the DB drivers that translate your queries into the data format that is understood by the DB server. Now you need to post some messages to a queue and again you are happy to include a client lib of the message queue to post messages that are in supported format by the mq. If the DB changes for any reason just change the library and change your code to support the new libraries if you are not using a proper interface. To overcome these situations ORM like Hibernate is useful, but here comes a requirement to learn a new framework. Now if you need to talk to another service easily just call the API using an existing HTTP, or HTTPS library and wait for the results for processing. If you want to expose your service easily just include a REST API-supporting library or use a native language function to expose API. All the above problems are of interfaces defined for communication and a language forces you to do so much stuff to solve a single problem of communication. Forget about the cyber-related stuff like Authentication, Authorization, etc. required to be thought about every time you do any communication. I hope by now you would have understood the challenge at hand. So this field will evolve with a simple goal of standardization of communication with native interfaces that are easy, universal, and future-proof.
I have intentionally left out some more criteria like Governance, Regulatory Aspects, and Hardware Aspects to not make the article too long. The idea of this post is to ignite bright minds to think cross-sectionally while selecting a programming language and come up with a good approach to do so. In the next post, I will try to cover how to pragmatically upskill yourself fast once you have selected a programming language. What aspects to focus on to write an efficient program at the production scale?