
Concepts to help developers master JavaScript - alexgrcs
https://github.com/leonardomso/33-js-concepts
======
zachrose
One intuition I’ve had while learning Elm is that it’s a fundamentally simpler
language with a smaller number of concepts to learn than JavaScript.

In this list of 33 JavaScript concepts, I count 11 that either do not exist in
Elm or, like Object.assign, do not have an alternative to worry about:

No reference types

No type coercion

No == vs ===, although typeof has a simpler equivalent

Basically all expressions and no statements

No hoisting as such

No prototypical inheritance or prototype chain

No Object.create, no destructive alternative to Object.assign

No factories or classes as such

No inheritance or polymorphism

No design patterns as such, though you could argue that abstract algebra or
category theory are the replacements

No this, call, bind, or apply

The finer points of these are somewhat debatable, but overall my contention is
that removing mutation and local state makes a lot of related concepts just
fall away. A takeaway is that when someone tells you that they’ve learned Elm,
you needn’t assume that this was as huge of an undertaking as learning
JavaScript.

~~~
dan-robertson
> No == vs ===, although typeof has a simpler equivalent

Sure, but elm has its own issues with comparison as these are essentially
implemented as a compiler hack, and only comparable (ie primitive or
lists/tulles thereof) types can be used as keys for the built in map type (so
you need to know about primitive types too)

~~~
tabtab
I'm sorry, but any language that has to rely on "===" to know what's in what
is usually fundamentally screwed up. (Yes, I'll probably get downvoted for
this. Oh well, truth often ain't popular.)

------
sugerman
IMO, these collection of links type resources would be much more useful if the
author curated the list down to something like "Read This_Article for
This_Topic" and let people then just google for more information if they need
it. Just googling and inserting the top 10 links into a list isn't adding much
value.

------
waveforms
I have to mention Dmitry Soshnikov's "JavaScript. The Core" webpage. The
concepts explained in version one published in 2010 helped me land several
contracts. Now I see he has "JavaScript. The Core: 2nd Edition". Thank you
Dmitry!

[http://dmitrysoshnikov.com/ecmascript/javascript-the-
core-2n...](http://dmitrysoshnikov.com/ecmascript/javascript-the-core-2nd-
edition/)

------
z3t4
What got me to love JS was probably learning about variable scope, closures,
and async programming.

~~~
epicide
This is what I try to convey to a lot of people who keep making jokes about
JavaScript being unpredictable and hard to program.

Just like everything else (especially programming languages), you are limited
by your understanding of the concepts. It's only as difficult as you make it.

I think so many people think of it as a toy, never bother to actually learn
how it works, and assume everything either does or should work like it does in
other languages.

~~~
vinceguidry
We're migrating an app from Ruby to NodeJS, and I keep hoping it'll get
better, but everywhere I look, from the inconsistency and constant shifting of
language semantics to the immaturity of the ecosystem, and how the former
practically enshrines the latter, I can confidently state that Javascript is
an objectively worse language. Attempts to solve problems caused by Javascript
only make the whole thing worse.

At the moment, I actually prefer vanilla javascript to ES6-7. ES6 is
inconsistent in awful ways. You still can't rely on bindings to stay put and
new additions like the splat operator just don't work the same way all the
time.

The more I learn JS, the more I hate it. I think eventually the web
development community will come around, Node will lose mindshare, and compile-
to-js languages will find their place in the sun again.

I suspect that people who actually _like_ the language are experiencing a form
of Stockholm Syndrome.

~~~
epicide
> I actually prefer vanilla javascript to ES6-7

ES6 _is_ vanilla JavaScript. Most modern browsers have support >98% of added
ES6 functionality for several major versions at this point. Admittedly,
Node.js is still lacking, but it's getting there.

> You still can't rely on bindings to stay put and new additions like the
> splat operator just don't work the same way all the time.

Unless you have a bug to report about undefined or non-deterministic behavior,
then it must be something you're doing. Random functionality is not intended
behavior.

> eventually the web development community will come around... and compile-to-
> js languages will find their place in the sun again.

This is implying they were ever there. The big ones that come to mind were
terrible. They would produce way more bloated frontends than anything we see
today. In general, adding a layer of abstraction can be incredibly useful
sometimes, but they can come at a steep cost.

What you include in "compile-to-JS" does get a little tricky to define,
though. Things like TypeScript or even Babel can kind of count here. I think
we will likely continue to see these, but I seriously doubt we'll see a
resurgence of anything like GWT again.

> I suspect that people who actually like the language are experiencing a form
> of Stockholm Syndrome.

Sure, but the same can be said for anybody working with computers ;)

~~~
vinceguidry
> Unless you have a bug to report about undefined or non-deterministic
> behavior, then it must be something you're doing. Random functionality is
> not intended behavior.

You wouldn't be saying that if you ran into the behavior we have. Eventually
I'll do more digging to find out root cause. But there's no way it was us.

> I seriously doubt we'll see a resurgence of anything like GWT again.

I'm thinking more along the lines of CoffeeScript. It bifurcates the landscape
even further, but honestly I don't think it can really get any worse than it
is now. But at least it will be building on top of sanity and not the lava
layer.

------
ArtWomb
Really good list. Deserves a section on performance and debug tools as well:
cpu and memory profiling, high res timers, requestAnimationFrame, etc.

------
crescentfresh
I wish everything on this list fell under the "JavaScript" umbrella, but
really they're all conditional on which version of "JavaScript" you're trying
to master. Eg "vanilla" js, ES5, ES6, etc. So it's hard to know what came when
and what you can actually use in the project you might be working in/creating.

------
_greim_
Disappointed that there's no top-level section on iteration. It's a powerful
but under-utilized part of the language.

------
nottorp
This looks like a bunch of generic programming resources. Possibly with
implementations in javascript.

I clicked in hope I'll get something targeted towards developers that have
nothing to do with the javascript "ecosystem" but understand programming
concepts, algorithms etc. Is there such a thing?

------
vorticalbox
This has been posted at my work, it's a very good resource.

------
yoerivw
Thank you for posting

