I wonder whether it’s less useful to know the True names of these concepts when debugging this type of problems in the age of LLM assistants..
..but I remember that many years ago it was very useful for me to dive deep into related concepts. The post seems to talk about JavaScript (even if not having a line of code seemed like a deliberate choice), so here are a few potential deep dive suggestions:
variable declaration vs initialization,
hoisting vs temporal dead zone,
block- vs function-level lexical scope vs Closure vs dynamic this,
function parameters vs arguments (doesn’t matter which is which, just that those are 2 things for anything related to all above concepts),
constant vs immutable (especially for someone working in both JS and Python, it can be a trap that a mutable default value of a function parameter in JS is assigned on each function invocation, but in Python it’s assigned only once on function declaration),
equality by identity/value (when both kinds of undefined are the same, but null is different) vs coertion (null is equal to undefined) vs in operator (the 2 undefineds are different)
e.g.if ('b' in a) a.b.c() is a bug and the conditional should have been a.b?.c() .. using TS type A = {b?: {c: () => void}} prevents that bug,
NPE in general (null pointer exceptions—most infamous in Java, but the concept is the same in many other languages .. also helps to appreciate the “New Player Experience” in Factorio when it was in early access)
My favourite instance of NPE-like error is “X is not a function” (favourite as in Stockholm syndrome, not as in easy to understand when you see it first).
An alternative approach is to learn about the concepts from a completely different perspective of https://justjavascript.com/ - wires and telescopes instead of pigeon holes and pointers 🔭
I wonder whether it’s less useful to know the True names of these concepts when debugging this type of problems in the age of LLM assistants..
..but I remember that many years ago it was very useful for me to dive deep into related concepts. The post seems to talk about JavaScript (even if not having a line of code seemed like a deliberate choice), so here are a few potential deep dive suggestions:
variable declaration vs initialization,
hoisting vs temporal dead zone,
block- vs function-level lexical scope vs Closure vs dynamic this,
function parameters vs arguments (doesn’t matter which is which, just that those are 2 things for anything related to all above concepts),
constant vs immutable (especially for someone working in both JS and Python, it can be a trap that a mutable default value of a function parameter in JS is assigned on each function invocation, but in Python it’s assigned only once on function declaration),
equality by identity/value (when both kinds of undefined are the same, but null is different) vs coertion (null is equal to undefined) vs in operator (the 2 undefineds are different)
e.g.
if ('b' in a) a.b.c()is a bug and the conditional should have beena.b?.c().. using TStype A = {b?: {c: () => void}}prevents that bug,NPE in general (null pointer exceptions—most infamous in Java, but the concept is the same in many other languages .. also helps to appreciate the “New Player Experience” in Factorio when it was in early access)
My favourite instance of NPE-like error is “X is not a function” (favourite as in Stockholm syndrome, not as in easy to understand when you see it first).
An alternative approach is to learn about the concepts from a completely different perspective of https://justjavascript.com/ - wires and telescopes instead of pigeon holes and pointers 🔭