Y
Y
Yapalenov2018-03-12 13:35:32
OOP
Yapalenov, 2018-03-12 13:35:32

How to learn to write competent JS code?

Guys advise books, articles or other resources on this topic.
The problem is that I have been in the frontend for more than a year, but so far at the level of home projects. Everything I write works, but I understand (at interviews they tell me the same thing) that the code is written terribly, they ask me to explain why I use a declarative and imperative approach, etc., why I don’t divide the code into modules, etc. , when I look at someone else's code, everything is clear to me and I understand that it is written correctly and is well supported, but I also can’t write it myself, because of this I get even more confused :)
Please suggest suitable literature that will help me figure this out .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Strannyk, 2018-03-12
@Yapalenov

Teamwork with code review will help.
All developers go through 3 stages of development:
1. copy-pasting - when, like a dog, you understand everything, but you can't write it yourself;
2. the stage of bydlokoda - when the code solves the problem, but you won’t look at it without tears - experienced colleagues will help you not to get stuck at this stage, who will popularly explain that you don’t need to write like that;
3. stage of enlightenment - when there is an understanding that the code should not only work, but also be supported.
If it is not possible to work in a team, it would be nice to find a mentor who will not break periodically give devastating criticism of your work. Only it is necessary to approach the choice on the basis of objective information about the qualifications of the future mentor. "the OOP tag is not appropriate in the question about JS, since there is no OOP in this language, but only overlays, which are then transpiled into vanilla with babel" (c) - everything is terrible in this sentence.

P
Pavel Novikov, 2018-03-12
@paulfcdd

babel + es5/6 + webpack/gulp to help you. Then you can write good code + this is what is now used everywhere. In general, the OOP tag is not appropriate in the question about JS, since there is no OOP in this language, but only overlays, which are then transpiled into vanilla with babel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question