Software Developers Career Advices

    Why people hate JavaScript?

    8/10/2022

    Is it worth learning JavaScript in 2022?

    JavaScript is one of the most popular programming languages in the world. It is used to write codemillions of websites and is a required language for many coding jobs.

    However, many programmers hate JavaScript and consider it to be a terrible language. In this article, we will explore the reasons why people dislike JavaScript and whether it is worth learning in 2022.

    wphjs1.png-icon

    What is Javascript?

    Firstly, let's cover the basics. JavaScript is a programming language that was created in 1995. It was designed to make web pages more interactive and allow for a more complex function call than HTML and CSS alone could provide.

    JavaScript is a versatile language that can be used for writing code wide variety of applications and websites. From simple things like drop-down menus to more complex applications like animated graphics and interactive forms, JavaScript makes it possible to create an immersive experience for users. 

    JavaScript has become one of the most popular programming languages in the world and is used for writing code on almost all websites.

    The primary use for Javascript is writing code for frontend development, which is the process of creating the user interface and interactivity for a website or web application. Javascript developers use the language to create websites and web applications that look and feel responsive, fast, and have all the cool features of a modern webpage.

    While it is most commonly used for frontend development, JavaScript can also be used on the server-side through a technology called Node.js. This allows developers to use JavaScript to write applications that run on the server, making it possible to build entire applications in JavaScript from start to finish.

    There are also many different frameworks and libraries available for Javascript developers to use. These can be used to help speed up the development process by providing pre-written code that can be easily integrated into a project. Some of the most popular frameworks and libraries include React, Angular, and Vue.js.

    No matter what your specific needs are, there is likely a Javascript framework or library out there that can help you get the job done.

    wphjs2.png-icon

    Javascript and web development

    As mentioned Javascript can be used for developing entire web applications through to smaller-scale tasks such as form validation. However, some of the most popular uses for Javascript include:

    Front-end development - This is where Javascript really shines. It can be used to create interactive websites and web applications.

    Server-side scripting - Node.js is a popular platform that allows you to run Javascript on a server, making it possible to build dynamic web pages before they are even sent to the user's web browser.

    Game development - With the help of HTML canvas and a few other libraries, Javascript can be used to create simple browser-based games.

    Mobile app development - Javascript features can be used to develop cross-platform mobile applications through frameworks such as React Native allowing you to code once and deploy to multiple platforms.

    Back-end web development - In addition to Node.js, there are a number of frameworks that can be used for back-end coding with Javascript, such as Express.js and Meteor.

    As you can see, there are a wide variety of tasks that can be completed using Javascript. However, it is also commonly used for adding interactive elements to websites.

    wphjs3.png-icon

    How commonly used is Javascript?

    A 2021 survey of over 19,000 coders showed that JavaScript is now used by more than 16.4 million developers globally making it the world's most popular programming language by a wide margin.

    This is an increase of more than two million coders compared to the previous year.

    The survey also found that JavaScript is now used by 67.0% of all developers, making it the most commonly used programming language. However, it isn't the only language being used.

    In second place is HTML/CSS, which is used by 62.0% of developers. Python comes in third with 41.0%.

    JavaScript’s popularity has grown steadily over the past few years as the language has become increasingly essential to building user interfaces and web applications.

    wphjs4.png-icon

    Why do people hate writing JavaScript?

    So far so good, right? It seems like Javascript is a widely used and versatile language that can be used for a variety of purposes.

    So what's the problem?

    Well, there are a few of them.

    It's a bad language for beginners

    First of all, the language itself can be quite confusing. It's not always easy to read or understand, especially for beginners. This can make it difficult to get started and lead to frustration when people first encountered JavaScript.

    Compared to other languages Javascript is a loosely typed language or weakly typed language, which means that you don't have to declare variables before using them, which can be confusing for people coming from other languages. The syntax can also be very confusing and there are a lot of ways to do things, which can make it hard to know which just what is the best way to do something.

    When you're learning a traditional language, like French, you normally start with the basics (hello) and then move on to more advanced concepts (hello, nice to meet you). There is a linear progression that you can follow.

    With Javascript, there is no real linear progression or language standardization as there is with other programming languages. You can start with the basics, but then you'll quickly get to a point where you need to learn more advanced concepts just to be able to do basic things. This can be very frustrating for beginners.

    It's the equivalent of learning how to say 'hello' in French, and then being asked to hold a 10-minute conversation about submarines so you can learn how to say ' nice to meet you'. It's a confusing language syntax.

    There are also a lot of different frameworks and libraries available for Javascript, which can make it difficult to know which one to use or learn. Each framework has its own way of doing things, which can make it hard to switch between them or even understand how they work.

    This can be very off-putting for people who are just starting out, and it's one of the main reasons why so many people in the Javascript community give up on learning Javascript.

    It performs differently on different browsers

    Despite being standardized, Javascript performs differently on different web browsers. This is because each browser has its own engine that interprets the code differently. This can make it difficult to test and debug code, as you never quite know how it's going to behave.

    For obvious reasons, this is a huge pain for developers and one of the main reasons why people dislike Javascript. It's the most commonly used code for front-end web development, but coders are unable to get predictable results for the same code across all browsers, getting different results from the same functionality on different browsers like Internet Explorer or Chrome.

    The constant churn

    Javascript is also a language that is constantly evolving and changing. New JavaScript features, features are constantly being added, and old ones are being deprecated or removed. This can make it difficult to keep up with the latest trends, and it can be hard to know which parts of the language will still be around in a few years' time.

    This means that code written today may not be compatible with future versions of the language, and it also makes it hard to find help when you're stuck because the solutions that worked in the past may no longer work. Cool features today might not work tomorrow.

    It also means that, if you take a break from coding in JavaScript for a year or so, you may come back to find that the language has changed so much that you no longer know how to use it.

    wphjs5.png-icon

    The lack of tooling compared to other languages

    Another downside of JavaScript is that it doesn't have as much tooling available as some other languages and it can't handle object-oriented programming (OOP language) in the way other object-oriented languages can.

    This means that there are fewer tools to help JS devs automate tasks, debug your code, or manage your dependencies.

    It also means that it can be harder to find libraries and frameworks that work well with JavaScript.

    This also doubles down on how difficult it is for new developers to learn JavaScript, as they not only have to learn Javascript itself but also how to use all of the data types, with each data type being unique.

    It's not a very secure

    Another issue with Javascript is that it's not very secure. Because it's so easy to use, it's often used by malicious hackers to insert malicious code into websites. This can cause all sorts of problems, from stealing data to crashing browsers.

    The primary reason for these security vulnerabilities is that JavaScript is a client-side scripting language. This means that the function definition is executed on the user's computer, not on the server. So, if there's a security hole in the code, it can be exploited by anyone who visits the site.

    This makes it hard to keep track of what your code is doing and makes it more difficult to find and fix security vulnerabilities. It also means that JavaScript is a bad language for secure sites and is a prime target for attacks by viruses and other malware.

    It uses global variables

    A global variable is a variable that is available anywhere in your code. This can lead to conflicts between different parts of your code, and make it difficult to keep track of what's going on. By using a global variable, you can end up with code that is hard to debug and maintain.

    It's not compiled

    JavaScript is an interpreted language, which means that the browser executes it at runtime. This makes it slower than languages that are compiled, such as C++.

    This is because the browser has to parse the code and work out what it needs to do before it can run it.

    It's not typed

    JavaScript uses dynamic typing, which means that you don't have to declare the type of a variable when you create it. This can lead to some strange bugs, such as adding two strings together and getting a result that is not what you expect.

    Quirky and unconventional syntax

    JavaScript's unoriginal and unusual syntax it the root of a lot of its problems. This is particularly true of the way JavaScript handles type coercion or bugs. There is even an entire GitHub repository for this. It's incredibly frustrating to programmers who have already learned to write JavaScript. Creating JavaScript scripts can be confusing and unresolvable, and can create a huge amount of problems if the developer can't understand them.

    It uses a prototype inheritance mechanism to write code

    JavaScript uses a prototype-based inheritance mechanism, which is different from the class-based inheritance used in languages like Java. This can be confusing for developers who are used to the more traditional way of doing things and is one of the primary reasons people hate Javascript.

    wphjs6.png-icon

    Is it worth learning JavaScript in 2022?

    The issues listed are just some of the reasons that programmers hate JavaScript. However, the reality is that JavaScript is still a popular language, and it is still used by many developers.

    If you are thinking of learning JavaScript, or if you are already a JavaScript developer, then the answer to this question is probably yes. JavaScript is not going away anytime soon, and it is still a good language to learn.

    Learning Javascript can be a slog, but if you want to be a web developer, you will need to learn it at some point. As we mentioned, research shows that 16.4 million developers globally still use JavaScript.

    This number is actually increasing year over year, so it’s likely that the reason coders hate JavaScript has more to do with the language’s quirks than anything else. But even if you don’t love JavaScript, there are still plenty of good reasons to learn it.

    JavaScript is a good language to learn because it is:

    • Popular - As we mentioned, JavaScript is one of the most popular programming languages in the world. This means that, if you're looking for a job as a coder, then learning JavaScript might be a necessary step. This is doubly true if you're looking to become a web developer

    • In-demand - There are plenty of jobs that require JavaScript skills.

    • Versatile - You can use JavaScript for front-end and back-end development, as well as for game development and mobile apps.

    So, even though people may hate JavaScript, it is still a good language to learn in 2022. Thanks for reading! We hope this article was helpful.