Python or JavaScript: 5 Tips
When you set out to learn to code, you have dozens of options — and I’m not talking about the languages. You have courses, webinars, seminars, workshops all promising to help you learn to code quickly and easily. Let’s get something clear up front. This is a fallacy. Let me give you an analogy. Harry Potter shows up to Hogwarts knowing nothing. He doesn’t even know why people know his name. He doesn’t know why his parents were targets of you-know-who. He doesn’t know the spells or potions, how to fly, and so much more. This is very similar to learning to code when you start at the beginning. There is a litany of topics to learn and it isn’t easy — I’m not going to lie. Instead, I want to talk about my experience learning Python before JavaScript and why it was the best choice I made.
Tip 1: Syntax
You can think of syntax as the set of rules that govern how language is put together. This typically refers to punctuation such as colons and semicolons. Doesn’t that sound a lot like JavaScript. Punctuation is at the heart of coding in JavaScript: commas, colons, semicolons. This means that you are not only learning the logic and language of JavaScript, you are learning where commas, colons, and semicolons are placed appropriately. This is a tremendous amount of learning that has to take place all at one time. One mistake and your code won’t work. Now, in all honestly that is the same for every language, one mistake and the code breaks. But what about the syntax of Python. Python was my first language, and I am thankful for that everyday. Since Python was originally developed as a teaching language, it’s ease of use and clean and clear syntax have let it to be a favorite of beginners and experts. My own experience is that Python is easier to read and understand. The syntax is less taxing and easy to remember and use properly.
Tip 2: Complexity
JavaScript is not user friendly particularly for beginners and is often referred to as a highly complex modern programming language. On the other hand, Python is tailor made for beginners. Python uses simple functions and variables which are easy to pick up, learn, and use. In addition Python has already cornered the marked as the most preferred language for data statistics and numerical handling. JavaScript does have its upside — it can be used as both a front end and back end language which Python cannot. Unfortunately, Python is majorly a backend language and runs mostly on the server side.
Tip 3: Career Choices
Since JavaScript works on both front and back end, it’s very versatile and many major companies are opting for JavaScript. That doesn’t push Python out of the loop. Python is the program to go with when you want to work with Artificial Intelligence, Machine Learning, and Data Analytics. This is a toss up between the two languages because it really depends on what field you want to be immersed in. A word of caution, if you want to be a data scientist/data engineer, then go with Python.
Tip 4: First Language
Sawai Singh Charan surveyed 500 responses to the question of which language to learn first. JavaScript did not make the list. In fact, further blog posts continued the discussion as to why JavaScript is a difficult first language to learn. Phil Johnson on Python wrote, “It’s friendly, flexible syntax combined with the fact that it’s a scripting language makes it especially good choice for newbie.” And, I couldn’t agree more. When I was learning Python, I wasn’t bogged down with what syntax when, where, and why. Python is a clean language which is easy to write.
Tip 5: The Job Market
The demand for Python developers is up significantly. There was a 21% jump in job demand for Python in the last year. Should I say more? Furthermore, Python developers were one of the highest paying languages behind Ruby. According to salaries, Python programmers in the US can make up to $85K. Just adding Python to your resume will increase your salary by $7K. This is great news. But Python still lags behind JavaScript.
Thank you for taking the time to read this post. If you found it informative, please hit the like button.
I’m always interested in hearing other people’s stories about learning to code, so I challenge you to write a comment or send me an email telling me what your dominant programming language is and your best resource for that language.
Don’t forget to join me on Twitter.