Live data from Hacker News

Eloquent JavaScript 4th edition (2024)

eloquentjavascript.net

201–210 of 249 posts

Re: Eloquent JavaScript 4th edition (2024)

#201
post #178

Earlier quoted context omitted.

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

Have you given any kind of training or lessons in programming (honest question)? Everything can break down!

This is exactly what I’m talking about:

> The binding b points to the same value that a points to

It may look obvious to you, but someone will interpret “the same value” as literally the same. So they might expect a change in a to reflect on b. Whereas if you tell them the “a box contains 22” and “the b box also contains 22” you prevent that misunderstanding. They might not have any concept of references/pointers yet and are just trying to make sense out of everything. These are the kind of silly mistakes people make when learning programming, or a new language.

It’s not about being right or wrong but providing a safe path to understanding that can be built upon. I did not mean the binding/tentacle abstraction is wrong, just that there might be a simpler one to introduce the concept. The book is still great regardless.

Re: Eloquent JavaScript 4th edition (2024)

#202

Earlier quoted context omitted.

You're struggling due to a conflation of two concepts. Binding refers to associating a name with a value. Assignment is a case of binding, but not the only one; two other examples are positional arguments in a function signature, and ESM imports. A binding can be mutable (let assignment, function arguments) or immutable (const assignment, ESM import). Value mutability is orthogonal. You can mutably bind a primitive v…

That’s funny. This is about didactics for newcomers to the language, I shared an example of what might trip them up. Thanks for taking the time though.

[deleted]

Re: Eloquent JavaScript 4th edition (2024)

#204
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…

Are you saying that I can learn equally well from reading as well as audio sources and, despite 50+ years of personal experience, I am wrong?

Re: Eloquent JavaScript 4th edition (2024)

#205

this book taught me javascript! great book, highly recommend it.

I agree. Have you also read "JavaScript: The Good Parts" ?

As others have stated, The Good Parts is no longer something I'd reccommend. It's more or less the K&R of JavaScript at this point. An interesting historical primer, but it would only serve to confuse a newcomer today, as all of the warts in the language discussed are ancient obsolete history.

Re: Eloquent JavaScript 4th edition (2024)

#206
post #186
post #38

This is, in my opinion, the book to use to learn JavaScript at more than a surface level. The only other materials I recommend as much (but for a different level of learner) are the “You don’t know JavaScript” in-depth book series. In 2015, I was consulting for a distance learning program, administered by a major California University, that wanted to replace their current textbook (one of those “Head First” O’Reilly…

If I put "You don’t know JavaScript" into Amazon I get approx 10 books at £20 each, is there a specific one / author I should look for, of even better and ISBN. Thanks!

There are 6 books, the author recommends reading them in an order:

https://github.com/getify/You-Dont-Know-JS?tab=readme-ov-fil...

If the second edition is not available, you can read the first edition, just be aware some small things may be slightly out of date.

Re: Eloquent JavaScript 4th edition (2024)

#207
This book took me from having nothing -- literally being a political science major grocery store employee -- to making 2xx,xxx YOY.

It was challenging and made me question whether or not I had it in me to code. Turns out, I could, and, vis-a-vis my peers, exceptionally well.

Well, I took me, but this book was my first real introduction to computer science.

Funnily enough, I didn't then and don't now personally care for the author (he seems untalented as a teacher), but I feel he accidentally made a good resource in his hubris.

Re: Eloquent JavaScript 4th edition (2024)

#208

Fancy seeing this here, some days after finishing the third version :) I'm also glad to see the asynchronous programming chapter significantly reworked - it was materially weaker than the rest of the book because of some weird analogies involving crows and their nests that didn't seem to make any sort of sense to me. The third edition also gave me the impression that it was a reasonable book to learn JS and the DOM (…

Ah! I vaguely remember rage quitting over the crows but didn't remember which book was it. I should give this another try then.

Re: Eloquent JavaScript 4th edition (2024)

#209
post #198
post #155

Earlier quoted context omitted.

I don't think this is a good book for someone who wants to learn programming for the first time.

Why do you feel that way? What books would you recommend instead?

Kernighan & Pikes Unix Programming Environment.

It’s *nix specific but a great introduction to all kinds of programming concepts with great working examples in a variety of languages you’ll use every day

Re: Eloquent JavaScript 4th edition (2024)

#210
post #139

Earlier quoted context omitted.

I read about fifty books a year for a decade now. Only about four of them per year, are programming books. They are indeed to be read very differently. Here's how I read them, ymmv. - never in bed. never as audiobook. But sitting. At a table or desk. - no distractions. At most "focus music". - read a chapter through. Then read it again and do all excercises (on a computer without wifi) - make copious notes, highlight…

I agree with all your bulleted points. Especially the "at most an hour". Maybe its age or outside responsibilities, but mental fatigue is a real thing for me, and spending more time than that on technically-challenging materially brings rapidly diminishing returns. > Very few of these work as ebook (Kobo) for me. The formatting of code is poor and diagrams unreadable. Prefer paper or PDF (but read on a computer or ta…

I find my ReMarkable 2 e-ink tablet provides fantastic UX for technical PDFs. Zero distractions, handwritten (or typed!) annotations, etc.
Post reply on HN