7 ms·
Concepts to help developers master JavaScript
- vorticalbox 8y agoThis has been posted at my work, it's a very good resource.
- z3t4 8y agoWhat got me to love JS was probably learning about variable scope, closures, and async programming.
- pdpi 8y agoAs opposed to what other language?
- soneca 8y agoMaybe not opposed to any language.
- afandian 8y agoNot GP but variable scope in JS is very different to e.g. C, C#, Java etc. Superficially it appears similar, but the syntax is a faux amis.
- pjmlp 8y agoIs is very similar to Lisp, Clipper or Perl, also known in CS circles as dynamic scope variables.
- edflsafoiewq 8y agoJS's scope is really weird for (let i = 0; i != 3; i += 1) { console.log(i); // i refers to the variable defined below const i = 0; }
- geezerjay 8y agoThose features are hardly exclusive to javascript. Why did they made you love javascript but not any of the myriad of languages that support those features?
- tw1010 8y agoWhat makes you assume z3t4 exhaustively tried every other language before settling on JS? It's not typical that you present your opinion of a tv show by giving the few unique positive traits it has in contrast to the union of all positive traits from tv shows in the same genre. You just watch the show on a micro level, record what you liked about it, and report that, regardless of what the macro landscape looks like. That's the same way coders typically report preference about languages (on a micro level, not a macro level).
- geezerjay 8y ago> What makes you assume z3t4 exhaustively tried every other language before settling on JS? My point was that you'd be hard pressed to find a popular programming language that does not support those features.
- megous 8y agoSome historical perspective: Some languages picked it up along the way. So in my case, I only first found out about closures in JS, after going through several popular languages, that got closures only later on: Pascal, C++, PHP...
- weliketocode 8y agoI wouldn't say love, but I certainly now hold a stronger appreciation of JS after learning about many of its quirks and intricacies.
- epicide 8y agoThis 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.
- tome 8y ago> It's only as difficult as you make it. Or as difficult as the authors of the code you're using made it.
- epicide 8y agoOh absolutely. No language is immune to bad code and bad APIs. A good developer experience requires diligence. That starts with a good understanding of the language.
- vinceguidry 8y agoWe'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.
- mellett68 8y agoWere there any tech reasons for switching from ruby to node?
- yoerivw 8y agoThank you for posting
- ArtWomb 8y agoReally good list. Deserves a section on performance and debug tools as well: cpu and memory profiling, high res timers, requestAnimationFrame, etc.
- zachrose 8y agoOne 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.
- deleted 8y ago[deleted]
- k__ 8y agoYou don't need all of these concepts on an everyday basis. If you don't use ES5 stuff that was replaced in newer versions, things get much simpler. let, =>, === etc.
- technion 8y agoDespite the submitted title containing "to help developers master", the actual Github page title contains "every JavaScript developer should know." I think that casts this post in a different light. If the repo's intent is that "every JS developer should know" everything on this list, the context of this discussion changes.
- _greim_ 8y agoOne thing I've found with functional programming (Elm) is that writing JS requires constant mental effort. E.g. dynamic types, mutations, side effects, state. In Elm all of that neural machinery becomes obsolete, but your brain doesn't just magically switch it off. So Elm feels hard at first, until the concepts sink in a little bit and your brain re-wires itself.
- nottorp 8y agoThis 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?
- sugerman 8y agoIMO, 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 8y agoI 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-2nd-edition/ http://dmitrysoshnikov.com/ecmascript/javascript-the-core-2n...
- _greim_ 8y agoDisappointed that there's no top-level section on iteration. It's a powerful but under-utilized part of the language.
- crescentfresh 8y agoI 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.