JavaScript Abuse — Article 1. JS vs. Python: Battle Royale
JS Queen
Posted on August 8, 2023
JavaScript Abuse — Article 1. JS vs. Python: Battle Royale
Which language should you learn first? Maybe it should be Python because everyone says it’s easy? Oh, wait, there’s also something like Java or is it JavaScript? Oh, are they different? Of course, I should start with C++ because it’s what THE real programmer would choose?
Table of contents
Intro
Why is Python hard?
The Stories of Python and JavaScript
Outro
Sources
Intro
When you have a buzzing idea to learn how to program in your poor innocent head, you start with such a google search as: “Which/what programming language should I learn as my first” or something from these lines. It’s by far one of the most popular questions asked on the web about programming. How do I know? Statistics, of course. A fascinating tool AnswerThePublic listens to data from search engines like Google. It then cranks out phrases and questions folks are asking around for your input. That’s how I got a beautiful chart with the most popular questions.
After you insert your pressing question you get a result: Python is the easiest language to learn especially if English is your first language. Stop, stop, stop… Then which human language do other programming languages use? Chinese*? I speak Chinese fluently and I checked! Other programming languages mostly use English. Unless it’s some specific language created for narrow purposes.
Let’s take a look at what Python is used for: AI and machine learning, Data Analytics, and Data Visualisation. Does that even sound beginner-friendly to you? Not to me.
Why is Python hard?
Okay, that was a fascinating intro, but let’s get down to business, ladies and gentlemen. I’m not a chauvinist and I’m not saying Python is a bad language to learn. I don’t want to advertise JS either. I want to bring an interesting discussion forward: when have we started to attach qualitative features such as ‘good/ bad’ to a programming language?
IMHO, the question “Which/what programming language should I learn as my first” is just wrong. The first question you should ask yourself is “What am I gonna do with my programming knowledge?”. What do programmers do anyway? Most people respond without blinking that programmers build websites. So, here you are. If you search “What language is used to build websites”, you’ll see that JavaScript is one of the most popular ones. However, you can hypothetically get answers like HTML and CSS... Important! But not omnipotent.
If you search for something like “Why isn’t Python a beginner-friendly language?”, you’ll get a bunch of results which go step by step in the depth of all the inconveniences Python has. But you know, the same goes for JavaScript and for C. Python has an interesting peculiarity with indentation: so you should always be on a look up. JavaScript has some problems with browser support. The browser interpret JavaScript differently in different browsers. As a developer I face it sometimes. Like I can build and debug my app with google chrome dev tools. Consequently, when I check my pages on Safari, they might look different and in a very unexpected way. When I worked with C, for instance, insufficient memory management was definitely quite a tricky issue to be aware of. And so on. I bet all developers face a gazillion challenges in their day to day work. Whether it’s some programming language’s peculiarities or performance, it’s normal.
The Stories of Python and JavaScript
Let’s also look at Python and JavaScript stories. They are quite intriguing. First, which of the aforementioned is the youngest? What do you think? Well, I hope you got it right. I’ll keep it a secret for the time-being, though. Let’s go back to the early mid-1990s. It was an extremely crucial time for the Internet. Key players were Microsoft with its Internet Explorer and Netscape with its Navigator. In September 1995, a Netscape programmer Brandan Eich developed a new language. It was written in the nick of time, in 10 days(!). What a genius, huh?! Originally the name given was Mocha, then it was renamed to LiveScript, and finally the agreement was reached upon JavaScript. If you’re curious about Netscape Navigator’s destiny… Well, it was left unsupported from 1 March 2008. If you wanna have some fun, well, it’s archived and is still available. I’ll share a link in my blogpost notes.
Let’s learn Python background. In the late 1970s BBC aired a show called Monty Python’s Flying Circus. In December 1989 Guido Van Rossum from the Netherlands started to implement a new versatile programming language. It happened to be that Van Rossum really liked that show. This is how Python got its name when it was published later in 1991. And how we kids learn a bit of culture from the 70s. And yes, Python is a bit older.
Python and JavaScript are not alike. They were created in different times by smart people from various countries and for divergent purposes.
Outro
I hope this article was helpful for some people who are struggling with the choice of their first language or maybe it gives some thoughts to more experienced devs.
All in all, the current short first episode(post) is a small introduction to my way of explaining things. In the next episodes we’ll dive deep into topics such as what the heck is Object Oriented JS or Functional JS for this matter; how is it even possible for JS to be used on SalesForce(and what’s SalesForce once again), how 4 plus 2 can give us 42, and much more.
Opt out for now. But can’t wait to see you again soon!
*Funny enough there is a Chinese Python translation. This version uses keywords and built-in identifiers all translated into Chinese. Plus, there’s a language called Wenyan. Apparently this marvel closely follows the grammar and sentence structure of Classical Chinese(the namesake of the programming language). Thankfully, it’s compiled into JavaScript and Python.
Sources:
Sweigart, A. (2020). Automate the boring stuff with python: Practical programming for total beginners. No Starch Press.
Haverbeke, M. (2019). Eloquent javascript: A modern introduction to programming. No Starch Press.
Posted on August 8, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.