Natalia Fedorova, Regional Coordinator

13 July 2020

Python or JavaScript: Which Language You Should Choose in 2020

If you just want to get a head start in IT, you should choose a language with a low entry barrier. After all, you will be in a better position to learn an advanced language after picking up basics the easy way. Let’s see if Python or JavaScript would be the perfect option.

Python or JavaScript: Difficulty

At their core, both Python and Javascript are beginner-friendly languages with syntax relatable to a non-coding person. The environments are easy to deploy and run, and they fit the WYSIWYG (“what you see is what you get”) mantra. Python and Javascript share dynamic binding of variables, maps, filters, generators, and a few more concepts & functions. 

There are, however, notable differences that make coding in Python a more pleasant experience. It may seem a small thing, but there are fewer brackets, braces and all those pesky punctuation marks floating around. Trust me, they add up. JavaScript is also notorious for mind-boggling quirks that are better left for a more experienced and resilient Pythonista version of you. 

Besides, the whole idea of one thing leading to another or a piece of code relying on another piece of code is a bit overwhelming at first. In that sense, Python is less stressful. Lines are mostly executed one after another while working with JavaScript often involves asynchronous programming. 

Python [1] | [0] JavaScript

Python or JavaScript: Entering IT

Short answer: pretty much equal on paper.

JavaScript has a slight edge in the number of job postings. As of early July 2020, JavaScript has some 259,000 job postings on LinkedIn while Python sits at 226,000. Don’t jump to conclusions just yet: Python can be a tool for multiple Junior jobs, such as Automated Testing. The variety makes up for a slightly lower volume.

This brings us to a very important point that could save you time and money. Instead of looking at languages that accommodate Junior job seekers best, pick the job you want to be doing.

 

undefined

 

Python and Javascript are used for varying purposes (more on that later), so you better choose what you want to be doing and master the relevant tool.

Python [1.5] | [0.5] Javascript

Python or JavaScript: Branching Out

This one is very subjective, and not quite on our side. Let’s say you work an office job that has to do with a lot of numbers and/or data. Even on the scale of your own team, you can optimize a lot of processes like reporting with basic Python knowledge and some tinkering with the pandas library. 

On the other hand, freelancers and self-employed people could benefit from JavaScript. Add basic HTML knowledge (from school or uni if you are lucky), and you can build a portfolio page or a cafe website yourself. Your regular visitor may not tell the difference but lower costs and unlimited customization will make a difference in the bottom line.

Python [2] | [1] Javascript

Python or JavaScript: Frontend

This one is simple. Browsers do not execute Python. If you want your page to be accessible, you need to convert Python code to something else. Chances are, you will be using a compiler to Javascript. May as well do the website in Javascript then.

Python [2] | [2] Javascript

Python or JavaScript: Backend

Sorry if you were looking for a definitive answer here, because I don’t think there is one. We’ve already established that Python is a backend language, but JavaScript has taken a step back to handle both (pun intended). You can use Node.js environment to keep the entire product JavaScript.

The general arguments in favor of Python or JavaScript are of about the same size. Python has a larger history of being used for apps and not just web while also being easier. Node.js, while keeping things to the same language and running faster, is not documented as well as Python. 

Python [2.5] | [2.5] Javascript

Python or JavaScript: Game Development

Fair warning: if you want to build triple AAA games, consider the C# language and .NET framework instead. For casual fun projects, JavaScript works better. After all, it’s most likely going to be a browser game. Browsers love JavaScript. We love it too. 

Python [2.5] | [3.5] Javascript

Python or JavaScript: Data Science & Machine Learning

Working with data in JavaScript is like trying to reinvent a bicycle wheel while you can go to the yard and start your motorcycle. Python comes with proven, scalable, and well-documented Data Science and Machine Learning libraries like TensorFlow, NumPy, SciPy. There are alternatives like TensorFlow.js but you’d have less help from people who have potentially solved a similar problem with TensorFlow.

 

undefined

 

The main argument against JavaScript in data tasks, however, is performance. If you want to run multiple Machine Learning simulations, Python solutions will just work better. Sure, you can use Napa.js but why go niche when you can go wide?

Python [3.5] | [3.5] Javascript

Python or JavaScript: Learning Fatigue

Overall, Python is more stable when it comes to all the language’s development. The arguably latest disruptive challenge was introduced in December 2008 with the release of Python 3.0. Python 2.xy code was not backward compatible but Python Software Foundation kept supporting Python 2 until January 2020. Other than that, major Python 3 updates happen about once a year.

JavaScript, however, is an arms race for the best-performing frameworks and libraries. You gotta keep cutting those loading times if you want to rank higher on Google and keep users engaged. The latest hot object (that’s a coder’s synonym for “stuff”) on the market is Google’s Angular from 2016, and the most prevalent library seems to be Facebook’s React from 2013. Coding life is hardly limited to 8 hours at home but JavaScript certainly carries a lot of extra learning to keep up.

Python [4] | [3.5] Javascript

Python or JavaScript: Conclusion

As you can see, Python came out ahead on less than a point in our comparison. Nonetheless, you should avoid treat such comparison with caution, as your criteria could be different. If you've decided to become a Frontend Developer, then JavaScript is the way to go no matter the score. You can start learning both Python and Frontend with our 4-month Junior programmes. 

Special thanks: Jiin Jeong