The world of computers revolves around code. Everything that we do with a computer, from booting it up to browsing the internet, is facilitated by collections of computer code files that are packaged into single, functioning units known as software applications – software, for short.
Problems solved using computers are implemented algorithmically with computer code. However, there isn’t one code that all software is written in. Rather, there are well over 600 coding languages available to software developers, and the number is still growing.
If that statistic isn’t dazzling enough, just know that a single piece of software needn’t be restricted to a single coding language. For example, a personal project I recently finished used two coding languages, despite not having a very complex objective. Considering the kinds of software capabilities required in the industry, the number of languages used for a single software application can go well beyond two or three – for example, Facebook uses somewhere around 13 languages to manage its website, user interface and databases.
This then raises the question: Why are there so many coding languages?
Tools of the trade
The reason there are so many coding languages is because there are so many kinds of problems that can be solved in easier ways by using one language over another.
This may strike you as odd, given that we just said all coding solutions are algorithmic and thus fundamentally similar, but think of it like a toolbox filled with screwdrivers of various types and sizes. Each screwdriver has a preferred use case – for example, a large, Phillips-head screwdriver is best suited for dealing with a large screw with a cross-shaped indentation. Conversely, a small flat-head screwdriver is most useful for dealing with a small, horizontally-driven screw. You could potentially use the large Phillips-head screwdriver to deal with the smaller screw, but you’d have a much harder time than if you were to use the small flat-head.
The same idea applies to coding languages. Each language is like a different screwdriver, with different features that make it more useful for some tasks than for others.
For example, a commonly used coding language called Python, among its many benefits, is well-suited for quickly developing web applications, whereas another language called Java, among its many features, allows for large-scale, enterprise-level web applications with many functionalities. One could try to use Java to quickly whip up a web application, but that’s like using a large Phillips-head screwdriver for a small screw – chances are, using Python would be much easier.
Live by the code(s)
I’m often asked by people who don’t know much about computer science how many coding languages I know. Granted, it’s a valid question, but it’s just another example of how mystified computer science can be to people who don’t know much about the field.
Before I get to the question, let’s look at a quick demonstration:
Here is a small piece of code written in a commonly used language called C++ that prints out the line “I like trains”:
And here is a small piece of code that does the same exact thing, but is written in another commonly used language called Java:
At first glance, the two pieces of code look completely different from each other. However, a closer examination reveals that there are several similarities among the two: They both have curly brackets, semicolons and the phrase “I like trains.” Of course, there are other similarities that a seasoned programmer can point out, but the important thing is that both languages look different, yet have similar characteristics – keep that last part in mind.
Coming back to the question at hand, frankly, the number of languages I know isn’t really that relevant because the number of languages someone can code in isn’t really a good measure of their computer science expertise – it’s like asking a mechanic how many screwdrivers he knows how to use.
You probably wouldn’t ask a mechanic that question because despite the differences, all screwdrivers are characteristically similar in that they all adhere to the same principle: When in contact with a screw, rotate clockwise to tighten it and rotate counterclockwise to loosen it. Because of this, once a mechanic has understood the underlying principle of one screwdriver, he or she only needs a bit of practice with another before becoming skilled in using that one too.
The same is true for computer science. While the technicalities and syntaxes of the various coding languages differ, the fundamental ideas remain the same. For example, with the code segments shown above, the fundamental idea of having the phrase “I like trains” in order to print it out remains the same in both, and also in many other, coding languages. And much like the mechanic, once one has a solid understanding of the fundamentals of coding, it only takes a bit of practice to become proficient in other languages as well.