This million dollar question is very frequently asked to/by programmers. Most programmers have asked or thought this question at least once in their lifetime. If you are a newbie and ask this question to someone who is already regarded as a programmer, you’d definitely get an answer. Then if you ask this to another programmer, they might give you a different answer. If you ask this in a programmers group or forum, you’d be blown away by the suggestions. Now you have another question on top of the previous one: “who is right?”
There are so many options: C, C++, Java, Go, JavaScript (would Oracle sue me for using it in this article?), PHP, and so on. Hardcore fans of languages always argue why theirs is better and others suck. If you search Google about which language is better, you would find tons of articles and threads of these arguments. And every now and then, a language rises to the top of the hype mountain and everybody treats it like the holy grail of programming languages. No wonder you’re now more confused than before.
To be honest, I’m not gonna give you a definite answer to this question either. Though I’m not experienced enough to write an in-depth article about programming language wars and which side you should pick. But I think I can give you an insight which can help you make your own decision. Feel free to disagree. I like diversity of opinions and I believe that’s how we learn new things.
Let’s just forget the question for the moment and let me tell you something.
First of all, I think of programming languages as vehicles. Some languages are like the bicycle, some are like cars, some are like boats, and some are like airplanes. Don’t take it literally. I’m just trying to give you a broad idea here.
You see, you don’t ride a bicycle like you drive a car, right? Though both serve the same purpose of traveling, moving you from one place to another, they’re different. They differ in looks and shapes, also in terms of how you operate them. What else is different? Speed, capacity, safety, etc. So, when you intend to learn a new vehicle whether it is bicycle, or motorbike, or car, do you ask people, “Which vehicle is best to ride? I’ll learn that one?” I don’t think so.
The points which influence your decision are:
- I just want to learn it. It’ll be added to my skill set. This skill might come in handy sometimes.
- I’m gonna buy this vehicle, so I’d better learn how to ride it. Otherwise, I’d have to hire a driver.
- I want to learn it for earning. Or it will at least help me to find a job.
These exact three options can help you to decide, “which programming language should you learn?”
- Are you already familiar with some programming languages and feel a passion for programming? Then you’d really enjoy learning new programming languages and different programming paradigms. Learning a new language is like enriching your skill set. It makes you more valuable.
- You have an idea which will change the world or at least, you hope, will change your future. You’d learn a programming language which helps you build the product of your dream and you most likely can’t afford to hire a programmer (driver) right now. So you’d learn it yourself.
- You want to learn programming to get a job. You’re the most confused one. This article is specifically dedicated to you and I have something important to tell you at the end of this article. So, keep reading.
At this point, I want to introduce you to another question: “What does ‘learning a programming language’ mean?”
Let’s say you’ve learned the fundamentals of a programming language. You can write some basic level code with it, like calculating some mathematical operations or read-write from a file etc. That means you learned to drive a new vehicle. Maybe it’s a car. So, you know how to drive a car and you can go anywhere you want. Life is beautiful, what’s next? Isn’t it enough already? Maybe, maybe not. Let’s think of a hypothetical situation where you are stuck in the middle of nowhere and your car is not moving. What’s the problem? Is something broken? How’d you know? You just know how to ride it, nothing about how it works or what parts it consists of. So you’re stuck. Only a motor mechanic can help you now. You could’ve avoided this scenario if you’d known something about the car’s inner workings, right?
That’s exactly the case for a programmer. If you only learn the syntax of a programming language and think that “Everything is fine; I can update my LinkedIn profile as a Software Engineer/Programmer now,” well, you can. But you’d frequently be stuck with different programming problems and in need of an experienced programmer or StackOverflow to help you out. But learning the philosophy of the language and how its different parts work will give you the skill set to solve most of the problems by yourself. So, learning a programming language isn’t limited to just the syntax.
I’ve mentioned Programming Paradigms earlier. Let’s talk a bit about them. You might’ve heard of different programming paradigms like Functional Programming, Object-Oriented Programming, and so on. At the same time, you might wonder what these things even mean and why you need to learn them. Isn’t just learning how to write code enough?
I think this “Paradigm” stuff resembles the vehicles too. See, the philosophy behind a plane and a car isn’t same. Though you can call both of them vehicle, they’re not the same, right? Different programming paradigms are the different philosophies of programming. Some will help you fly, while some will teach you to float in the water. You don’t need to be confused by the jargon. And you definitely aren’t bound to learn all these paradigms. But if you are learning a new language, you should be familiar with its paradigm. Otherwise, you would find a lot of stuff very weird, when it actually is not. Also, it will make the learning curve steeper. Remember, learning different paradigms will give you the insight to see programming with a whole new perspective and help you be wiser. So, that’s your choice whether you should learn different paradigms and explore different languages or just want to stick with the one you are fond of.
Do You Really Need to Learn More Than One Language?
Would you always use a single programming language or a single tool/framework to build your project? If yes, why you would learn various programming language? You can just learn one and use it everywhere you want, right?
Let’s say you’re building a local business where you’d deliver some products from shop to customer. If you’re delivering only small products you can easily use a bicycle for product delivery. You won’t use a truck for that kind of job, though you can. So, the primary consideration when picking the right vehicle is which suits your need properly. In this case, your business is small; you don’t need to think about some complex delivery system or use some heavy vehicle to do the job. Now, what if you expand your business to an international level and you need to deliver between countries? Could a bicycle or truck help you out? For the sake of the example, let’s imagine that there is no border between countries. Then you could definitely use a truck to deliver products from country to country. But would it be the best solution? What if you break down your delivery flow to different parts. Like first you’d collect the products locally and send them to an airport by trucks. And then you’d use some cargo planes to carry them to another country and finally pick them up with trucks again and deliver it to the end customer. See, you’ve used different solutions and combined them together to solve a single task. Also, it is more likely to be the best solution.
This type of scenario is common in the programming world too. In terms of programming, the way you break your big project into different parts and make them feasible to handle a large number of tasks is mostly the software engineering or software architecture-related decision. And in that part, you might need to use different programming languages, different tools, architecture, or services to do the job. Or you could do it with a single one when you can. So you need to know the trade-off between your decisions and take the one which best suits your need.
Enough for today. Let’s just sum it up.
If you are a novice programmer or want to learn to program to find a job, I suggest that you not get caught up in the hype. Try to get information about which programming language is popular to find a job where you are located or can go. Learn it as fast as you can, experiment, play with it, and search for a job. You’d learn a lot from interviews too.
But if you are a programming enthusiast, you can start learning any language you want. Learning basics of the language and start coding with it won’t take more than few weeks. After that, dive deep into its advanced stuff and the core philosophy of the language.
And most of all, “never stop learning.”
Originally published at: medium.com/better-programming/which-program..