Live data from Hacker News

How to Become a Great JavaScript Developer

blog.ustunozgur.com

81–90 of 171 posts

Re: How to Become a Great JavaScript Developer

#81

Earlier quoted context omitted.

I personally am so over this argument. Sure, that is roughly a fact about the time in which it was designed... but that was 20 years ago. Since then there has been a team of some of the best programmers in the world maintaining and advancing the language.

That's irrelevant; advancing the language isn't an exercise in programming language design, it's an exercise in getting everyone to support the extension and in avoiding breaking legacy code. It has almost nothing to do with the maintainer's talent as programmers or PL experts. If you doubt this argument, consider the fact that the horrible scoping, the weak typing, the insane casting rules are still here to this day…

Well, a lot of the little issues are being slowly fixed (see let and scoping in ES6). This goes back to the point of the person you are responding to.

This is a thought more than a full-fledged argument, but perhaps little issues with the language actually can and do make people better developers when they are aware of them. My friend started driving a scooter. Dallas isn't particularly conducive to that. My friend says he has since become a better driver because he knows one little screw up by him or someone else can end his life. Similarly, you'd better be aware of weak typing and casting and code accordingly or you might get hurt. Of course, you shouldn't have to...but that doesn't make people worse developers.

But the truth is, JS has a lot of features which make it great for becoming a good developer. It's less class-based than Ruby and has better lambdas than Python which I would argue make it better for functional programming than either.

Re: How to Become a Great JavaScript Developer

#83

I've never learned JS completely, just dangerous half knowledge from stackoverflow answers or blogs. Should I jump into ES6 directly or learn ES5 and learn ES6 when it is implemented across all browsers ?

If you been doing a lot of JS for web stuff, and used SO etc to check things but don't have a thorough understanding of the language I would recommend the book "JavaScript the good parts"

Re: How to Become a Great JavaScript Developer

#84
post #60

Earlier quoted context omitted.

This made me gag, years ago: // Statements can be terminated by ; doStuff(); // ... but they don't have to be, as semicolons are automatically inserted // wherever there's a newline, except in certain cases. doStuff() // Because those cases can cause unexpected results, we'll keep on using // semicolons in this guide.

Ah, the "minify" bug: forcing people to put statement separators into a line oriented language. Think of semicolons in JS like colons in BASIC: they let you stack multiple statements on a line. Then, go learn what the language REALLY thinks is the end of a statement, which is not "I put in a semicolon". Too bad JS doesn't use (an explicit) backslash for line continuation, rather than guessing when a line/statement wa…

Missing semicolons have more pitfalls than just minifiers being naughty.

  return
  someExpression
will parse out as:

  return;
  someExpression;
and you have assumption of function call in

  x = y
  (z).whatever()
which parses out as

  x = y(z).whatever()
Nothing hint or lint wouldn't catch though. IMHO, you really need to be special to avoid explicitly writing out semicolons, but to each his own. I can maybe give it a point for unique style. :)

Re: How to Become a Great JavaScript Developer

#85

I've never learned JS completely, just dangerous half knowledge from stackoverflow answers or blogs. Should I jump into ES6 directly or learn ES5 and learn ES6 when it is implemented across all browsers ?

Just learn ES5 and then take the 10 minutes it takes to learn ES6's features. It doesn't add that much.

Re: How to Become a Great JavaScript Developer

#86

Books are a waste of time. Most of them are garbage to begin with, and most of them are practically obsolete by the time they are published. Few have any lasting staying power. Besides, nobody ordained the author to be an authority on the subject. He was just a guy who wrote a book. It's zero indication of the quality of the content. Just write code. Practice, practice, practice.

No, books are way better than reading blogs and forums. They keep a context and enforces the same style through the whole book which I find very useful

Re: How to Become a Great JavaScript Developer

#87
post #3
post #2

Learn Dart :)

As minimalistic as your comment is, I think it points to the single most important truth about JS: It's practically impossible for human beings to write “good” JS code. The only hope you have is using a sane language with sane concepts that can be compiled down to the JavaScript of the week (ES6, ASM.js, the works...). I would argue that JS should be handled analogously to Assembler: Good for you if you understand it…

> I think it points to the single most important truth about JS: It's practically impossible for human beings to write “good” JS code.

I'm sorry, but that's just an absurd statement. JS isn't that bad or confusing.

Re: How to Become a Great JavaScript Developer

#88
post #60

Earlier quoted context omitted.

This made me gag, years ago: // Statements can be terminated by ; doStuff(); // ... but they don't have to be, as semicolons are automatically inserted // wherever there's a newline, except in certain cases. doStuff() // Because those cases can cause unexpected results, we'll keep on using // semicolons in this guide.

I haven't gotten much into Javascript yet, but is there any reason I would not terminate with semicolons? Without understanding which "certain cases" won't have them inserted automatically, relying on that feels like asking for trouble.

As a general case I recommend always terminating each statement with a semi-colon. Then it is explicit to the interpreter and other coders (and "other coders" includes "you six months later when you've forgotten most of what you did today") that you intended this to be the end of the statement and the next line to be the start of a new one.

Only ever leave the semi-colon out at the end of a line when you are explicitly using a multi-line statement to make your code more readable.

This makes your intent unambiguous in both cases; to the interpreter/compiler, to other tools, and to other humans.

Re: How to Become a Great JavaScript Developer

#89

I've never learned JS completely, just dangerous half knowledge from stackoverflow answers or blogs. Should I jump into ES6 directly or learn ES5 and learn ES6 when it is implemented across all browsers ?

If you been doing a lot of JS for web stuff, and used SO etc to check things but don't have a thorough understanding of the language I would recommend the book "JavaScript the good parts"

JavaScript the Good Parts shouldn't be the recommended book anymore (and I think even Crockford himself said something along that line in one of his newer videos, couldn't find it though... it's been a while)

Re: How to Become a Great JavaScript Developer

#90
No. Not this. Net even close to this. Let me illustrate:

How to become great at Sports: - Read books about sports. - Watch other people play sports. - Read in-depth analysis of past sports games.

How to become great at Playing Violin: - Read books about playing violin. - Real sheet music by the great masters. - Listen to many concerts.

It's inherently obvious that the above approaches are totally and completely wrong. How do you become good at anything? You practice it. You do it. You have a coach or teacher or mentor who can give you pointers, but lets you make mistakes. You have someone who lets you get things wrong the first time, so that you can see the consequences.

There is a time and place for theory, for reading, for analysis, and this is too part of the learning process, but this is not at all the most important tool for becoming great at something.

Theory, analysis, critique, history, and context all matter when learning any skill, but first, you must build the fundamentals. First, you must do the thing and once you reach a level where you really understand the thing, then and only then can you begin the more introspective task of theory and analysis. Even without these steps, the best way of becoming great is to DO.

Post reply on HN