Polyglot Programming – The Good And The Bad

Written by rajat1saxena | Published 2017/08/28
Tech Story Tags: software-engineering | software-development | programming | productivity | tech

TLDRvia the TL;DR App

When you know React, but also Polymer; MySQL, but also MongoDB; Laravel, but also Express; Android, but also React Native; Bash, but also Python.

For the uninitiated, A Polyglot programmer is a person who can write valid computer programs which do the same thing, in many programming languages.

It feels great when you know many contending technologies. You can easily pickup the best(est?) tools for the job and be productive from the get-go.

Corporate dudes, who have been working on Oracle for past 20 years, hate you for knowing MySQL and MongoDB, in addition to Oracle. *wink wink*.

Talking about knowing the best tools and being productive, knowing many contending technologies is also a dual-edged sword. How? let me list it down for you.

*Disclaimer: Opinionated Content Ahead*

I will divide my thoughts in two categories i.e. the “Pro”s, where I will talk about why it’s a good thing to be a polyglot programmer and under “Con”s, I will list down the bad ones.

The PROs

1. The best of all worlds

Many of prevalent technologies are famous for a reason. They bring certain ideologies and methodologies to the table, to efficiently address certain types of problems. When you know many of these ideologies and methodologies, leveraging their power on different platforms isn’t that hard.

For example, I recently used, React style coding in Android i.e. one function is responsible for changing the UI of an entire app and the state of an entire app is maintained as an object. This greatly improved my workflow and reduced the time to debug the app.

2. No settling down with inferior tools

You know jQuery, and you know it’s awesome. You can do all sorts of DOM-FU with it. Sadly! it’s not an efficient tool to write SPAs (Single Page Applications). But you can be forced to use it, when you only know jQuery and you are short on time.

You could have saved yourself a lot of trouble (both in present and in future), if you were also knowledgeable about React or Angular, which are better oriented for the job.

There’s even a technical term for this: Domain Specific Language or DSL.

3. The power to mix-n-match

When you know both Bash scripting and Python, you can easily swap out your bash script with a Python equivalent, in-case you are tasked with parsing HTML in future, in addition to whatever your script is doing today.

Your custom HTML parsing routine in BASH, can never beat Beautiful Soup. There, I said it.

On the other hand, if you don’t know Python, then you are just left with your regular bash. Good luck with that.

Corollary: Why would you write a Python script to list down all of the running processes, when a simple one line of AWK will do?

Brownie point to you, if you got that this point was not about BASH or Python.

4. Faster Iterations

DSLs greatly improve your speed to release new code into production and reduce your overall Time-to-market. I am a huge advocate of DSLs, so huge, I even recorded a video about it.

Subscribe!

The CONs

1. The choices will give you migraines

The more technologies you know, the more confused you are. You will always find yourself weighting technologies on scales like Developer Productivity, Documentation, Performance, Community etc.

No technology is a clear cut winner. If you think it is, there might be a high possibility that you’ve not seen much world. LOL.

For example, recently I was in a situation where I had to choose between Laravel or Express.js. I am “equally proficient” in both but a master of none. During that phase my thoughts were more like:

“Laravel has everything I need! but Node is faster in general, at-least that’s what they say. I want a fast(est) server for my chat app. Hmm… but with the release of PHP 7 and technologies like HHVM, PHP is also claimed to be much faster. Umm… Express is very light but Laravel has a better templating system. Closures! I like closures. Hey PHP! can I has some closures? What about Functional Programming?”

KILL ME ALREADY, PLEASE. :(

2. It’s hard to keep abreast of all technologies

“Ignorance is a bliss”. I totally agree! At-least as far as keeping up with your tech stack is concerned. When you try to keep up with all of the technologies you’ve ever dealt with, you’ll always find yourself running in all directions and getting nowhere.

“React X.X is released! Gotta read it. Android Oreo is released as well! gotta watch all the developer presentations”

Meanwhile, a newer version of Laravel is also out and deprecated quite a lot of things. Shit! Your knowledge is going to get outdated in no time, no matter how hard you try. If you are away from your favourite technology, even for a month or two, the community is going to introduce and deprecate many features which will make you pull your hair, upon your return.

I still remember when I started coding Pollen Chat, Laravel was 4.2. When I launched Pollen Chat, Laravel was already 5.2-beta. Where was I in the meantime? I was writing the Android app which consumes the Laravel based APIs :P

So, there I was with a brand new service, which I had just launched but the underlying framework was already outdated and there were breaking changes in the newer version, so I could not just “composer update” my code.

3. You’ll become more of a Mercenary and less of an Expert

Juggling between many technologies leaves you with very less time to focus on best practices of any individual technology. You are always razor-focused on making everything work together and you value things like ‘faster time-to-market’. Also, you just have to content yourself, that you’ve picked best tools for the job so the performance you are getting is also maximum because you cannot help it anyway.

You know how to design websites, mobile applications and/or back-end APIs but there are many deep corners of performance, best-practices and security which you never really get the time to gain expertise in, as you are busy keeping up.

4. Corporations are not interested in Mercenaries. Mostly!

You have a portfolio to backup your Android development skills, but still you don’t know the folder structure of an Android project with 99.99% accuracy (This actually happened to me, back in 2016), which proves that you are not an expert in the subject matter.

Interviewer: “You don’t even know the folder structure of an Android project”,

Me: “But, I know where my Java, XML and Gradle code goes…”,

Interviewer: “Nope sorry, not hired!”.

But startups are quickly changing the tech scene. These people have exhibited desires to hire “jacks-of-all-trade”, although there are still many startups which are relying on “Algorithms Trivia” to weed out bad developers.

So, there you go folk! That’s all I wanted to share with the fellow hackers. Please leave a comment if you had a similar experience or something extra to add to this. I also wrote a similar story, back in the day. Read it here:

Full stack development and the mess of syntaxesmedium.com

Thank you for your time.

If you liked this post, kindly recommend it to your network and follow me for more posts like this one. You should also subscribe to my YouTube channel, if you like developing digital things.

Twitter|YouTube|Rayn Studios

Till next time…


Published by HackerNoon on 2017/08/28