Live data from Hacker News

Eloquent JavaScript 4th edition (2024)

eloquentjavascript.net

171–180 of 249 posts

Re: Eloquent JavaScript 4th edition (2024)

#172
post #87
post #49

Earlier quoted context omitted.

"binding" seems like a more casual term for memory pointer. I guess if people are just getting started with programming it make sense to simplify things a bit.

My point is that it's not a simplification, it's precisely how the language works: bindings between values and names (JavaScript has no separate notion of memory pointer; everything is a "pointer"). (Similarly for Python: https://nedbatchelder.com/text/names1.html ) Describing variables in this way gives readers the correct understanding, and the analogy of tentacles is no harder than that of boxes. Such things are w…

If the explanation doesn't mention memory positions then it is a simplification.

Re: Eloquent JavaScript 4th edition (2024)

#173
post #90

Earlier quoted context omitted.

+1 for "You don't know js", it's a must read for any js programmer IMO. I haven't read eloquent JS though, you say it's a different level of learner. Can you expand a bit? Is Eloquent for after "you don't know js" or vice-versa? Edit: nevermind, reading the TOC of eloquent JS gave me a good enough idea

I get so jealous that people can absorb information via books as an adult. I can read the same chapter a hundred times and nothing sinks in. I know this is off topic but do you, or anyone passing, have a system or tips for how y'all do this? I've got so many programming books but they only collect dust after I read through them without benefit.

When reading a book, I don't do anything special, but I frequently stop and think about what I've just read. It's not something I do by a command, either: it's just that a good book engages my attention, and then I kind of "chew" on it.

Unlike others here, I never take notes, and rarely do suggested exercises. But I read and think through examples; and as to exercises, I do think of "how I would approach it" and "what is that the author wants me to learn from this exercise".

Re: Eloquent JavaScript 4th edition (2024)

#174
post #164

Earlier quoted context omitted.

Everyone has different learning styles. I retain maybe 90% of what I read, but only 10% of what I hear. So videos and any audio are the worst formats for me to learn anything. The first step is figuring out what your learning style is.

This is debunked to some extent. Veritasium made a good video about it. https://www.youtube.com/watch?v=rhgwIhB58PA Personally I find a multi-pronged approach is necessary to really learn anything. Read it. Read it again. Visual guides are helpful. Work some examples. Make some mistakes, debug them, find the corner cases, write tests. Eventually when I've poked around the material for a while it starts to bed in. Thr…

For me the essential part of comprehending new information is my own thinking on what I'm getting. When reading a book, I stop frequently to think, it's quite natural for me. Often go back a few paragraphs or pages, re-read them with the new understanding, think again, go ahead...

All of this is possible with video and audio in principle, but much less natural and much less convenient; also video somehow "hypnotize" me and I don't feel the urge to think about what I see and hear at the moment; perhaps only afterwards if at all. I have a feeling "oh I get it", but not much remains afterwards.

So I absolutely prefer text to audio or video when learning.

Re: Eloquent JavaScript 4th edition (2024)

#175
post #90

Earlier quoted context omitted.

+1 for "You don't know js", it's a must read for any js programmer IMO. I haven't read eloquent JS though, you say it's a different level of learner. Can you expand a bit? Is Eloquent for after "you don't know js" or vice-versa? Edit: nevermind, reading the TOC of eloquent JS gave me a good enough idea

I get so jealous that people can absorb information via books as an adult. I can read the same chapter a hundred times and nothing sinks in. I know this is off topic but do you, or anyone passing, have a system or tips for how y'all do this? I've got so many programming books but they only collect dust after I read through them without benefit.

That's how I learnt programming (self study) as a high schooler more than 2 decades ago: by studying books (affordable fast internet connection wasn't a thing at that time).

Start from chapter 1, study the concepts and play with the code examples a few times till you understand. Usually there are exercises at the end of each chapter. Try to work on those.

Re: Eloquent JavaScript 4th edition (2024)

#176

Earlier quoted context omitted.

I get so jealous that people can absorb information via books as an adult. I can read the same chapter a hundred times and nothing sinks in. I know this is off topic but do you, or anyone passing, have a system or tips for how y'all do this? I've got so many programming books but they only collect dust after I read through them without benefit.

Are you reading programming books the same way you would read a fiction book? If so, stop doing that. Programming or any technical learning is a hands on experience. Take notes and apply techniques, using pen-and-paper or the keyboard, as they are presented. If you really have to just "read" a technical book, IME a less-is-more approach works best. 5-10 minutes at a time, not even a chapter at once. Maybe a few parag…

> I find my morning "business" is the perfect time to this sort of reading using the Kindle app on my phone.

Beware of hemorrhoids later in life if you’re spending too much time sitting on the throne.

Re: Eloquent JavaScript 4th edition (2024)

#177

Earlier quoted context omitted.

I get so jealous that people can absorb information via books as an adult. I can read the same chapter a hundred times and nothing sinks in. I know this is off topic but do you, or anyone passing, have a system or tips for how y'all do this? I've got so many programming books but they only collect dust after I read through them without benefit.

Are you reading programming books the same way you would read a fiction book? If so, stop doing that. Programming or any technical learning is a hands on experience. Take notes and apply techniques, using pen-and-paper or the keyboard, as they are presented. If you really have to just "read" a technical book, IME a less-is-more approach works best. 5-10 minutes at a time, not even a chapter at once. Maybe a few parag…

Yup. The key to learning is doing. You need exercises at the end of every chapter if you want to learn. Math books, programming books etc. And they need to be challenging. That's what helps retention and understanding.

Re: Eloquent JavaScript 4th edition (2024)

#178
post #95

Earlier quoted context omitted.

"Binding" is used thousands of times in the language standard, including for variables: https://tc39.es/ecma262/#sec-variable-statement -- that's my point, that this book is precise while being approachable to beginners. And I dispute the claim that "boxes" are the right abstraction for anything in JS. (Boxes may work for primitive values, but nothing further.) Directly seeing names as bindings ("tentacles") not only…

I meant in the context of writing code - you’ll never hear anyone refer to their “bindings”. It breaks down with the simple `let a = 22; let b = a` example where the tentacle/binding metaphor can lead to wrong intuition of why a change to the value of a is not reflected in b .

In what way does it break down? Maybe if one is thinking of boxes, going by "a change to the value of a"? The book says:

> When a binding points at a value, that does not mean it is tied to that value forever. The = operator can be used at any time on existing bindings to disconnect them from their current value and have them point to a new one

In this case:

    let a = 22;
The binding a points to the value 22.

    let b = a;
The binding b points to the same value that a points to, namely 22.

    a = 23;
The binding a now points to a different value 23. The binding b is not affected.

I've linked it a few times in this thread, but see the equivalent article for Python, which explains it clearly: https://nedbatchelder.com/text/names1.html

(It cannot break down because it's how the language works.)

Re: Eloquent JavaScript 4th edition (2024)

#179
post #172
post #87

Earlier quoted context omitted.

My point is that it's not a simplification, it's precisely how the language works: bindings between values and names (JavaScript has no separate notion of memory pointer; everything is a "pointer"). (Similarly for Python: https://nedbatchelder.com/text/names1.html ) Describing variables in this way gives readers the correct understanding, and the analogy of tentacles is no harder than that of boxes. Such things are w…

If the explanation doesn't mention memory positions then it is a simplification.

JavaScript does not provide a way for the programmer to access memory positions (and e.g. does not guarantee that the the language runtime will maintain unvarying memory positions), so it doesn't make sense to talk about memory positions: there's nothing to be gained at that level of abstraction. (Unless you'd call it a "simplification" to not talk of electrons and transistors too, in which case fine, yes it's a simplification in that sense.)
Post reply on HN