Do you have any tip for learning js at it's fundamentals? internals, advanced patterns and everything that can relate to understand it in deep?
Ask HN: Changing my mind about JavaScript
1–10 of 73 posts
Re: Ask HN: Changing my mind about JavaScript
#2More seriously, the MDN documentation is really useful[1]. Some of the advanced topics listed on that page may be a good place for an experienced engineer to start?
- Inheritance and the prototype chain - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inhe...
- Memory management - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Memo...
- The event loop - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Even...
[1] - https://developer.mozilla.org/en-US/docs/Web/JavaScript
Re: Ask HN: Changing my mind about JavaScript
#3Tips:
• If you like static typing, you’ll want to use TypeScript. It’s more work to set up, but it catches many bugs, especially subtle ones where JavaScript’s semantics are not intuitive.
• I learned a lot about JavaScript (and Node.js) by writing shell scripts in Node.js.
My books on JavaScript, TypeScript and Node.js shell scripting are free to read online and target people who already know how to program: https://exploringjs.com
Re: Ask HN: Changing my mind about JavaScript
#4There not much advanced to learn.
Thanks to single threaded design you basically just write whatever you intend to do and it works.
With a proper mix of oop and fp there is no place for “advanced patterns” and other over-engineering diseases in a lean js world.
The most terrible and ungly js code ive seen are from former .net and java developers.
I suggest you unlearn all the “patterns” and keep it as simple ad possible.
Re: Ask HN: Changing my mind about JavaScript
#5Re: Ask HN: Changing my mind about JavaScript
#6Build something you think is fun. Take a static index.html page without any build tooling (just open the file with a browser), link a JS & CSS file to it, and make a cool thing with animations or interactivity. Maybe try to remake some cool interactive thing you saw somewhere
Re: Ask HN: Changing my mind about JavaScript
#7Too many times, when people complain about javascript, what they are really complaining about is the hectic nature of web development. You have three trillion dollar companies (Google/Chrome, Microsoft/Edge, Apple/Safari) actively fighting over agreed upon standards for how the dom is rendered and manipulated. Try and learn any language in that environment, and you'll have a very frustrating time
Why functional programming? Javascript was one of the earlier mainstream languages to support passing around functions as first class citizens, and it's often an aspect of the language that gets downplayed. By and large, javascript sits at the sweet spot of allowing you to do cool functional programming concepts, without all the strictness and verbosity of a language like Haskell. Is that a good thing? It depends, obviously. But for the sake of "Change my mind", this is where I bet you'll start looking at it in a different light
I'm not saying it's the best/one-true language. It's just another cool tool to have on your tool belt
Re: Ask HN: Changing my mind about JavaScript
#8Re: Ask HN: Changing my mind about JavaScript
#9Projects don't have to become very large at all before static types are better & more productive than dynamic types. Especially for multi-person projects, or ones that last for a while so you forget stuff.
Re: Ask HN: Changing my mind about JavaScript
#10This is Clojure based, but there is a lot of similarity to js once you get past the syntax: https://mishadoff.com/blog/clojure-design-patterns/