Blog icon

Why should you learn multiple programming languages?*

By Gabriel Gizotti,
Gabriel Gizotti
Scroll down to read

Have you ever noticed how many discussions there are online about what programming language or framework is the best? People in forums are always praising one particular language and making fun of those who use a different language. I was guilty of doing that at an earlier point in my career. Ruby was everything, and anything other than Ruby was simply not as good.

Time passed and I came to the realisation that the programming language is nothing but a tool, and the real value of the software engineer is in their problem solving, thereby rendering the programming language used by the engineer simply a tool for solving problems. Different tools solve different problems, and some tools solve the same problems in different ways.   With this in mind, I would like to draw a parallel between programming and music.

Versatility in music

I have been involved with music for the past 13 years. Eight years playing with friends and in my bedroom, and five years playing guitar at church.

Through my involvement with music, I have noticed one very important thing amongst musicians: it is rare to find a musician who does one just specific thing. They usually play more than one instrument, or they play one instrument but are proficient in - or at least familiar with - different music styles. Exceptional musicians know how to play many instruments and many different styles.

I can play the electric guitar and sing and, even though I am a mediocre musician, these two skills complement each other well when playing guitar in a band with many singers. I am able to guide them through vocal parts, where they should be in relation to the instrumental part, and sometimes even recommend changes in the vocal lines that would better fit with the guitar.

But enough about me, let’s talk about a real musician and his versatility. :-)

John 5

John 5 is an American musician best known for playing guitar for Marilyn Manson and Rob Zombie.

If you know Marilyn Manson and Rob Zombie you would know that John 5 plays some very heavy stuff. What many don’t know is that John is a session musician, which demands great skill and versatility, and that he is well versed in the country genre. He also plays the banjo and mandolin.

He can adapt banjo techniques to his guitar playing, as you can see in this video. This versatility allows him to write music that can appeal to many people. He can write a very heavy song like Welcome to violence that appeals to the metal-heads. But, even more interesting, he can write songs that combine all those elements and create something unique, like Black Grass Plague.

In Black Grass Plague he starts with a heavy riff, and we assume the whole song will be heavy. However, at the 0:48 mark, the riff resolves to a bluegrass/country section, and at 1:20 mark he moves on to a heavy metal shred section. This change in mood repeats throughout the song, until the last part where he brings in a mandolin, and finishes up with banjo.

This is a good example of bringing different elements, and different genres, into a heavy song and allowing the listener to experience a variety of feelings without completely leaving the heavy style (which I assume is one of his favourites).

At this point you are asking yourself: “And what does this have to do with programming?”. Glad you asked!

Where are we going with all this music mumbo jumbo?

I am all for having a preferred language; however we should never be married to it and always be willing to learn from other languages, even if we do not use them as frequently.

My preferred language is Ruby. I love how simple it is, and how happy it makes me while I am working with it (thanks Matz!), but I know I won’t learn everything I can learn from Ruby.

Learning functional programming principles is a goal I’ve set for myself this year. I know Ruby is not the best tool for that job, instead I will turn to Elixir.

Similarly, if you want to dive into statistics and data analysis, you would be better off learning R rather than trying to do it with Ruby.

Want to become a pro in memory management? Go all the way back to C and stay with it until you know what you are doing with memory allocation and deallocation.

You don’t need to leave Ruby and make these other programming languages your main tool. But, once you have experienced what these programming languages do best and how they do it, you will have the knowledge in your arsenal for when it is needed. As you learn different languages, you can pull from this arsenal of techniques and apply it to Ruby (or any other language that is your preferred) when a problem that calls for it appears.

To sum up

Aim to be like a session musician and become versatile and have knowledge and understanding of a variety of different styles. You will be able to solve many different problems using the best tool for the job, and maybe even become a professional in high demand.

*Reproduced with permission from Gabriel Gizotti. You can read the original on his website.

To find out how reinteractive can turn your web application vision into reality, get in touch with us through our contact form or call us on +61 2 8019 7252.