⬆️ ⬇️

8 bugs of novice JavaScript developers that prevent you from becoming a professional





Being a JavaScript developer is cool, as the need for good JS programmers is constantly growing in the labor market. Nowadays, there are a lot of frameworks, libraries, and other things that can be used in the work, and to a large extent we should be grateful to open source sources for this. But at some point, the developer begins to spend too much time on JS projects compared to all other tasks.



It is very likely that in the future this will lead to disastrous consequences for your career, but so far you are not aware of this. I myself have made some mistakes in the past, described below, and now I want to protect you from them. Here are eight JS developer mistakes that can make your future not too bright.

We remind you: for all readers of “Habr” - a discount of 10,000 rubles when registering for any Skillbox course using the “Habr” promo code.

Skillbox recommends: The Java Developer Online Education Course.


Using jQuery



jQuery has played a huge role in the development of the entire JavaScript ecosystem. Initially, JS was used to create slide shows and various kinds of widgets, image galleries for sites. jQuery made it possible to forget about code compatibility issues for different browsers by standardizing the use of abstraction levels and working with the DOM. In turn, this helped simplify AJAX and issues with cross-browser differences.

')

However, today these problems are not as relevant as before. Most of them have been resolved by standardization - for example, fetch and API selectors.



The remaining problems are solved by other libraries, such as React. Libraries provide many other features that are not available for jQuery.



When working with jQuery, at some point you start to do strange things: for example, use DOM elements as current states or data, and also write terribly complex code just to find out what's with the previous, current and future DOM state , in addition to ensuring an appropriate transition to upcoming conditions.



Nobody forbids using jQuery, but take the time to learn more about more modern alternatives - React, Vue, and Angular - and their advantages.



Unit Testing Failure



I often see people ignoring unit tests for their web applications. Everything is going fine - until the application crashes with “unexpected error”. And at this moment we get a huge problem, because we are wasting time and money.



Yes, if an application compiles normally without error messages, but when compiled it works, this does not mean that it is ready to use.



Lack of testing is more or less acceptable for small applications. But when programs are large and complex, they are difficult to maintain. Therefore, tests become an extremely important element of development. In this case, changing one component of the application will not damage the other.



Start using testing immediately .



Learning frameworks before JavaScript



I perfectly understand those who, starting to develop a web application, immediately begin to use popular libraries and frameworks like React, Vue or Angular.



I used to say that you first need to learn JavaScript, and then frameworks, but now I am convinced that all this must be done simultaneously. JS changes extremely quickly, so some experience using React, Vue, or Angular needs to be gained while learning JavaScript.



This is beginning to affect the requirements put forward for candidates for the position of developer. Here, for example, is what I found by searching Indeed for the “JavaScript” key.







The job description says they need knowledge of jQuery and JavaScript. Those. for this company, both components are equally important.



Here is another description that only lists the “basic” requirements:







And so in about half of the vacancies that I looked at. Nevertheless, I believe that the correct ratio of time to study JS and frameworks is approximately 65% ​​to 35%, and not 50 to 50.



Reluctance to get acquainted with the concept of "clean code"



Every novice developer should learn to create clean code if he wants to become a professional. You should familiarize yourself with the concept of “clean code” at the start of a career. The sooner you begin to follow the provisions of this concept, the sooner you will get used to immediately write clean code that is easy to maintain afterwards.



By the way, to understand the benefits of good and clean code, you don’t need to try to write bad code yourself. Your skills will come in handy later during work, when you are horrified by someone else’s bad code.



Too early work on large projects







At the beginning of my career, I made a big mistake: I tried to take on a major project when I was not ready for it yet.



You may ask what is wrong here. There is an answer. The fact is that if you are not middle and not senior, then you most likely will not be able to finish your “big project”. There will be too many elements and things to consider. And you can’t do it if at the very beginning of your career you haven’t developed the habit of writing “clean code”, using tests, scalable architecture, etc.



Suppose you still spent a lot of time on this project, did not complete it, and now you are trying to move to the middle level. And then you suddenly realize that you cannot show this code to anyone because it is not very good and you need refactoring. However, you spent a lot of time on this “project of the century”, and now you have no examples of good work that can be added to your portfolio. And you concede one interview after another to other candidates who can show their work, albeit not very large ones, in the portfolio.



In any case, in the future you will have to refactor, because the code is not too good, and the technologies you used are not quite what you need. As a result, you realize that it’s easier to rewrite everything from scratch than to try to fix it.



Of course, all this can be added to the portfolio, but the potential employer will see a lot of shortcomings there and come to disappointing conclusions for you.



Reluctance to study data structures and algorithms



You can argue for a long time about when you need to start studying the data structure and algorithms. Someone proposes to do this even before mastering JavaScript, someone - after.



I believe that it is not necessary to learn this in detail at the start, but understanding the algorithms is worthwhile, as this will provide a basic understanding of the operation of computer programs and calculations.



Algorithms are an integral part of any calculations and programs. Actually, the computer programs themselves are a combination of a set of algorithms and data structured in a certain way, that’s all.



Refusal of physical activity







For the developer it is very important to play sports. I am not a coach, but I watched how my body changes - year after year. Therefore, I can tell you what the lack of exercise leads to.



My first job was quite problematic for a number of reasons, and one of the problems was precisely in the fact that in just a year I gained almost two dozen kilograms. Then I actively studied JavaScript.



If you do not play sports, you run the risk of gaining weight, and there will be many negative consequences: obesity, migraines (including chronic ones), high blood pressure, etc. The list of problems is truly endless.



Social isolation







Family and loved ones are important. Having plunged into JavaScript learning and underestimating the importance of your mental and emotional life, you run the risk of becoming depressed, becoming irritable, stop sleeping normally, and much more.



findings



I hope some of this comes in handy. If you take care of yourself today, then you will not have to correct errors later.



Skillbox recommends:



Source: https://habr.com/ru/post/461505/



All Articles