Live data from Hacker News

Concepts to help developers master JavaScript

github.com

21–30 of 54 posts

Re: Concepts to help developers master JavaScript

#21
post #17
post #3

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

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 wo…

> It's only as difficult as you make it.

Or as difficult as the authors of the code you're using made it.

Re: Concepts to help developers master JavaScript

#22
post #14

Earlier quoted context omitted.

> 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.

Some 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...

Then again, Lisp, Smalltalk, Haskell, etc. predate JS, from a historical perspective.

Re: Concepts to help developers master JavaScript

#23
post #21
post #17

Earlier quoted context omitted.

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 wo…

> It's only as difficult as you make it. Or as difficult as the authors of the code you're using made it.

Oh 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.

Re: Concepts to help developers master JavaScript

#24
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.

Re: Concepts to help developers master JavaScript

#25
post #16

Earlier quoted context omitted.

This is especially important when considering what you'll see in codebases. e.g. Java may be adding support for more async stuff, but most of the Java codebases I've worked with won't use it.

Async-await is just syntactic sugar over futures/promises and java has those for decades.

It only got the promise equivalent (CompletableFuture and CompletionStage) in java8, which is hardly "decades" ago, and a lot of common stuff like JDBC doesn't support it, so using it can be quite a pain. And that's not to mention the disaster that is checked exception interoperability with the default Java functional interfaces that force constant workarounds...

Re: Concepts to help developers master JavaScript

#26
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...

Re: Concepts to help developers master JavaScript

#27

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 n…

One 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.

Re: Concepts to help developers master JavaScript

#29
post #27

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 n…

One 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.

Yes, this very much describes my experience of working on a gigantic Backbone app while using Elm at home. Work has gotten harder because I’m (rightfully) paranoid about mutation and unable to trust the (fallible) conventions of OO JavaScript.

Re: Concepts to help developers master JavaScript

#30

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 n…

And then you move to Haskell from Elm.

https://haskell-miso.org/

https://reflex-frp.org/

Post reply on HN